diff options
author | Knoobie <Knoobie@gmx.de> | 2017-10-20 10:11:10 +0200 |
---|---|---|
committer | Péter Török <31210544+torok-peter@users.noreply.github.com> | 2017-10-20 11:11:10 +0300 |
commit | cb85b628289d35619d512f519624e5b075dfc441 (patch) | |
tree | 9a02ec32d7c50ed1449cac0dbf19affa18fdc595 /uitest | |
parent | a9c83ba07e4dec90eb7d6e332b91adde9613ebb4 (diff) | |
download | vaadin-framework-cb85b628289d35619d512f519624e5b075dfc441.tar.gz vaadin-framework-cb85b628289d35619d512f519624e5b075dfc441.zip |
Improve role usage in grid (#10206)
* add role="row" and role="gridcell"
* optimize code and add additional rows for the header
* add simple test
* improve code and add rowgroup
* add debug log
* add more log to test
* remove debug test info and add role before appending to tr
* wording - change contains to contain
* create enum for magic strings, change comments and method signature
* rename enum to be singular and rename param roleName to role
* update javadoc, rename and make enum public
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java index cf2bdebb6f..2c8ddb3b01 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAriaRowcountTest.java @@ -18,9 +18,9 @@ package com.vaadin.tests.components.grid; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.GridElement; import com.vaadin.tests.tb3.SingleBrowserTest; -import org.junit.Assert; import org.junit.Test; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; /** @@ -36,6 +36,14 @@ public class GridAriaRowcountTest extends SingleBrowserTest { grid = $(GridElement.class).first(); + // default grid should contain at least one of each role + String gridHtml = grid.getHTML(); + assertTrue("Grid should contain a role=\"rowheader\"", gridHtml.contains("role=\"rowheader\"")); + assertTrue("Grid should contain a role=\"columnheader\"", gridHtml.contains("role=\"columnheader\"")); + assertTrue("Grid should contain a role=\"row\"", gridHtml.contains("role=\"row\"")); + assertTrue("Grid should contain a role=\"gridcell\"", gridHtml.contains("role=\"gridcell\"")); + assertTrue("Grid should contain a role=\"rowgroup\"", gridHtml.contains("role=\"rowgroup\"")); + // default with 1 header row and 2 body rows. assertTrue("Grid should have 3 rows", containsRows(3)); |