Q7

Context Menu is not shown during replay.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.15
  • Fix Version/s: 1.2.17
  • Component/s: Runtime
  • Environment:
    Eclipse SDK
    Version: 4.2.1
    Build id: M20120914-1800
    + EGit
  • Test Mode:
    Manual

Description

Try to run the attached test case (ImportAlreadyExistingProject).
It fails because there is only one context menu command during replay.
If you switch perspectives to Resources and back to Git Repositories and right-click MyProject - all contet menu command will be shown.

UPD:

One more way to reproduce this bug:

Import AssumeUnchanged test case and run it.
It fails on line 57 because there is no Advanced context menu during replay.

  1. AssumeUnchanged.test
    29/Jan/13 1:33 PM
    25 kB
    Ulyana Skorokhodova
  2. CreateNewClassDiagram.test
    12/Feb/13 2:04 PM
    28 kB
    Ulyana Skorokhodova
  3. ImportAlreadyExistingProject.test
    29/Jan/13 11:41 AM
    24 kB
    Ulyana Skorokhodova
  4. modelForCompare.ecore
    12/Feb/13 7:03 PM
    3 kB
    komaz
  1. allMenuCommands.jpg
    41 kB
    29/Jan/13 11:41 AM
  2. corruptedEmfCompare.png
    72 kB
    12/Feb/13 7:02 PM
  3. noMenuCommands.jpg
    34 kB
    29/Jan/13 11:41 AM
  4. normalEmfCompare.png
    90 kB
    12/Feb/13 7:02 PM

Activity

Hide
Andrey Sobolev added a comment - 31/Jan/13 4:43 PM

Very likely issue is related to wrong coordinates in tree then we call MenuDetect. (com.xored.tesla.internal.ui.player.SWTUIPlayer.show(SWTUIElement))

Also menu is cached inside MenuManager, so I suppose we need to tweak menus in MenuManagers to populate each time we use it from Q7.

I've found a workaround for this issue:
Add "Project Explorer" view to workbench context "GitDefaultWorkbench". In this case, test will pass each time.

Show
Andrey Sobolev added a comment - 31/Jan/13 4:43 PM Very likely issue is related to wrong coordinates in tree then we call MenuDetect. (com.xored.tesla.internal.ui.player.SWTUIPlayer.show(SWTUIElement)) Also menu is cached inside MenuManager, so I suppose we need to tweak menus in MenuManagers to populate each time we use it from Q7. I've found a workaround for this issue: Add "Project Explorer" view to workbench context "GitDefaultWorkbench". In this case, test will pass each time.
Hide
komaz added a comment - 01/Feb/13 1:04 PM

As I understand once we get invalid context menu from test, the same invalid menu is displayed manually, I guess wrong coordinates version does not explain this

Show
komaz added a comment - 01/Feb/13 1:04 PM As I understand once we get invalid context menu from test, the same invalid menu is displayed manually, I guess wrong coordinates version does not explain this
Hide
Ulyana Skorokhodova added a comment - 01/Feb/13 1:05 PM

This workaround doesn't work for the folloing tests:

Add Tag on Branch
Assume Unchanged
Delete Branch
Rename Branch
Switch to New Branch

Show
Ulyana Skorokhodova added a comment - 01/Feb/13 1:05 PM This workaround doesn't work for the folloing tests: Add Tag on Branch Assume Unchanged Delete Branch Rename Branch Switch to New Branch
Hide
Ulyana Skorokhodova added a comment - 12/Feb/13 2:03 PM

This bug can be reproduced on Papyrus AUT as well.

Steps to reproduce:

