Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncovered UI code #205

Open
29 tasks done
LorenzoBettini opened this issue Aug 24, 2022 · 0 comments
Open
29 tasks done

Uncovered UI code #205

LorenzoBettini opened this issue Aug 24, 2022 · 0 comments
Assignees
Labels
a: test 👮‍♂️ Related to testing impacts: dev 💻 Has an effect on contributors' work is: in progress 🚧 Someone is working on it priority: medium 🌥️ Must be done

Comments

@LorenzoBettini
Copy link
Collaborator

LorenzoBettini commented Aug 24, 2022

Tests do not yet cover some code.

Investigate that, especially for #136

org.pitest.pitclipse.launch.ui:

  • org.pitest.pitclipse.launch.ui.PitLaunchShortcut
    • A test with no tests
      • If we select a README (non Java element) in the project explorer, it just doesn't run anything, but we should show "no tests found" 3b9ee62
      • If we select two elements, we get "no tests found" a2d2793
      • If we select a field and we run, we get the dialog "no tests found" 624f966
    • Run PIT on a BinaryTest class file ffdbdb5 74381e7
    • A test with several launch configurations (prepare a project with saved launch configurations) ae4e464 b7122ba
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(Object[], String) ignoring exceptions 078dc39
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.hasSameAttributes(ILaunchConfiguration, ILaunchConfiguration, String[]) ignores exceptions ed5a2e6
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.createLaunchConfiguration(IJavaElement) case for method: select a method in the project explorer; example foo.bar.FooTest.fooTest3() d82c9f1
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(ISelection, String) I don't see how it cannot be a StructuredSelection d311a2c
    • PitLaunchShortcut.createLaunchConfiguration(IJavaElement) cannot get to an invalid selection since it's filtered beforehand in org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(Object[], String) beb2bb9
  • test for running from the editor
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(IEditorPart, String) 5184f4a
    • If we open README in an editor and we run, we get the dialog "no tests found" 5184f4a
    • PitLaunchShortcut.getLaunchConfigurations(ISelection) I don't see how it cannot be a StructuredSelection (and it's called from here: org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getParticipatingLaunchConfigurations(IStructuredSelection, IResource, List, String), where it's a structured selection). 4408201
    • editor context menus?
  • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.getLaunchConfigurations(ISelection) is called when something is selected and we hover on the toolbar button
    • "Run" toolbar button 777b2c9
    • Also when editor is selected c17de18
    • but again we must assume structured selection?
  • org.pitest.pitclipse.launch.ui.LaunchShortcut 6f7dc07 478c298

The above tasks have been addressed in #206

org.pitest.pitclipse.ui:

  • Visitor adapter with default implementations (that must be uncovered) 9c29d68
  • ViewContentProvider should assume Visitable object and no check for instanceof 1c30b28
  • ViewLabelProvider similar and there are other cases that cannot take place 72aa6ec
  • OpenMutationDoubleClick a4e38fd 5d15bc8
    • PitclipseLaunchUiUtils should be in PitclipseUiUtils since .launch.ui depends on .ui 38c5583
  • ExpandingDoubleClick b4dd65d
  • PitViewFinder when the views are closed return NoOpMutationsView NoOpSummaryView but maybe it should also try to open them? Instead we have
private static synchronized void activateViewOnceAndOnceOnly(String viewId) throws PartInitException {
    if (!initialisedViews.contains(viewId)) {
        IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        activePage.showView(viewId);
        initialisedViews.add(viewId);
    }
}

done in 62d7009

The above tasks have been addressed in #207

@LorenzoBettini LorenzoBettini added a: test 👮‍♂️ Related to testing is: untested ❗ Provide untested features impacts: dev 💻 Has an effect on contributors' work labels Aug 24, 2022
@LorenzoBettini LorenzoBettini self-assigned this Aug 24, 2022
LorenzoBettini added a commit that referenced this issue Aug 24, 2022
I seem to understand that no one is using the passed html so I removed
that

Task-Url: #205
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
@LorenzoBettini LorenzoBettini added is: in progress 🚧 Someone is working on it priority: medium 🌥️ Must be done and removed is: untested ❗ Provide untested features labels Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
the default case is the one for java project and fragments

Task-Url: #205
LorenzoBettini added a commit that referenced this issue Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: test 👮‍♂️ Related to testing impacts: dev 💻 Has an effect on contributors' work is: in progress 🚧 Someone is working on it priority: medium 🌥️ Must be done
Projects
None yet
Development

No branches or pull requests

1 participant