summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/debug
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-05-18 14:59:39 +0300
committerVaadin Code Review <review@vaadin.com>2015-07-14 06:56:36 +0000
commit3ddace2ca21d5e495a6fcab9b361baf772212801 (patch)
tree65064b19be1fdab862e08ac458b9cd656e903f90 /uitest/src/com/vaadin/tests/debug
parent4113062fc3c447debf7b7ea10c22b886dcf651c2 (diff)
downloadvaadin-framework-3ddace2ca21d5e495a6fcab9b361baf772212801.tar.gz
vaadin-framework-3ddace2ca21d5e495a6fcab9b361baf772212801.zip
Read debug window settings when all entry points have run (#17882)
Change-Id: I09d612d784f978ba483d243b6938697893e1eac4
Diffstat (limited to 'uitest/src/com/vaadin/tests/debug')
-rw-r--r--uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java33
-rw-r--r--uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java47
2 files changed, 80 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java b/uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java
new file mode 100644
index 0000000000..0ac2e87510
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.debug;
+
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.widgetset.TestingWidgetSet;
+import com.vaadin.ui.Label;
+
+@Widgetset(TestingWidgetSet.NAME)
+public class PreserveCustomDebugSectionOpen extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ addComponent(new Label(
+ "UI for testing that a custom debug window section remains open after refreshging."));
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java b/uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java
new file mode 100644
index 0000000000..01b73ded92
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.debug;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class PreserveCustomDebugSectionOpenTest extends SingleBrowserTest {
+ @Test
+ public void testPreserveSection() {
+ setDebug(true);
+ openTestURL();
+
+ findElement(
+ By.cssSelector(".v-debugwindow-tabs button[title=\"Dummy debug window section\"]"))
+ .click();
+
+ WebElement content = findElement(By
+ .cssSelector(".v-debugwindow-content"));
+
+ // Sanity check
+ Assert.assertEquals("Dummy debug window section", content.getText());
+
+ // Open page again, should still have the same section open
+ openTestURL();
+
+ content = findElement(By.cssSelector(".v-debugwindow-content"));
+ Assert.assertEquals("Dummy debug window section", content.getText());
+ }
+}