summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-04-29 14:30:55 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-05-04 07:05:40 +0000
commitdd05b436d9f74e9daa54829db3c73ff473d18acd (patch)
tree23971c5b21c1742ca6d976f0f1dcf43b34496cd9 /uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
parent1fcd9a83b9760c82ba524016daf257b3cc706cab (diff)
downloadvaadin-framework-dd05b436d9f74e9daa54829db3c73ff473d18acd.tar.gz
vaadin-framework-dd05b436d9f74e9daa54829db3c73ff473d18acd.zip
Render CustomLayout properly even if a slot is missing (#17681)
Change-Id: I1ca0699776b93987c00a23a61a64ba8f3b4cd95e
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index 48f99e5057..ddf90b080b 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -28,6 +28,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
+import java.util.logging.Level;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
@@ -35,6 +36,7 @@ import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicHttpEntityEnclosingRequest;
+import org.junit.Assert;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
@@ -823,6 +825,22 @@ public abstract class AbstractTB3Test extends ParallelTest {
return findElement(By.xpath("//button[@title='Debug message log']"));
}
+ protected void assertNoDebugMessage(Level level) {
+ // class="v-debugwindow-row Level.getName()"
+ List<WebElement> logElements = driver
+ .findElements(By.xpath(String
+ .format("//div[@class='v-debugwindow-row %s']/span[@class='v-debugwindow-message']",
+ level.getName())));
+ if (!logElements.isEmpty()) {
+ String logRows = "";
+ for (WebElement e : logElements) {
+ logRows += "\n" + e.getText();
+ }
+ Assert.fail("Found debug messages with level " + level.getName()
+ + ": " + logRows);
+ }
+ }
+
/**
* Should the "require window focus" be enabled for Internet Explorer.
* RequireWindowFocus makes tests more stable but seems to be broken with