diff options
author | Artur <artur@vaadin.com> | 2017-05-09 14:17:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 14:17:05 +0300 |
commit | b5da856bdbe9961151a265db1058c7ee1393bcff (patch) | |
tree | 69dec0fd388dfd45a1791bd24cdbcc4a54b79b78 /uitest | |
parent | 93256e3e69fc6a4d132eb11faff8fe9ce5efdf64 (diff) | |
download | vaadin-framework-b5da856bdbe9961151a265db1058c7ee1393bcff.tar.gz vaadin-framework-b5da856bdbe9961151a265db1058c7ee1393bcff.zip |
Move TestBench API to the correct package (#9249)
Fixes #9241
Diffstat (limited to 'uitest')
22 files changed, 32 insertions, 116 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TestDateField.java b/uitest/src/main/java/com/vaadin/tests/components/TestDateField.java index f6af101cbe..3f7b77b468 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/TestDateField.java +++ b/uitest/src/main/java/com/vaadin/tests/components/TestDateField.java @@ -17,13 +17,13 @@ package com.vaadin.tests.components; import java.time.LocalDate; -import com.vaadin.ui.AbstractLocalDateField; +import com.vaadin.ui.DateField; /** * @author Vaadin Ltd * */ -public class TestDateField extends AbstractLocalDateField { +public class TestDateField extends DateField { /** * Constructs an empty <code>DateField</code> with no caption. diff --git a/uitest/src/test/java/com/vaadin/testbench/customelements/AbstractDateFieldElement.java b/uitest/src/test/java/com/vaadin/testbench/customelements/AbstractDateFieldElement.java deleted file mode 100644 index 4d61a6a491..0000000000 --- a/uitest/src/test/java/com/vaadin/testbench/customelements/AbstractDateFieldElement.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.vaadin.testbench.customelements; - -import com.vaadin.testbench.elementsbase.ServerClass; - -@ServerClass("com.vaadin.ui.AbstractDateField") -public class AbstractDateFieldElement extends DateFieldElement { -} diff --git a/uitest/src/test/java/com/vaadin/testbench/customelements/DateFieldElement.java b/uitest/src/test/java/com/vaadin/testbench/customelements/DateFieldElement.java deleted file mode 100644 index 3c0348ee02..0000000000 --- a/uitest/src/test/java/com/vaadin/testbench/customelements/DateFieldElement.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.vaadin.testbench.customelements; - -import org.openqa.selenium.By; - -import com.vaadin.testbench.elementsbase.ServerClass; - -@ServerClass("com.vaadin.ui.DateField") -public class DateFieldElement - extends com.vaadin.testbench.elements.DateFieldElement { - public void openPopup() { - findElement(By.tagName("button")).click(); - } -} diff --git a/uitest/src/test/java/com/vaadin/testbench/customelements/DateTimeFieldElement.java b/uitest/src/test/java/com/vaadin/testbench/customelements/DateTimeFieldElement.java deleted file mode 100644 index 022acbfa8a..0000000000 --- a/uitest/src/test/java/com/vaadin/testbench/customelements/DateTimeFieldElement.java +++ /dev/null @@ -1,27 +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.testbench.customelements; - -import com.vaadin.testbench.elementsbase.ServerClass; - -/** - * @author Vaadin Ltd - * - */ -@ServerClass("com.vaadin.ui.DateTimeField") -public class DateTimeFieldElement extends DateFieldElement { - -} diff --git a/uitest/src/test/java/com/vaadin/testbench/customelements/InlineDateTimeFieldElement.java b/uitest/src/test/java/com/vaadin/testbench/customelements/InlineDateTimeFieldElement.java deleted file mode 100644 index 27d6d90640..0000000000 --- a/uitest/src/test/java/com/vaadin/testbench/customelements/InlineDateTimeFieldElement.java +++ /dev/null @@ -1,28 +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.testbench.customelements; - -import com.vaadin.testbench.elements.InlineDateFieldElement; -import com.vaadin.testbench.elementsbase.ServerClass; - -/** - * @author Vaadin Ltd - * - */ -@ServerClass("com.vaadin.ui.InlineDateTimeField") -public class InlineDateTimeFieldElement extends InlineDateFieldElement { - -} diff --git a/uitest/src/test/java/com/vaadin/testbench/customelements/LoginFormElement.java b/uitest/src/test/java/com/vaadin/testbench/customelements/LoginFormElement.java deleted file mode 100644 index 59cd0444e7..0000000000 --- a/uitest/src/test/java/com/vaadin/testbench/customelements/LoginFormElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.vaadin.testbench.customelements; - -import com.vaadin.testbench.elements.AbstractSingleComponentContainerElement; -import com.vaadin.testbench.elementsbase.ServerClass; - -@ServerClass("com.vaadin.ui.LoginForm") -public class LoginFormElement extends AbstractSingleComponentContainerElement { - -} diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java index 26f94be717..942725b4b7 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java @@ -7,7 +7,7 @@ import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.LabelElement; import com.vaadin.tests.tb3.MultiBrowserTest; diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldElementTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldElementTest.java index cc572c0957..bbfd15e733 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldElementTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldElementTest.java @@ -5,7 +5,7 @@ import static org.hamcrest.core.Is.is; import org.junit.Test; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.DateFieldElement; import com.vaadin.tests.tb3.SingleBrowserTest; @@ -15,7 +15,7 @@ public class DateFieldElementTest extends SingleBrowserTest { public void dateFieldElementIsLocated() { openTestURL(); - assertThat($(DateFieldElement.class).all().size(), is(1)); + assertThat($(DateFieldElement.class).all().size(), is(2)); assertThat($(AbstractDateFieldElement.class).all().size(), is(2)); } diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java index 7e6955a024..dacbae3db1 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java @@ -21,7 +21,7 @@ import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.tests.tb3.MultiBrowserTest; diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java index adc4652522..aa4b3145a0 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java @@ -20,8 +20,7 @@ import java.io.IOException; import org.junit.Test; import org.openqa.selenium.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; -import com.vaadin.testbench.elements.DateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.tests.tb3.MultiBrowserTest; public class DateFieldPopupClosingOnDetachTest extends MultiBrowserTest { @@ -32,7 +31,7 @@ public class DateFieldPopupClosingOnDetachTest extends MultiBrowserTest { openTestURL(); // Open the DateField popup. - DateFieldElement df = $(AbstractDateFieldElement.class).first(); + AbstractDateFieldElement df = $(AbstractDateFieldElement.class).first(); df.findElement(By.tagName("button")).click(); // Test UI will remove the DateField after 1 second. diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java index 4e3119a3cf..ae87072854 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java @@ -10,8 +10,7 @@ import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.ExpectedConditions; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; -import com.vaadin.testbench.elements.DateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.tests.tb3.MultiBrowserTest; public class DateFieldPopupClosingTest extends MultiBrowserTest { @@ -70,7 +69,8 @@ public class DateFieldPopupClosingTest extends MultiBrowserTest { } private WebElement getToggleButton() { - DateFieldElement dateField = $(AbstractDateFieldElement.class).first(); + AbstractDateFieldElement dateField = $(AbstractDateFieldElement.class) + .first(); return dateField.findElement(By.tagName("button")); } diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java index 0d1ceb4545..9418a5011b 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java @@ -6,7 +6,7 @@ import org.junit.Test; import org.openqa.selenium.Keys; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.tests.tb3.MultiBrowserTest; diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java index ed9d110ac0..74b6825915 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java @@ -19,7 +19,7 @@ import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.CheckBoxElement; import com.vaadin.testbench.elements.DateFieldElement; import com.vaadin.tests.tb3.SingleBrowserTest; @@ -56,14 +56,14 @@ public class DateFieldWhenChangingValueAndEnablingParentTest * @param widgetEnabled * @param textInputEnabled */ - private void assertState(DateFieldElement id, boolean widgetEnabled, + private void assertState(AbstractDateFieldElement id, boolean widgetEnabled, boolean textInputEnabled) { assertDateFieldEnabled(id, widgetEnabled); assertTextInputEnabled(id, textInputEnabled); } - private void assertDateFieldEnabled(DateFieldElement id, + private void assertDateFieldEnabled(AbstractDateFieldElement id, boolean assertEnabled) { boolean hasClass = hasCssClass(id, "v-disabled"); boolean fieldEnabled = !hasClass; @@ -79,7 +79,8 @@ public class DateFieldWhenChangingValueAndEnablingParentTest } - private void assertTextInputEnabled(DateFieldElement id, boolean enabled) { + private void assertTextInputEnabled(AbstractDateFieldElement id, + boolean enabled) { String disabledAttr = id.findElement(By.xpath("./input")) .getAttribute("disabled"); boolean textinputEnabled = (disabledAttr == null); diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldElementTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldElementTest.java index 4b2b2719c4..51694f24cd 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldElementTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldElementTest.java @@ -5,8 +5,8 @@ import static org.hamcrest.core.Is.is; import org.junit.Test; -import com.vaadin.testbench.customelements.DateTimeFieldElement; -import com.vaadin.testbench.customelements.InlineDateTimeFieldElement; +import com.vaadin.testbench.elements.DateTimeFieldElement; +import com.vaadin.testbench.elements.InlineDateTimeFieldElement; import com.vaadin.tests.tb3.SingleBrowserTest; public class DateTimeFieldElementTest extends SingleBrowserTest { @@ -23,4 +23,4 @@ public class DateTimeFieldElementTest extends SingleBrowserTest { protected Class<?> getUIClass() { return DateTimeFieldElementUI.class; } -}
\ No newline at end of file +} diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldIsValidTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldIsValidTest.java index 986db81c93..06e8a146c0 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldIsValidTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldIsValidTest.java @@ -21,7 +21,7 @@ import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.tests.tb3.MultiBrowserTest; diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldKeyboardInputTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldKeyboardInputTest.java index 715e3e67f7..7dbdf73f89 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldKeyboardInputTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldKeyboardInputTest.java @@ -22,7 +22,7 @@ import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; -import com.vaadin.testbench.customelements.DateTimeFieldElement; +import com.vaadin.testbench.elements.DateTimeFieldElement; import com.vaadin.testbench.elements.LabelElement; import com.vaadin.tests.tb3.MultiBrowserTest; diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldPopupTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldPopupTest.java index 36db204835..2cbf297a43 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldPopupTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldPopupTest.java @@ -22,7 +22,7 @@ import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.ExpectedConditions; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.DateTimeFieldElement; +import com.vaadin.testbench.elements.DateTimeFieldElement; import com.vaadin.tests.tb3.MultiBrowserTest; public class DateTimeFieldPopupTest extends MultiBrowserTest { diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldReadOnlyTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldReadOnlyTest.java index a4e79ac95a..668c0a6123 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldReadOnlyTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldReadOnlyTest.java @@ -6,7 +6,7 @@ import org.junit.Test; import org.openqa.selenium.Keys; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; +import com.vaadin.testbench.elements.AbstractDateFieldElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.tests.tb3.MultiBrowserTest; diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java index 4b57b5663d..ebe6220a14 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java @@ -21,9 +21,9 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.DateTimeFieldElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.CheckBoxElement; +import com.vaadin.testbench.elements.DateTimeFieldElement; import com.vaadin.tests.tb3.SingleBrowserTest; public class DateTimeFieldWeekDaysTest extends SingleBrowserTest { diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/TimePopupSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/TimePopupSelectionTest.java index a6226de976..b10f2299c5 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/TimePopupSelectionTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/TimePopupSelectionTest.java @@ -24,7 +24,7 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Select; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.DateTimeFieldElement; +import com.vaadin.testbench.elements.DateTimeFieldElement; import com.vaadin.tests.tb3.MultiBrowserTest; /** diff --git a/uitest/src/test/java/com/vaadin/tests/components/loginform/LoginFormUITest.java b/uitest/src/test/java/com/vaadin/tests/components/loginform/LoginFormUITest.java index 9354a2e8e6..4648b750f1 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/loginform/LoginFormUITest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/loginform/LoginFormUITest.java @@ -5,8 +5,8 @@ import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import com.vaadin.testbench.customelements.LoginFormElement; import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.LoginFormElement; import com.vaadin.tests.tb3.SingleBrowserTest; public class LoginFormUITest extends SingleBrowserTest { diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java index ce4c9da090..ffb0445322 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java @@ -8,9 +8,9 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import com.vaadin.testbench.By; -import com.vaadin.testbench.customelements.AbstractDateFieldElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.ComboBoxElement; +import com.vaadin.testbench.elements.DateFieldElement; import com.vaadin.testbench.elements.NotificationElement; import com.vaadin.testbench.elements.TabSheetElement; import com.vaadin.testbench.elements.TableElement; @@ -187,13 +187,13 @@ public abstract class ThemeTest extends MultiBrowserTest { private void testDates() throws IOException { compareScreen("dates"); - $(AbstractDateFieldElement.class).id("datefield0").openPopup(); + $(DateFieldElement.class).id("datefield0").openPopup(); compareScreen("dates-first-popup"); - $(AbstractDateFieldElement.class).id("datefield1").openPopup(); + $(DateFieldElement.class).id("datefield1").openPopup(); compareScreen("dates-second-popup"); - $(AbstractDateFieldElement.class).id("datefield2").openPopup(); + $(DateFieldElement.class).id("datefield2").openPopup(); compareScreen("dates-third-popup"); - $(AbstractDateFieldElement.class).id("datefield3").openPopup(); + $(DateFieldElement.class).id("datefield3").openPopup(); compareScreen("dates-fourth-popup"); } } |