From 0926c7e79fdecdc3e3e648c7ed56d977e0f594e9 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Mon, 29 May 2017 20:34:42 +0200 Subject: [PATCH] no-jira: small selenium fix --- src/test/java/org/olat/selenium/UserTest.java | 8 ++++---- .../java/org/olat/selenium/page/portfolio/EntryPage.java | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/olat/selenium/UserTest.java b/src/test/java/org/olat/selenium/UserTest.java index ed244bacfbe..9275bf4cdb0 100644 --- a/src/test/java/org/olat/selenium/UserTest.java +++ b/src/test/java/org/olat/selenium/UserTest.java @@ -216,13 +216,13 @@ public class UserTest { //login again loginPage .assertOnLoginPage() - .loginAs(user.getLogin(), user.getPassword()); + .loginAs(user.getLogin(), user.getPassword()) + //check that we are really logged in + .assertLoggedIn(user); - //check that we don't see the resume button + //and check that we don't see the resume button List<WebElement> resumeButtons = browser.findElements(LoginPage.resumeButton); Assert.assertTrue(resumeButtons.isEmpty()); - //double check that we are really logged in - loginPage.assertLoggedIn(user); } diff --git a/src/test/java/org/olat/selenium/page/portfolio/EntryPage.java b/src/test/java/org/olat/selenium/page/portfolio/EntryPage.java index 78b42b8ba94..be0470c9e4f 100644 --- a/src/test/java/org/olat/selenium/page/portfolio/EntryPage.java +++ b/src/test/java/org/olat/selenium/page/portfolio/EntryPage.java @@ -88,7 +88,8 @@ public class EntryPage { By inputBy = By.cssSelector("fieldset.o_sel_pf_collect_image_form .o_fileinput input[type='file']"); OOGraphene.uploadFile(inputBy, image, browser); - OOGraphene.waitingALittleLonger();//wait event + By previewBy = By.cssSelector("div.o_filepreview>div.o_image>img"); + OOGraphene.waitElement(previewBy, 5, browser); By titleBy = By.cssSelector("fieldset.o_sel_pf_collect_image_form .o_sel_pf_collect_title input[type='text']"); browser.findElement(titleBy).sendKeys(title); -- GitLab