Skip to content
Snippets Groups Projects
Commit 7bb0355a authored by Dorian OUAKLI's avatar Dorian OUAKLI Committed by Manuel Leduc
Browse files

XWIKI-21093: Undo / Redo doesn't work anymore

* Fix CI breaking due to afterEach method not being executed on last test of a scenario
* Fix comment
parent 1eed1c84
No related branches found
No related tags found
No related merge requests found
...@@ -51,24 +51,21 @@ void beforeEach(TestUtils setup, TestReference testReference) ...@@ -51,24 +51,21 @@ void beforeEach(TestUtils setup, TestReference testReference)
edit(setup, testReference); edit(setup, testReference);
} }
@AfterEach
void afterEach(TestUtils setup, TestReference testReference)
{
maybeLeaveEditMode(setup, testReference);
}
@Test @Test
@Order(1) @Order(1)
void undoRedoWithPlaceholder() throws Exception void undoRedoWithPlaceholder(TestUtils setup, TestReference testReference) throws Exception
{ {
textArea.sendKeys("one", Keys.ENTER, "two", Keys.ENTER, "three", Keys.ENTER); textArea.sendKeys("one", Keys.ENTER, "two", Keys.ENTER, "three", Keys.ENTER);
// Undo 4 steps. // Undo 4 steps.
textArea.sendKeys(Keys.chord(Keys.CONTROL, "zzzz")); textArea.sendKeys(Keys.chord(Keys.CONTROL, "zzzz"));
// Redo 2 steps // Redo 2 steps.
textArea.sendKeys(Keys.chord(Keys.CONTROL, Keys.SHIFT, "zz")); textArea.sendKeys(Keys.chord(Keys.CONTROL, Keys.SHIFT, "zz"));
assertSourceEquals("one\n\ntwo\n\n "); assertSourceEquals("one\n\ntwo\n\n ");
// Clean up for following tests.
maybeLeaveEditMode(setup, testReference);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment