diff options
author | Anastasia Smirnova <anasmi@utu.fi> | 2018-03-13 02:20:58 -1200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-03-13 17:20:58 +0300 |
commit | 4fc7530ded4a3775e3e9c7343e026a624ce00079 (patch) | |
tree | 6af9607b4270ac6ba6f04d686ceaab89bf627413 /uitest/src/test | |
parent | e813c97e0bdc00c5542c9bf0f55eef65f34ac093 (diff) | |
download | vaadin-framework-4fc7530ded4a3775e3e9c7343e026a624ce00079.tar.gz vaadin-framework-4fc7530ded4a3775e3e9c7343e026a624ce00079.zip |
Native select add 'disabled' attribute (#10710)
* Adding disabled attribute to the NativeSelect
* Merge branch 'master' into nativeSelectDisabled
* Merge branch 'master' into nativeSelectDisabled
* Correct formatting issues
Diffstat (limited to 'uitest/src/test')
2 files changed, 26 insertions, 1 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectDisabledTest.java b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectDisabledTest.java new file mode 100644 index 0000000000..fe01ef90ad --- /dev/null +++ b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectDisabledTest.java @@ -0,0 +1,26 @@ +package com.vaadin.tests.components.nativeselect; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.NativeSelectElement; +import com.vaadin.tests.tb3.MultiBrowserTest; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class NativeSelectDisabledTest extends MultiBrowserTest { + + @Test + public void testDisabled() { + openTestURL(); + + NativeSelectElement el = $(NativeSelectElement.class).first(); + assertEquals(false, el.isEnabled()); + ButtonElement but = $(ButtonElement.class).first(); + but.click(); + assertEquals(true, el.isEnabled()); + assertEquals(null, el.getSelectElement().getAttribute("disabled")); + but.click(); + System.out.println(el.getSelectElement().getText()); + assertEquals("true", el.getSelectElement().getAttribute("disabled")); + } +}
\ No newline at end of file diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectInitTest.java b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectInitTest.java index 4f48d7a1ce..10a78e4fc5 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectInitTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectInitTest.java @@ -35,5 +35,4 @@ public class NativeSelectInitTest extends MultiBrowserTest { String selected = $(NativeSelectElement.class).first().getValue(); assertEquals("Bar", selected); } - } |