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

[misc] InlinePage and 2 custom inline edit pages from AppWithinMinutes were...

[misc] InlinePage and 2 custom inline edit pages from AppWithinMinutes were not waiting for confirmation on Save & Continue, leading to flickering tests.
parent 649cf4ea
No related branches found
No related tags found
No related merge requests found
......@@ -107,8 +107,24 @@ public <T extends ViewPage> T clickSaveAndView()
@Override
public void clickSaveAndContinue()
{
clickSaveAndContinue(true);
}
/**
* Clicks on the Save & Continue button. Use this instead of {@link #clickSaveAndContinue()} when you want to wait
* for a different message (e.g. an error message).
*
* @param wait {@code true} to wait for the page to be saved, {@code false} otherwise
*/
public void clickSaveAndContinue(boolean wait)
{
saveAndContinueButton.click();
if (wait) {
// Wait until the page is really saved.
waitForNotificationSuccessMessage("Saved");
}
}
/**
......
......@@ -106,6 +106,9 @@ public <T extends ViewPage> T clickSaveAndView()
public void clickSaveAndContinue()
{
saveAndContinueButton.click();
// Wait until the page is really saved.
waitForNotificationSuccessMessage("Saved");
}
@SuppressWarnings("unchecked")
......
......@@ -52,7 +52,10 @@ public void clickPreview()
public void clickSaveAndContinue()
{
saveandcontinue.click();
this.saveandcontinue.click();
// Wait until the page is really saved.
waitForNotificationSuccessMessage("Saved");
}
public <T extends ViewPage> T clickSaveAndView()
......
......@@ -138,8 +138,8 @@ public void clickSaveAndContinue()
{
this.saveandcontinue.click();
// Wait until the page is really saved
waitUntilElementIsVisible(By.xpath("//div[contains(@class,'xnotification-done') and text()='Saved']"));
// Wait until the class is really saved.
waitForNotificationSuccessMessage("Saved");
}
public ViewPage clickSaveAndView()
......
......@@ -127,7 +127,7 @@ public void clickSaveAndContinue()
{
this.saveandcontinue.click();
// Wait until the page is really saved
// Wait until the page is really saved.
waitForNotificationSuccessMessage("Saved");
}
......
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