Run the attached test case (CreateNewClassDiagram) on Papyrus AUT (http://eclipse.org/papyrus/);
Test fails to get menu:

Execution failed on line 2 at column 63 (Create New Class Diagram - Scenario2_ From a Context Menu.test:2)
Caused by:
The Menu "[New Diagram, Create a new Class Diagram]" could not be found.

If you right-click it manually - there is no menu, but if you right-click it second time - menu appears.
This happens only during replay.

Show
Ulyana Skorokhodova added a comment - 12/Feb/13 2:03 PM This bug can be reproduced on Papyrus AUT as well. Steps to reproduce: Run the attached test case (CreateNewClassDiagram) on Papyrus AUT (http://eclipse.org/papyrus/); Test fails to get menu: Execution failed on line 2 at column 63 (Create New Class Diagram - Scenario2_ From a Context Menu.test:2) Caused by: The Menu "[New Diagram, Create a new Class Diagram]" could not be found. If you right-click it manually - there is no menu, but if you right-click it second time - menu appears. This happens only during replay.
Hide
komaz added a comment - 12/Feb/13 7:04 PM - edited

Same for EMF Compare, see http://support.xored.com/helpdesk/tickets/37
ECL causing problem:

with [get-editor "library.ecore" | get-tree] {
    select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book"
    get-menu "Compare With/Each Other <EObject> (in Editor)" | click
}
Show
komaz added a comment - 12/Feb/13 7:04 PM - edited Same for EMF Compare, see http://support.xored.com/helpdesk/tickets/37 ECL causing problem:
with [get-editor "library.ecore" | get-tree] {
    select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book"
    get-menu "Compare With/Each Other <EObject> (in Editor)" | click
}
Hide
Andrey Sobolev added a comment - 12/Feb/13 10:42 PM

Problem is related to E4 IEclipseContext, and selection, org.eclipse.ui.selection variables inside it.

We need to provide this variables for views/editors, then do a selection in trees/tables.
Fix will be provided tomorrow.

Show
Andrey Sobolev added a comment - 12/Feb/13 10:42 PM Problem is related to E4 IEclipseContext, and selection, org.eclipse.ui.selection variables inside it. We need to provide this variables for views/editors, then do a selection in trees/tables. Fix will be provided tomorrow.
Hide
Andrey Sobolev added a comment - 13/Feb/13 10:43 AM

Fixed.

Show
Andrey Sobolev added a comment - 13/Feb/13 10:43 AM Fixed.
Hide
Ulyana Skorokhodova added a comment - 13/Feb/13 12:31 PM

Just tries Q7-D12-739 on Papyrus (Create New Actor (Using Model Explorer)) and EGit (Add Tag on Branch, Assume Unchanged) - problem still exists.

Tried to re-capture "Add Tag on Branch" - didn't help.
Reopening the bug.

Show
Ulyana Skorokhodova added a comment - 13/Feb/13 12:31 PM Just tries Q7-D12-739 on Papyrus (Create New Actor (Using Model Explorer)) and EGit (Add Tag on Branch, Assume Unchanged) - problem still exists. Tried to re-capture "Add Tag on Branch" - didn't help. Reopening the bug.
Hide
Andrey Sobolev added a comment - 14/Feb/13 10:17 AM

Problem was with PopupMenuExtender is called two times for same menu from Q7.

Also old menus was not hided, so effect of incorrect menus shown manually was seen.

Fixed.

Show
Andrey Sobolev added a comment - 14/Feb/13 10:17 AM Problem was with PopupMenuExtender is called two times for same menu from Q7. Also old menus was not hided, so effect of incorrect menus shown manually was seen. Fixed.
Hide
Ulyana Skorokhodova added a comment - 18/Feb/13 11:43 AM

Verified on Q7-D12-751, thanks!

Show
Ulyana Skorokhodova added a comment - 18/Feb/13 11:43 AM Verified on Q7-D12-751, thanks!
Hide
Ulyana Skorokhodova added a comment - 18/Feb/13 3:03 PM

The problem is still reproducible on EMF Compare.

Show
Ulyana Skorokhodova added a comment - 18/Feb/13 3:03 PM The problem is still reproducible on EMF Compare.
Hide
Ulyana Skorokhodova added a comment - 18/Feb/13 3:05 PM - edited

The problem is still reproducible on EMF Compare.
Just checked on Q7 1.2.17.

See http://support.xored.com/helpdesk/tickets/37 or use the following steps to reproduce:

1. Import the attached model (EMFCompareTest) and try to replay the following script:

get-view "Package Explorer" | get-tree | select "CompareWithEObject/library.ecore" | double-click

with [get-editor "library.ecore" | get-tree] { get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore" | expand get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library" | expand get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library" | expand select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook" | expand select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook" | expand get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" | click select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" get-menu "Compare With/Each Other <EObject> (in Dialog)" | click }

Test will fail with the following error:

Execution failed on line 37 at column 5 (test.test:37)
Caused by:
The Menu "[Compare With, Each Other <EObject> (in Dialog)]" could not be found.

TRe-capturing the test case doesn't fix the problem.

Show
Ulyana Skorokhodova added a comment - 18/Feb/13 3:05 PM - edited The problem is still reproducible on EMF Compare. Just checked on Q7 1.2.17. See http://support.xored.com/helpdesk/tickets/37 or use the following steps to reproduce: 1. Import the attached model (EMFCompareTest) and try to replay the following script: get-view "Package Explorer" | get-tree | select "CompareWithEObject/library.ecore" | double-click with [get-editor "library.ecore" | get-tree] { get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore" | expand get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library" | expand get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library" | expand select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook" | expand select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" | click get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook" | expand get-item "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" | click select "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/Book" "platform:\\/resource\\/CompareWithEObject\\/library.ecore/library/testBook/Book" get-menu "Compare With/Each Other <EObject> (in Dialog)" | click } Test will fail with the following error: Execution failed on line 37 at column 5 (test.test:37) Caused by: The Menu "[Compare With, Each Other <EObject> (in Dialog)]" could not be found. TRe-capturing the test case doesn't fix the problem.
Hide
Ulyana Skorokhodova added a comment - 18/Feb/13 3:19 PM

UPD: verified for 1.2.17 RC4

Show
Ulyana Skorokhodova added a comment - 18/Feb/13 3:19 PM UPD: verified for 1.2.17 RC4

People

Vote (0)
Watch (0)

Dates

  • Created:
    29/Jan/13 11:41 AM
    Updated:
    18/Feb/13 3:19 PM
    Resolved:
    18/Feb/13 3:19 PM