blob: a6228f6e124f9beb6588a84a3db4814a68c36c92 [file] [log] [blame]
This is a test list for the integrated undo/redo framework
Actions
Verify that "Undo Typing" appears in action bar edit menu and editor popup menu once text has been typed.
Verify that "Redo Typing" appears in action bar edit menu immediately after an undo has been performed.
Move between different editors and verify that the undo/redo state matches the current editor and that the undo performs the expected operation.
Verify that "Undo <name of refactoring op>" appears in action bar edit menu and editor popup menu immediately after performing a refactoring from that editor.
Verify that "Undo <name of refactoring op>" appears in action bar edit menu of Package Explorer and Navigator after performing a refactoring from anywhere.
Preferences
Set different text undo limits (including 0) in the text editor preferences (General>Editors>TextEditors>Undo history size) and verify they work as expected.
Integrated Scenarios
<setup>
For the following text-refactoring integrated scenarios, do the following first:
a. Create a Java project "Undo Scenarios".
b. Create a package "xxx".
c. Copy the java files provided in org.eclipse.ui.tests/ManualComponentTests/Undo test files to "xxx".
<simple refactoring undo>
a. Open A.Java and B.java
b. In A, click in the method name for "bar" and choose Refactor>Rename
c. Rename "bar" to "bar2"
d. Verify that "Undo Rename method bar to bar2" appears in Edit>Undo in pulldown menu of editor, editor popup, Package Explorer, and Navigator.
e. Select "Undo Rename method bar to bar2" from any of these locations
f. Operation is undone without prompting or warning
g. Verify that "Redo Rename method bar to bar2" appears in Edit>Undo pulldown menu for the editor, Navigator, and Package Explorer.
h. Select "Redo Rename method bar to bar2" from any of these locations
i. Operation is redone without prompting or warning
j. Undo again to revert files to original state and close editors.
<prompt on non-local undo, proceed>
a. Open A.Java and B.java
b. In A, click in the method name for "foo" and choose Refactor>Rename
c. Rename "foo" to "foo2"
d. Verify that "Undo Rename method foo to foo2" appears in Edit>Undo in pulldown menu of editor, editor popup, Package Explorer, and Navigator.
e. Select "Undo Rename method foo to foo2" from A's edit menu.
f. Operation prompts as to whether you want to proceed since the refactoring affects other files.
g. Select "yes" and operation is undone.
h. Select "Redo Rename method foo to foo2" from package explorer.
i. Operation prompts as to whether you want to proceed since the refactoring affects other files.
j. Undo again to revert files to original state and close editors.
<prompt on non-local undo, cancel>
a. Open A.Java and B.java
b. In A, click in the method name for "foo" and choose Refactor>Rename
c. Rename "foo" to "foo2"
d. Verify that "Undo Rename method foo to foo2" appears in Edit>Undo in pulldown menu of editor, editor popup, Package Explorer, and Navigator.
e. Select "Undo Rename method foo to foo2" from A's edit menu.
f. Operation prompts as to whether you want to proceed since the refactoring affects other files.
g. Select "cancel" and operation is cancelled.
h. Verify that "Undo Rename method foo to foo2" is still in the Edit>Undo menu.
i. Select "Undo Rename method foo to foo2" again, choosing "yes" when prompted.
j. Close editors
<prompt on non-local undo, discard undo>
a. Open A.Java and B.java
b. In A, click in the method name for "foo" and choose Refactor>Rename
c. Rename "foo" to "foo2"
d. Verify that "Undo Rename method foo to foo2" appears in Edit>Undo in pulldown menu of editor, editor popup, Package Explorer, and Navigator.
e. Select "Undo Rename method foo to foo2" from A's edit menu.
f. Operation prompts as to whether you want to proceed since the refactoring affects other files.
g. Select "Discard Undo" and operation is cancelled.
h. Choose "Undo Typing" from A to revert the text part of the refactoring
i. Go to B and choose "Undo Typing" to revert the text part of the refactoring change.
j. Close editors
<prompt on non-local undo, do not proceed, with undo/redo in between (bug 97939)
a. Open A.Java and B.java
b. In A, click in the method name for "foo" and choose Refactor>Rename
c. Rename "foo" to "foo2"
d. Verify that "Undo Rename method foo to foo2" appears in Edit>Undo in pulldown menu of editor, editor popup, Package Explorer, and Navigator.
e. Select "Undo Rename method foo to foo2" from A's edit menu.
f. Operation prompts as to whether you want to proceed since the refactoring affects other files.
g. Select "yes" and operation is undone.
h. Select "Redo Rename method foo to foo2" from package explorer.
i. Operation prompts as to whether you want to proceed since the refactoring affects other files.
j. Select "yes" and operation is redone.
k. Select "Undo Rename method foo to foo2" from A's edit menu.
l. Operation prompts as to whether you want to proceed since the refactoring affects other files.
m. Select "Discard Undo" and operation is cancelled.
n. Choose "Undo Typing" from A to revert the text part of the refactoring
o. Go to B and choose "Undo Typing" to revert the text part of the refactoring change.
p. Close editors
<detection of changed file>
a. Open A.Java and B.java
b. In A, click in the method name for "foo" and choose Refactor>Rename
c. Rename "foo" to "foo2"
d. In B, type some text anywhere.
e. Go back to A and Select "Undo Rename method foo to foo2" from A's edit menu.
f. Operation informs you that it cannot be completed since B has changed.
g. Select OK
h. Choose "Undo Typing" from A to revert the text part of the refactoring
i. Go to B and choose "Undo Typing" to revert the typed changes followed by the text part of the refactoring change.
<detection of changed file with undo/redo in between (bug 97939)>
a. Open A.Java and B.java
b. In A, click in the method name for "foo" and choose Refactor>Rename
c. Rename "foo" to "foo2"
d. Verify that "Undo Rename method foo to foo2" appears in Edit>Undo in pulldown menu of editor, editor popup, Package Explorer, and Navigator.
e. Select "Undo Rename method foo to foo2" from A's edit menu.
f. Operation prompts as to whether you want to proceed since the refactoring affects other files.
g. Select "yes" and operation is undone.
h. Select "Redo Rename method foo to foo2" from package explorer.
i. Operation prompts as to whether you want to proceed since the refactoring affects other files.
j. Select "yes" and operation is redone.
k. In B, type some text anywhere.
l. Go back to A and Select "Undo Rename method foo to foo2" from A's edit menu.
m. Operation informs you that it cannot be completed since B has changed.
n. Select OK
o. Choose "Undo Typing" from A to revert the text part of the refactoring
p. Go to B and choose "Undo Typing" to revert the typed changes followed by the text part of the refactoring change.
Manual Testing of Examples
An unreleased example app is used to manually test certain user operations and to watch the undo
history using an OperationsLogView. To do the testing below, you must have access to the Ottawa
CVS repository (host: ottcvs1.ott.oti.com, repository path: /home/cvs/desktop).
Check out the project org.eclipse.ui.operations.examples from HEAD and then run a workbench. There
must be at least some *.xml file in the workspace (create a plug-in project if your workspace is empty).
The scenarios are designed to be run sequentially, as the example operations cycle through three
statuses - INFO, WARNING, ERROR.
1 - <correct handling of long label names>
a. Select a *.xml file in the navigator or package explorer.
b. Popup the menu and choose Operations>Example Operation.
c. A message box appears confirming the execution of the operation.
d. Check the undo menu for the package explorer and verify that the long name
has ellipsis (...) in the middle of it
2 - <correct handling of undo and progress monitor>
e. Undo the operation from the package explorer
f. Verify that an hour glass appears
g. After a short wait, a progress monitor should appear
h. A message box appears confirming the undo.
3 - <verify anything missed above and add redo>
i. repeat steps (a) through (h) above to double check hour glass, etc.
j. Check that the redo menu for the package explorer shows the operation
k. Redo the operation
l. A message box appears confirming the redo
4 - <proper handling of operation exceptions>
m. repeat steps (a) through (g) above.
n. After the progress dialog disappears, you should get a message informing
you of an error/Abnormal Workbench Condition
o. Verify that undo/redo are disabled after this error.
5 - <correct handling of INFO, WARNING status from AdvancedValidatingOperationApprover>
a. Select a *.xml file in the navigator or package explorer.
b. Popup the menu and choose Operations>Advanced Example Operation.
c. A message box appears confirming the execution of the operation.
d. Check the undo menu for the package explorer and verify that the long name
has ellipsis (...) in the middle of it
e. Undo the operation from the package explorer
f. Select "Undo A very long str...
g. You should immediately see a dialog titled "Undo Information" and be asked whether to proceed.
h. Choose yes.
i. You should see a progress dialog and then a message box when the operation is complete
j. At this point you should see the Redo Action available
k. Repeat steps (a) through (j). The only difference should be that the
dialog in (e) is titled "Undo Warning" with a slightly different message.
If you are fast enough, cancel the progress dialog to verify it stops the operation
(no prompt at the end).
6 - <correct handling of ERROR status from AdvancedValidatingOperationApprover>
a. Select a *.xml file in the navigator or package explorer.
b. Popup the menu and choose Operations>Advanced Example Operation.
c. A message box appears confirming the execution of the operation.
d. Select "Undo A very long str...
e. You should first see a progress dialog while the operation computes validity
f. You should then see a dialog titled "Undo Problem" informing you the operation cannot undo
g. Undo and Redo should no longer be available in the menu.
7 - <correct handling of cancel/flush inside LinearUndoViolationUserApprover>
a. Select a *.xml file in the navigator or package explorer.
b. Popup the menu and choose Operations>Invalid Example Operation.
c. A message box appears confirming the execution of the operation.
d. Select "Undo A very long str...
e. A message box appears informing you of more recent changes to the package explorer and
asks if you wish to undo those local changes first.
f. Answer no.
g. Verify that the undo menu item remains the same.
8 - <correct handling of rollback failure inside LinearUndoViolationUserApprover>
a. Select a *.xml file in the navigator or package explorer.
b. Popup the menu and choose Operations>Invalid Example Operation.
c. A message box appears confirming the execution of the operation.
d. Select "Undo A very long str...
e. A message box appears informing you of more recent changes to the package explorer and
asks if you wish to undo those local changes first.
f. Answer yes.
g. Verify that undo is still available (due to failure in the rollback)
h. Undo the item again, this time it should be successful and redo should be available.