diff options
Diffstat (limited to 'uitest/src/test/java/com')
3 files changed, 0 insertions, 153 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java deleted file mode 100644 index 99562f7dcb..0000000000 --- a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2000-2016 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.application; - -import org.junit.Assert; -import org.junit.Test; - -import com.vaadin.testbench.elements.ButtonElement; -import com.vaadin.tests.tb3.SingleBrowserTest; - -public class ResynchronizeAfterAsyncRemovalTest extends SingleBrowserTest { - @Test - public void noResyncAfterAsyncRemoval() { - openTestURL(); - - $(ButtonElement.class).first().click(); - - Assert.assertEquals("Timing issue in the test?", - "1. Window removed: true", getLogRow(1)); - - Assert.assertEquals( - "Removing window should not cause button to be marked as dirty", - "2. Dirty: false", getLogRow(0)); - - ButtonElement logCountButton = $(ButtonElement.class).all().get(1); - logCountButton.click(); - - Assert.assertEquals("Sanity check", "3. syncId: 2", getLogRow(1)); - Assert.assertEquals("Sanity check", - "4. Unregistered connector count: 1", getLogRow(0)); - - logCountButton.click(); - - Assert.assertEquals("Sanity check", "5. syncId: 3", getLogRow(1)); - Assert.assertEquals( - "Unregistered connector map should have been cleared", - "6. Unregistered connector count: 0", getLogRow(0)); - } -} diff --git a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java b/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java deleted file mode 100644 index 2e8d462f5b..0000000000 --- a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2000-2016 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.components; - -import org.junit.Assert; -import org.junit.Test; - -import com.vaadin.testbench.elements.ButtonElement; -import com.vaadin.tests.tb3.MultiBrowserTest; - -public class OutOfSyncTest extends MultiBrowserTest { - - @Test - public void testClientResync() throws InterruptedException { - openTestURL(); - - // Wait for server to get rid of the Button - sleep(1000); - - // On the first round-trip after the component has been removed, the - // server assumes the client will remove the button. How ever (to force - // it to be out of sync) the test UI calls markClean() on the Button to - // make it not update with the response. - $(ButtonElement.class).first().click(); - Assert.assertTrue( - "Button should not have disappeared on the first click.", - $(ButtonElement.class).exists()); - - // Truly out of sync, full resync is forced. - $(ButtonElement.class).first().click(); - Assert.assertFalse("Button should disappear with the second click.", - $(ButtonElement.class).exists()); - } - -} diff --git a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java deleted file mode 100644 index 1d54339f8f..0000000000 --- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2000-2016 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.components.checkbox; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import com.vaadin.testbench.elements.CheckBoxElement; -import com.vaadin.testbench.elements.LabelElement; -import com.vaadin.tests.tb3.MultiBrowserTest; - -public class CheckBoxImmediateTest extends MultiBrowserTest { - - @Test - public void testNonImmediateCheckBox() { - openTestURL(); - - CheckBoxElement checkBoxElement = $(CheckBoxElement.class).first(); - WebElement inputElem = checkBoxElement.findElement(By.tagName("input")); - final WebElement countElem = $(LabelElement.class).id("count"); - - inputElem.click(); - assertEquals("Events received: 0", countElem.getText()); - } - - @Test - public void testImmediateCheckBox() { - openTestURL(); - - CheckBoxElement checkBoxElement = $(CheckBoxElement.class).get(1); - WebElement inputElem = checkBoxElement.findElement(By.tagName("input")); - final WebElement countElem = $(LabelElement.class).id("count"); - - inputElem.click(); - assertEquals("Events received: 1", countElem.getText()); - } -} |