Skip to content
Snippets Groups Projects
Commit c6f2f158 authored by Marius Dumitru Florea's avatar Marius Dumitru Florea
Browse files

XWIKI-18344: Clicking "Create" button in Create Page view is sometimes not...

XWIKI-18344: Clicking "Create" button in Create Page view is sometimes not taken into consideration the first time
* Update test page objects
parent 366e94a0
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,11 @@ public DocumentPicker getDocumentPicker()
public CopyOrRenameOrDeleteStatusPage clickRenameButton()
{
// The rename page form is submitted by JavaScript code in case the rename button is clicked before the
// asynchronous validation ends, and in this case Selenium doesn't wait for the new page to load.
getDriver().addPageNotYetReloadedMarker();
this.renameButton.click();
getDriver().waitUntilPageIsReloaded();
return new CopyOrRenameOrDeleteStatusPage();
}
......
......@@ -219,7 +219,11 @@ public DocumentPicker getNewPagePicker()
*/
public InlinePage clickCreateDocumentButton()
{
// The create document form is submitted by JavaScript code in case the create button is clicked before the
// asynchronous validation ends, and in this case Selenium doesn't wait for the new page to load.
getDriver().addPageNotYetReloadedMarker();
createDocumentButton.click();
getDriver().waitUntilPageIsReloaded();
return new InlinePage();
}
......
......@@ -73,7 +73,13 @@ public ClassSheetPage createClass(String spaceName, String className)
{
this.documentPicker.setParent(spaceName);
this.documentPicker.setName(className);
// The create class form is submitted by JavaScript code in case the create button is clicked before the
// asynchronous validation ends, and in this case Selenium doesn't wait for the new page to load.
getDriver().addPageNotYetReloadedMarker();
this.createClassButton.click();
getDriver().waitUntilPageIsReloaded();
new WikiEditPage().clickSaveAndView();
return new ClassSheetPage();
}
......
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