From 0f89c33a5267a3bd99b61602f9a651fee81adf6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Kr=C3=A4hemann?= <joel.kraehemann@frentix.com> Date: Thu, 6 Jun 2013 10:32:45 +0200 Subject: [PATCH] FXOLAT-208: Check for confirmation within idle method in FunctionalUtil class. --- .../olat/util/FunctionalEPortfolioUtil.java | 20 ------------------- .../java/org/olat/util/FunctionalUtil.java | 5 +++++ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java b/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java index 4974b59c506..4796f3caf7e 100644 --- a/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java +++ b/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java @@ -601,10 +601,6 @@ public class FunctionalEPortfolioUtil { functionalUtil.waitForPageToLoadElement(browser, selectorBuffer.toString()); browser.click(selectorBuffer.toString()); - if(browser.isConfirmationPresent()){ - browser.getConfirmation(); - } - functionalUtil.waitForPageToLoad(browser); boolean modified = false; @@ -834,10 +830,6 @@ public class FunctionalEPortfolioUtil { functionalUtil.waitForPageToLoadElement(browser, selectorBuffer.toString()); browser.click(selectorBuffer.toString()); - - if(browser.isConfirmationPresent()){ - browser.getConfirmation(); - } functionalUtil.waitForPageToLoad(browser); @@ -1117,10 +1109,6 @@ public class FunctionalEPortfolioUtil { functionalUtil.waitForPageToLoadElement(browser, selector); browser.click(selector); - - if(browser.isConfirmationPresent()){ - browser.getConfirmation(); - } StringBuffer locatorBuffer = new StringBuffer(); @@ -1140,10 +1128,6 @@ public class FunctionalEPortfolioUtil { functionalUtil.waitForPageToLoadElement(browser, selector); browser.click(selector); - - if(browser.isConfirmationPresent()){ - browser.getConfirmation(); - } locatorBuffer = new StringBuffer(); @@ -1171,10 +1155,6 @@ public class FunctionalEPortfolioUtil { functionalUtil.waitForPageToLoadElement(browser, selector); browser.click(selector); - - if(browser.isConfirmationPresent()){ - browser.getConfirmation(); - } locatorBuffer = new StringBuffer(); diff --git a/src/test/java/org/olat/util/FunctionalUtil.java b/src/test/java/org/olat/util/FunctionalUtil.java index ff3d23984ed..45a9c964ca7 100644 --- a/src/test/java/org/olat/util/FunctionalUtil.java +++ b/src/test/java/org/olat/util/FunctionalUtil.java @@ -328,6 +328,11 @@ public class FunctionalUtil { long startTime = Calendar.getInstance().getTimeInMillis(); long currentTime = startTime; long waitLimit = TIMEOUT; + + //FIXME:JK: this is really ugly. For better performance revise confirmation + if(browser.isConfirmationPresent()){ + browser.getConfirmation(); + } while(linkBusy(browser) && waitLimit > currentTime - startTime){ try { -- GitLab