Logo: Relish

  1. Sign in

Project: Redcar

Undo and Redo

Scenarios
Commands are inactive for a new tab
When
I open a new edit tab
Then
the menu item "Edit|Undo" should be inactive
And
the menu item "Edit|Redo" should be inactive
Undo becomes active when I type something
When
I open a new edit tab
And
I replace the contents with "Bolzano"
Then
the menu item "Edit|Undo" should be active
And
the menu item "Edit|Redo" should be inactive
Undo undoes typing
When
I open a new edit tab
And
I replace the contents with "Bolzano"
And
I undo
Then
I should not see "Bolzano" in the edit tab
Undo undoes typing twice
When
I open a new edit tab
And
I replace the contents with "Bolzano"
And
I replace the contents with "Weierstrass"
And
I undo
Then
I should not see "Weierstrass" in the edit tab
And
I should see "Bolzano" in the edit tab
And
I undo
Then
I should not see "Weierstrass" in the edit tab
And
I should not see "Bolzano" in the edit tab
Undo becomes inactive and redo active when I undo everything
When
I open a new edit tab
And
I replace the contents with "Bolzano"
And
I undo
Then
the menu item "Edit|Undo" should be inactive
And
the menu item "Edit|Redo" should be active
Redo redoes typing
When
I open a new edit tab
And
I replace the contents with "Bolzano"
And
I undo
And
I redo
And
I should see "Bolzano" in the edit tab
Redo becomes inactive when I redo everything
When
I open a new edit tab
And
I replace the contents with "Bolzano"
And
I undo
And
I redo
Then
the menu item "Edit|Undo" should be active
And
the menu item "Edit|Redo" should be inactive
Compound undo steps work
When
I open a new edit tab
And
tabs are hard
And
I replace the contents with "Bolzano\nWeierstrass"
And
I select from 0 to 19
And
tabs are hard
And
I run the command Redcar::Top::IncreaseIndentCommand
Then
the contents should be "\tBolzano\n\tWeierstrass"
And
I undo
Then
the contents should be "Bolzano\nWeierstrass"

Last published over 5 years ago by danlucraft.