Skip to content
Snippets Groups Projects
Commit 5816e648 authored by Michael Hamann's avatar Michael Hamann
Browse files

XWIKI-19928: Migrate CKEditor to XWiki Platform

* Fix integration tests in Chrome.
parent d3db51e5
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.Keys;
import org.xwiki.ckeditor.test.po.CKEditor;
import org.xwiki.ckeditor.test.po.RichTextAreaElement;
import org.xwiki.panels.test.po.DocumentInformationPanel;
......@@ -71,7 +72,9 @@ void saveAfterSyntaxChange(TestUtils setup, TestReference testReference)
// Type some text to verify that it isn't lost when we change the syntax.
CKEditor editor = new CKEditor("content").waitToLoad();
editor.getRichTextArea().sendKeys("test ");
// First move the cursor to the start before entering the text to ensure it is outside the link, being
// outside the link is the initial state in Chrome but not in Firefox.
editor.getRichTextArea().sendKeys(Keys.HOME, "test ");
DocumentSyntaxPicker documentSyntaxPicker = new DocumentInformationPanel().getSyntaxPicker();
assertEquals("xwiki/2.0", documentSyntaxPicker.getSelectedSyntax());
......@@ -81,7 +84,7 @@ void saveAfterSyntaxChange(TestUtils setup, TestReference testReference)
.contains("from the previous XWiki 2.0 syntax to the selected XWiki 2.1 syntax?"));
confirmationModal.confirmSyntaxConversion();
assertEquals("[[test label>>||anchor=\"target\"]]", editPage.clickSaveAndView().editWiki().getContent());
assertEquals("test [[label>>||anchor=\"target\"]]", editPage.clickSaveAndView().editWiki().getContent());
assertEquals("xwiki/2.1", new DocumentInformationPanel().getSyntaxPicker().getSelectedSyntax());
}
}
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