diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2021-03-26 16:37:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-26 16:37:44 +0200 |
commit | c1dcafe7ff69fb5497bef82225ebb872260acf39 (patch) | |
tree | a7f1ef8a83604a544fc1636a361d9835298c3382 /uitest | |
parent | 3a9f6be2002ac2f8f6d5568517e6b4009d2518d8 (diff) | |
download | vaadin-framework-c1dcafe7ff69fb5497bef82225ebb872260acf39.tar.gz vaadin-framework-c1dcafe7ff69fb5497bef82225ebb872260acf39.zip |
Include compatibility tests in validation builds (#12250)
Diffstat (limited to 'uitest')
81 files changed, 378 insertions, 159 deletions
diff --git a/uitest/pom.xml b/uitest/pom.xml index 0dd06d073e..8b8d4be645 100644 --- a/uitest/pom.xml +++ b/uitest/pom.xml @@ -308,6 +308,17 @@ </configuration> <executions> <execution> + <id>compatibility</id> + <configuration> + <includes> + <include>**/LimitedTB3TestsCompatibility.java</include> + </includes> + </configuration> + <goals> + <goal>integration-test</goal> + </goals> + </execution> + <execution> <id>no-components</id> <configuration> <includes> @@ -344,6 +355,7 @@ <id>verify</id> <configuration> <includes> + <include>**/LimitedTB3TestsCompatibility.java</include> <include>**/LimitedTB3TestsNonComponent.java</include> <include>**/LimitedTB3TestsComponentsNoGrid.java</include> <include>**/LimitedTB3TestsComponentsGridOnly.java</include> diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-OnMouseOverHiddenToggle.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-OnMouseOverHiddenToggle.png Binary files differnew file mode 100644 index 0000000000..92b6c09e04 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-OnMouseOverHiddenToggle.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-OnMouseOverNotHiddenToggle.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-OnMouseOverNotHiddenToggle.png Binary files differnew file mode 100644 index 0000000000..e1060bb90d --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-OnMouseOverNotHiddenToggle.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarClosed.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarClosed.png Binary files differnew file mode 100644 index 0000000000..58a42bdfbb --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarClosed.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarClosed2.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarClosed2.png Binary files differnew file mode 100644 index 0000000000..f20af90479 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarClosed2.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarOpen.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarOpen.png Binary files differnew file mode 100644 index 0000000000..51433d01b7 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-SidebarOpen.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-TogglesTriggered.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-TogglesTriggered.png Binary files differnew file mode 100644 index 0000000000..d141678f45 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValoDark_ANY_Chrome__tests-valo-dark-TogglesTriggered.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-OnMouseOverHiddenToggle.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-OnMouseOverHiddenToggle.png Binary files differnew file mode 100644 index 0000000000..913ccbc403 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-OnMouseOverHiddenToggle.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-OnMouseOverNotHiddenToggle.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-OnMouseOverNotHiddenToggle.png Binary files differnew file mode 100644 index 0000000000..f8c1088b11 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-OnMouseOverNotHiddenToggle.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarClosed.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarClosed.png Binary files differnew file mode 100644 index 0000000000..f1fb887234 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarClosed.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarClosed2.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarClosed2.png Binary files differnew file mode 100644 index 0000000000..9d0ac39e2f --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarClosed2.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarOpen.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarOpen.png Binary files differnew file mode 100644 index 0000000000..3d5198040e --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-SidebarOpen.png diff --git a/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-TogglesTriggered.png b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-TogglesTriggered.png Binary files differnew file mode 100644 index 0000000000..b105f3f656 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSidebarThemeTest-testValo_ANY_Chrome__valo-TogglesTriggered.png diff --git a/uitest/reference-screenshots/chrome/GridSortingIndicatorsTest-testSortingIndicators_ANY_Chrome__initialSort.png b/uitest/reference-screenshots/chrome/GridSortingIndicatorsTest-testSortingIndicators_ANY_Chrome__initialSort.png Binary files differnew file mode 100644 index 0000000000..26d6e34e17 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSortingIndicatorsTest-testSortingIndicators_ANY_Chrome__initialSort.png diff --git a/uitest/reference-screenshots/chrome/GridSortingIndicatorsTest-testSortingIndicators_ANY_Chrome__reversedSort.png b/uitest/reference-screenshots/chrome/GridSortingIndicatorsTest-testSortingIndicators_ANY_Chrome__reversedSort.png Binary files differnew file mode 100644 index 0000000000..84320c6af9 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridSortingIndicatorsTest-testSortingIndicators_ANY_Chrome__reversedSort.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_initial.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_initial.png Binary files differnew file mode 100644 index 0000000000..bcced2582f --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_initial.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_one-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_one-invalid.png Binary files differnew file mode 100644 index 0000000000..8d48641439 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_one-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_two-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_two-invalid.png Binary files differnew file mode 100644 index 0000000000..7c654d8b52 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___base_two-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_initial.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_initial.png Binary files differnew file mode 100644 index 0000000000..ee7c4f0496 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_initial.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_one-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_one-invalid.png Binary files differnew file mode 100644 index 0000000000..958b6c0002 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_one-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_two-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_two-invalid.png Binary files differnew file mode 100644 index 0000000000..04659bc31e --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___chameleon_two-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_initial.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_initial.png Binary files differnew file mode 100644 index 0000000000..1ea1a7221c --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_initial.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_one-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_one-invalid.png Binary files differnew file mode 100644 index 0000000000..87fb390abe --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_one-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_two-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_two-invalid.png Binary files differnew file mode 100644 index 0000000000..26d4f70838 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___reindeer_two-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_initial.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_initial.png Binary files differnew file mode 100644 index 0000000000..52f97d97f8 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_initial.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_one-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_one-invalid.png Binary files differnew file mode 100644 index 0000000000..f1b02ab0b9 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_one-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_two-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_two-invalid.png Binary files differnew file mode 100644 index 0000000000..54c9316ec4 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___runo_two-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_initial.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_initial.png Binary files differnew file mode 100644 index 0000000000..fa079bbf2a --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_initial.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_one-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_one-invalid.png Binary files differnew file mode 100644 index 0000000000..12f93737ee --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_one-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_two-invalid.png b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_two-invalid.png Binary files differnew file mode 100644 index 0000000000..9f7be0341c --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-editor_ANY_Chrome___valo_two-invalid.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___base_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___base_basic.png Binary files differnew file mode 100644 index 0000000000..fd9292cc18 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___base_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___chameleon_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___chameleon_basic.png Binary files differnew file mode 100644 index 0000000000..8c4fe1341e --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___chameleon_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___reindeer_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___reindeer_basic.png Binary files differnew file mode 100644 index 0000000000..2ce694e66b --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___reindeer_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___runo_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___runo_basic.png Binary files differnew file mode 100644 index 0000000000..7e5c423dd4 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___runo_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___valo_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___valo_basic.png Binary files differnew file mode 100644 index 0000000000..ef9ef53f4f --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-grid_ANY_Chrome___valo_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_additional-header.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_additional-header.png Binary files differnew file mode 100644 index 0000000000..88ca4036e7 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_additional-header.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_basic.png Binary files differnew file mode 100644 index 0000000000..1ad5e6922d --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_sorted-age.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_sorted-age.png Binary files differnew file mode 100644 index 0000000000..f131a4c46d --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_sorted-age.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_sorted-last-name.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_sorted-last-name.png Binary files differnew file mode 100644 index 0000000000..1c10583232 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___base_sorted-last-name.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_additional-header.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_additional-header.png Binary files differnew file mode 100644 index 0000000000..942d0a8267 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_additional-header.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_basic.png Binary files differnew file mode 100644 index 0000000000..11fbbfc5f2 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_sorted-age.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_sorted-age.png Binary files differnew file mode 100644 index 0000000000..44556e8163 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_sorted-age.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_sorted-last-name.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_sorted-last-name.png Binary files differnew file mode 100644 index 0000000000..72b739886e --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___chameleon_sorted-last-name.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_additional-header.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_additional-header.png Binary files differnew file mode 100644 index 0000000000..2a262c6369 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_additional-header.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_basic.png Binary files differnew file mode 100644 index 0000000000..f7a619aec2 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_sorted-age.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_sorted-age.png Binary files differnew file mode 100644 index 0000000000..07247ebfb0 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_sorted-age.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_sorted-last-name.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_sorted-last-name.png Binary files differnew file mode 100644 index 0000000000..127fc52c51 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___reindeer_sorted-last-name.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_additional-header.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_additional-header.png Binary files differnew file mode 100644 index 0000000000..57ba0c1df7 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_additional-header.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_basic.png Binary files differnew file mode 100644 index 0000000000..f6681b9591 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_sorted-age.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_sorted-age.png Binary files differnew file mode 100644 index 0000000000..22e5582cf6 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_sorted-age.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_sorted-last-name.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_sorted-last-name.png Binary files differnew file mode 100644 index 0000000000..c6775e165f --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___runo_sorted-last-name.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_additional-header.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_additional-header.png Binary files differnew file mode 100644 index 0000000000..d0619040d5 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_additional-header.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_basic.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_basic.png Binary files differnew file mode 100644 index 0000000000..e3738434ea --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_basic.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_sorted-age.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_sorted-age.png Binary files differnew file mode 100644 index 0000000000..f2ae6630c8 --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_sorted-age.png diff --git a/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_sorted-last-name.png b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_sorted-last-name.png Binary files differnew file mode 100644 index 0000000000..aa79d1017e --- /dev/null +++ b/uitest/reference-screenshots/chrome/GridThemeUITest-headerAndFooter_ANY_Chrome___valo_sorted-last-name.png diff --git a/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testContextMenuWithAndWithoutIcon_ANY_Chrome__caption-only-and-has-icon.png b/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testContextMenuWithAndWithoutIcon_ANY_Chrome__caption-only-and-has-icon.png Binary files differnew file mode 100644 index 0000000000..2db9ed9732 --- /dev/null +++ b/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testContextMenuWithAndWithoutIcon_ANY_Chrome__caption-only-and-has-icon.png diff --git a/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testContextRemoveIcon_ANY_Chrome__contextmenu-noicon.png b/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testContextRemoveIcon_ANY_Chrome__contextmenu-noicon.png Binary files differnew file mode 100644 index 0000000000..361d154036 --- /dev/null +++ b/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testContextRemoveIcon_ANY_Chrome__contextmenu-noicon.png diff --git a/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testSimpleContextMenu_ANY_Chrome__contextmenu-noicon.png b/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testSimpleContextMenu_ANY_Chrome__contextmenu-noicon.png Binary files differnew file mode 100644 index 0000000000..cbf7252c1e --- /dev/null +++ b/uitest/reference-screenshots/chrome/TreeContextMenuAndIconsTest-testSimpleContextMenu_ANY_Chrome__contextmenu-noicon.png diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java index 6b7e9ae182..cb9d4a25bd 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java @@ -14,6 +14,8 @@ import java.util.Map; import java.util.Random; import com.vaadin.annotations.Theme; +import com.vaadin.server.DefaultErrorHandler; +import com.vaadin.server.ErrorHandler; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.shared.ui.ContentMode; import com.vaadin.tests.components.AbstractComponentTest; @@ -34,6 +36,8 @@ import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException; import com.vaadin.v7.data.sort.Sort; import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.util.IndexedContainer; +import com.vaadin.v7.event.FieldEvents.BlurNotifier; +import com.vaadin.v7.event.FieldEvents.FocusNotifier; import com.vaadin.v7.event.ItemClickEvent; import com.vaadin.v7.event.ItemClickEvent.ItemClickListener; import com.vaadin.v7.event.SelectionEvent; @@ -74,7 +78,8 @@ import com.vaadin.v7.ui.renderers.NumberRenderer; * @author Vaadin Ltd */ @Theme("valo") -public class GridBasicFeatures extends AbstractComponentTest<Grid> { +public class GridBasicFeatures extends AbstractComponentTest<Grid> + implements ErrorHandler { public static final String ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4 = "Row numbers for 3/4"; public static final String ROW_STYLE_GENERATOR_NONE = "None"; @@ -232,6 +237,59 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { } }; + public GridBasicFeatures() { + super(); + setErrorHandler(this); + } + + @Override + protected void createActions() { + super.createActions(); + createFocusActions(); + } + + private void createFocusActions() { + focusListenerCommand = new Command<Grid, Boolean>() { + + private boolean focusListenerAdded = false; + + @Override + public void execute(Grid c, Boolean value, Object data) { + FocusNotifier focusNotifier = c; + if (value) { + focusNotifier.addFocusListener(GridBasicFeatures.this); + focusListenerAdded = true; + } else if (focusListenerAdded) { + focusNotifier.removeFocusListener(GridBasicFeatures.this); + focusListenerAdded = false; + } + } + }; + blurListenerCommand = new Command<Grid, Boolean>() { + + private boolean blurListenerAdded = false; + + @Override + public void execute(Grid c, Boolean value, Object data) { + BlurNotifier bn = c; + if (value) { + bn.addBlurListener(GridBasicFeatures.this); + blurListenerAdded = true; + } else if (blurListenerAdded) { + bn.removeBlurListener(GridBasicFeatures.this); + blurListenerAdded = false; + } + } + }; + + if (FocusNotifier.class.isAssignableFrom(getTestClass())) { + createFocusListener(CATEGORY_LISTENERS); + } + if (BlurNotifier.class.isAssignableFrom(getTestClass())) { + createBlurListener(CATEGORY_LISTENERS); + } + } + @Override @SuppressWarnings("unchecked") protected Grid constructComponent() { @@ -654,10 +712,10 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { }); LinkedHashMap<String, ContentMode> contentModes = new LinkedHashMap<String, ContentMode>(); - contentModes.put("None", null); + contentModes.put("None (Default)", null); // Abusing an unused value for this special case contentModes.put("Plain text", ContentMode.TEXT); - contentModes.put("Preformatted(Default)", ContentMode.PREFORMATTED); + contentModes.put("Preformatted", ContentMode.PREFORMATTED); contentModes.put("HTML", ContentMode.HTML); createSelectAction("Row description generator", "State", contentModes, @@ -1264,7 +1322,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { } }); - createClickAction("All columns expanding, Col 0 has max width of 30px", + createClickAction("All columns expanding, Col 0 has max width of 40px", "Columns", new Command<Grid, Boolean>() { @Override @@ -1272,7 +1330,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { for (Column col : grid.getColumns()) { col.setWidthUndefined(); } - grid.getColumns().get(0).setMaximumWidth(30); + grid.getColumns().get(0).setMaximumWidth(40); } }, null); createBooleanAction("Simple resize mode", "Columns", false, @@ -1653,4 +1711,14 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { return Grid.class; } + @Override + public void error(com.vaadin.server.ErrorEvent event) { + final Throwable throwable = DefaultErrorHandler + .findRelevantThrowable(event.getThrowable()); + + log("Exception occurred, " + throwable.getClass().getName() + ": " + + throwable.getMessage()); + throwable.printStackTrace(); + } + } diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/LimitedTB3TestsCompatibility.java b/uitest/src/test/java/com/vaadin/tests/tb3/LimitedTB3TestsCompatibility.java new file mode 100644 index 0000000000..0f42c2b066 --- /dev/null +++ b/uitest/src/test/java/com/vaadin/tests/tb3/LimitedTB3TestsCompatibility.java @@ -0,0 +1,29 @@ +package com.vaadin.tests.tb3; + +import java.io.IOException; + +import org.junit.runner.RunWith; +import org.junit.runners.model.InitializationError; + +import com.vaadin.tests.tb3.LimitedTB3TestsCompatibility.LimitedTB3TestsCompatibilitySuite; + +/** + * Test consisting of all TB3 tests within the compatibility package + * com.vaadin.v7.tests (classes extending AbstractTB3Test). + * + * @author Vaadin Ltd + */ +@RunWith(LimitedTB3TestsCompatibilitySuite.class) +public class LimitedTB3TestsCompatibility { + + public static class LimitedTB3TestsCompatibilitySuite extends TB3TestSuite { + + public LimitedTB3TestsCompatibilitySuite(Class<?> klass) + throws InitializationError, IOException { + super(klass, AbstractTB3Test.class, "com.vaadin.v7.tests", + new String[] {}); + } + + } + +} diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridClientRenderers.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridClientRenderers.java index 3e53fab2e9..bb714c598b 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridClientRenderers.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridClientRenderers.java @@ -137,7 +137,7 @@ public class GridClientRenderers extends MultiBrowserTest { // Chrome uses RGB instead of RGBA String colorRed = "rgba(255, 0, 0, 1)"; String colorWhite = "rgba(255, 255, 255, 1)"; - String colorDark = "rgba(239, 240, 241, 1)"; + String colorDark = "rgba(245, 245, 245, 1)"; openTestURL(); @@ -173,7 +173,7 @@ public class GridClientRenderers extends MultiBrowserTest { // Cell should no longer be red backgroundColor = cell.getCssValue("backgroundColor"); - assertTrue("Background color was not reset", + assertTrue("Background color was not reset: " + backgroundColor, backgroundColor.equals(colorWhite) || backgroundColor.equals(colorDark)); } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java index f0795b2a20..fd3c0ee16b 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridHeightTest.java @@ -145,7 +145,7 @@ public class GridHeightTest extends MultiBrowserTest { } else if (GridHeight.FULL.equals(detailsRowHeight)) { result = 131; } else if (GridHeight.UNDEFINED.equals(detailsRowHeight)) { - result = 100; + result = 136; } } else if (GridHeight.ROW3.equals(gridHeight) || GridHeight.FULL.equals(gridHeight)) { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridLayoutDetailsRowResizeTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridLayoutDetailsRowResizeTest.java index 16cd321424..c34b13e783 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridLayoutDetailsRowResizeTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridLayoutDetailsRowResizeTest.java @@ -74,7 +74,7 @@ public class GridLayoutDetailsRowResizeTest extends MultiBrowserTest { @Test public void testMultipleDetailsRows() { - openTestURL(); + openTestURL("theme=reindeer"); // doesn't fit with Valo waitForElementPresent(By.className("v-grid")); ButtonElement detailsButton = $(ButtonElement.class) @@ -138,8 +138,9 @@ public class GridLayoutDetailsRowResizeTest extends MultiBrowserTest { private void assertDetailsRowHeight(int layoutHeight) { // check that details row height matches layout height (1px leeway) + int cellBordersHeight = 2; WebElement detailsRow = findElement(By.className("v-grid-spacer")); assertThat("Unexpected details row height", (double) layoutHeight, - closeTo(detailsRow.getSize().height, 1d)); + closeTo(detailsRow.getSize().height - cellBordersHeight, 1d)); } } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java index 8a243bef18..4881f1b98c 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeUITest.java @@ -6,9 +6,9 @@ import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; +import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.DateFieldElement; import com.vaadin.testbench.elements.GridElement; -import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.GridElement.GridCellElement; import com.vaadin.testbench.elements.GridElement.GridEditorElement; import com.vaadin.testbench.elements.NativeSelectElement; @@ -70,15 +70,13 @@ public class GridThemeUITest extends MultiBrowserThemeTest { private void openEditor(GridCellElement targetCell) { new Actions(getDriver()).doubleClick(targetCell).perform(); try { - if (grid.getEditor().isDisplayed()) { - return; - } + waitForElementPresent(By.className("v-grid-editor")); } catch (Exception e) { - + // Double-click is flaky, try again... + new Actions(getDriver()).doubleClick(targetCell).perform(); + waitForElementPresent(By.className("v-grid-editor")); } - // Try again if IE happen to fail.. - new Actions(getDriver()).doubleClick(targetCell).perform(); } private void selectPage(String string) { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/WidgetRenderersTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/WidgetRenderersTest.java index 463c7226f3..8033a81940 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/WidgetRenderersTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/WidgetRenderersTest.java @@ -11,8 +11,8 @@ import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedCondition; import com.vaadin.testbench.By; -import com.vaadin.testbench.elements.GridElement; import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.GridElement; import com.vaadin.testbench.elements.GridElement.GridCellElement; import com.vaadin.testbench.elements.NotificationElement; import com.vaadin.testbench.parallel.TestCategory; @@ -56,7 +56,7 @@ public class WidgetRenderersTest extends MultiBrowserTest { buttonCell.isFocused()); // avoid clicking on the button - buttonCell.click(buttonCell.getSize().getWidth() - 10, 5); + buttonCell.click(); assertTrue("cell should be focused after focusing", buttonCell.isFocused()); diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java index ad0f37a878..aa0618809b 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java @@ -144,19 +144,39 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest { protected void dragAndDropDefaultColumnHeader(int draggedColumnHeaderIndex, int onTopOfColumnHeaderIndex, CellSide cellSide) { - GridCellElement columnHeader = getDefaultColumnHeader( + GridCellElement dragHeaderCell = getDefaultColumnHeader( + draggedColumnHeaderIndex); + GridCellElement targetHeaderCell = getDefaultColumnHeader( onTopOfColumnHeaderIndex); - new Actions(getDriver()) - .clickAndHold(getDefaultColumnHeader(draggedColumnHeaderIndex)) - .moveToElement(columnHeader, getHorizontalOffsetForDragAndDrop( - columnHeader, cellSide), 0) - .release().perform(); + int horizontalOffsetForDragAndDrop = getHorizontalOffsetForDragAndDrop( + targetHeaderCell, cellSide); + if (dragHeaderCell.findElements(By.className("gwt-HTML")).isEmpty()) { + // no selectable header caption, drag freely + new Actions(getDriver()).clickAndHold(dragHeaderCell) + .moveToElement(targetHeaderCell, + horizontalOffsetForDragAndDrop, 0) + .release().perform(); + } else { + // avoid clicking on the caption or the text gets selected and the + // drag won't happen + WebElement dragHeaderCaption = dragHeaderCell + .findElement(By.className("gwt-HTML")); + new Actions(getDriver()) + .moveToElement(dragHeaderCaption, + dragHeaderCaption.getSize().getWidth() + 5, 5) + .clickAndHold() + .moveToElement(targetHeaderCell, + horizontalOffsetForDragAndDrop, 0) + .release().perform(); + } } private int getHorizontalOffsetForDragAndDrop(GridCellElement columnHeader, CellSide cellSide) { if (cellSide == CellSide.LEFT) { - return 5; + // FIXME: Selenium drag is handled differently than manual drag for + // some reason, this should work with 5 but doesn't. + return -1; } else { int half = columnHeader.getSize().getWidth() / 2; return half + (half / 2); @@ -166,27 +186,57 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest { protected void dragAndDropColumnHeader(int headerRow, int draggedColumnHeaderIndex, int onTopOfColumnHeaderIndex, CellSide cellSide) { - GridCellElement headerCell = getGridElement().getHeaderCell(headerRow, - onTopOfColumnHeaderIndex); - new Actions(getDriver()) - .clickAndHold(getGridElement().getHeaderCell(headerRow, - draggedColumnHeaderIndex)) - .moveToElement(headerCell, - getHorizontalOffsetForDragAndDrop(headerCell, cellSide), - 0) - .release().perform(); + GridCellElement dragHeaderCell = getGridElement() + .getHeaderCell(headerRow, draggedColumnHeaderIndex); + GridCellElement targetHeaderCell = getGridElement() + .getHeaderCell(headerRow, onTopOfColumnHeaderIndex); + int horizontalOffsetForDragAndDrop = getHorizontalOffsetForDragAndDrop( + targetHeaderCell, cellSide); + if (dragHeaderCell.findElements(By.className("gwt-HTML")).isEmpty()) { + // no selectable header caption, drag freely + new Actions(getDriver()).clickAndHold(dragHeaderCell) + .moveToElement(targetHeaderCell, + horizontalOffsetForDragAndDrop, 0) + .release().perform(); + } else { + // avoid clicking on the caption or the text gets selected and the + // drag won't happen + WebElement dragHeaderCaption = dragHeaderCell + .findElement(By.className("gwt-HTML")); + new Actions(getDriver()) + .moveToElement(dragHeaderCaption, + dragHeaderCaption.getSize().getWidth() + 5, 5) + .clickAndHold() + .moveToElement(targetHeaderCell, + horizontalOffsetForDragAndDrop, 0) + .release().perform(); + } } protected void dragAndDropColumnHeader(int headerRow, int draggedColumnHeaderIndex, int onTopOfColumnHeaderIndex, int horizontalOffset) { - GridCellElement headerCell = getGridElement().getHeaderCell(headerRow, - onTopOfColumnHeaderIndex); - new Actions(getDriver()) - .clickAndHold(getGridElement().getHeaderCell(headerRow, - draggedColumnHeaderIndex)) - .moveToElement(headerCell, horizontalOffset, 0).release() - .perform(); + GridCellElement dragHeaderCell = getGridElement() + .getHeaderCell(headerRow, draggedColumnHeaderIndex); + GridCellElement targetHeaderCell = getGridElement() + .getHeaderCell(headerRow, onTopOfColumnHeaderIndex); + if (dragHeaderCell.findElements(By.className("gwt-HTML")).isEmpty()) { + // no selectable header caption, drag freely + new Actions(getDriver()).clickAndHold(dragHeaderCell) + .moveToElement(targetHeaderCell, horizontalOffset, 0) + .release().perform(); + } else { + // avoid clicking on the caption or the text gets selected and the + // drag won't happen + WebElement dragHeaderCaption = dragHeaderCell + .findElement(By.className("gwt-HTML")); + new Actions(getDriver()) + .moveToElement(dragHeaderCaption, + dragHeaderCaption.getSize().getWidth() + 5, 5) + .clickAndHold() + .moveToElement(targetHeaderCell, horizontalOffset, 0) + .release().perform(); + } } protected void assertColumnIsSorted(int index) { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnHidingTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnHidingTest.java index a3648cacf6..1ac129956c 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnHidingTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnHidingTest.java @@ -855,7 +855,7 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest { verifySidebarOpened(); // Click somewhere far from Grid. new Actions(getDriver()) - .moveToElement(findElement(By.className("v-app")), 600, 600) + .moveToElement(findElement(By.className("v-app")), 600, 200) .click().perform(); verifySidebarClosed(); } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnReorderTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnReorderTest.java index bef030d96f..2df40cba85 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnReorderTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridColumnReorderTest.java @@ -309,35 +309,47 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest { selectMenuPath("Component", "Header", "Append row"); selectMenuPath("Component", "Header", "Append row"); selectMenuPath("Component", "Header", "Row 2", "Join columns 3, 4, 5"); + assertColumnHeaderOrder(0, 1, 2, 3, 4, 5); + + // when then dragAndDropColumnHeader(0, 0, 4, CellSide.RIGHT); + // joined cells push drag to apply after the join + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); + selectMenuPath("Component", "Header", "Row 3", "Join columns 1, 2"); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 4, 5); + // new join doesn't affect column order + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); - // when then - dragAndDropColumnHeader(0, 1, 4, CellSide.LEFT); + dragAndDropColumnHeader(0, 0, 4, CellSide.LEFT); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 4, 5); + // joined cells push drag to apply before any joins + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); dragAndDropColumnHeader(0, 2, 4, CellSide.LEFT); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 4, 5); + // could drag within the first join but not out of the second + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); dragAndDropColumnHeader(0, 3, 4, CellSide.RIGHT); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 5, 4); + // second join not involved so drag within first join succeeds + assertColumnHeaderOrder(1, 2, 3, 5, 4, 0); dragAndDropColumnHeader(0, 4, 2, CellSide.RIGHT); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 4, 5); + // back to previous order + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); dragAndDropColumnHeader(2, 3, 4, CellSide.RIGHT); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 5, 4); + // second join not involved so drag within first join succeeds + assertColumnHeaderOrder(1, 2, 3, 5, 4, 0); dragAndDropColumnHeader(2, 4, 2, CellSide.RIGHT); scrollGridHorizontallyTo(0); - assertColumnHeaderOrder(1, 2, 3, 4, 5); + // back to previous order + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); } @Test @@ -348,22 +360,34 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest { selectMenuPath("Component", "Header", "Append row"); selectMenuPath("Component", "Header", "Append row"); selectMenuPath("Component", "Header", "Row 2", "Join columns 3, 4, 5"); + assertColumnHeaderOrder(0, 1, 2, 3, 4, 5); + + // move first column after the join dragAndDropColumnHeader(0, 0, 4, CellSide.RIGHT); scrollGridHorizontallyTo(0); + assertColumnHeaderOrder(1, 2, 3, 4, 5, 0); + + // move current second column after the join dragAndDropColumnHeader(0, 1, 4, CellSide.RIGHT); scrollGridHorizontallyTo(0); + assertColumnHeaderOrder(1, 3, 4, 5, 0, 2); + selectMenuPath("Component", "Header", "Row 3", "Join columns 1, 2"); - assertColumnHeaderOrder(1, 3, 4, 5, 2); + // column headers 3 and 4 combined, no effect to order + assertColumnHeaderOrder(1, 3, 4, 5, 0, 2); // when then dragAndDropColumnHeader(0, 1, 4, CellSide.LEFT); - assertColumnHeaderOrder(1, 4, 3, 5, 2); + // drag stops to the farthest point within the join + assertColumnHeaderOrder(1, 4, 3, 5, 0, 2); dragAndDropColumnHeader(0, 2, 4, CellSide.LEFT); - assertColumnHeaderOrder(1, 4, 3, 5, 2); + // second attempt with the already dragged column makes no difference + assertColumnHeaderOrder(1, 4, 3, 5, 0, 2); dragAndDropColumnHeader(0, 2, 0, CellSide.LEFT); - assertColumnHeaderOrder(1, 3, 4, 5, 2); + // drag stops to the earliest point within the join + assertColumnHeaderOrder(1, 3, 4, 5, 0, 2); } @Test @@ -378,7 +402,8 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest { dragAndDropColumnHeader(0, 3, 1, CellSide.RIGHT); // then - assertColumnHeaderOrder(0, 3, 1, 2, 4); + // joined cells push the drag to apply after the join + assertColumnHeaderOrder(0, 1, 2, 3, 4); } @Test @@ -589,14 +614,16 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest { selectMenuPath("Component", "Header", "Row 2", "Join columns 3, 4, 5"); selectMenuPath("Component", "Header", "Append row"); selectMenuPath("Component", "Header", "Row 3", "Join columns 1, 2"); - assertColumnHeaderOrder(0, 1, 2, 3, 4); + assertColumnHeaderOrder(0, 1, 2, 3, 4, 5); // when dragAndDropColumnHeader(1, 3, 1, CellSide.RIGHT); scrollGridHorizontallyTo(0); // then - assertColumnHeaderOrder(0, 3, 4, 5, 1); + // attempted to drag out of join, no change + // it's not possible to drag the whole joined block + assertColumnHeaderOrder(0, 1, 2, 3, 4, 5); // when scrollGridHorizontallyTo(100); @@ -604,14 +631,16 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest { scrollGridHorizontallyTo(0); // then - assertColumnHeaderOrder(0, 1, 2, 3, 4); + // attempted to drag out of join, moved as leftmost within + assertColumnHeaderOrder(0, 1, 2, 4, 3, 5); // when dragAndDropColumnHeader(0, 0, 3, CellSide.LEFT); scrollGridHorizontallyTo(0); // then - assertColumnHeaderOrder(1, 2, 0, 3, 4); + // dragged from outside of joins to between the joins, no problem + assertColumnHeaderOrder(1, 2, 0, 4, 3, 5); } private void toggleSortableColumn(int index) { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java index ac20e65f51..67d85b9893 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java @@ -15,120 +15,133 @@ public class GridDescriptionGeneratorTest extends GridBasicFeaturesTest { @Test public void testCellDescription() { openTestURL(); - selectMenuPath("Component", "State", "Cell description generator"); + selectCellGenerator("HTML"); - getGridElement().getCell(1, 0).showTooltip(); - String tooltipText = findElement(By.className("v-tooltip-text")) - .getText(); + showCellTooltip(1, 0); assertEquals("Tooltip text", "Cell tooltip for row 1, column 0", - tooltipText); + getTooltipText()); - getGridElement().getCell(1, 1).showTooltip(); + showCellTooltip(1, 1); assertTrue("Tooltip should not be present in cell (1, 1) ", - findElement(By.className("v-tooltip-text")).getText() - .isEmpty()); + getTooltipText().isEmpty()); } @Test public void testRowDescription() { openTestURL(); - selectMenuPath("Component", "State", "Row description generator"); + selectRowGenerator("HTML"); - getGridElement().getCell(5, 3).showTooltip(); - String tooltipText = findElement(By.className("v-tooltip-text")) - .getText(); - assertEquals("Tooltip text", "Row tooltip for row 5", tooltipText); + showCellTooltip(5, 3); + assertEquals("Tooltip text", "Row tooltip for row 5", getTooltipText()); - getGridElement().getCell(15, 3).showTooltip(); - tooltipText = findElement(By.className("v-tooltip-text")).getText(); - assertEquals("Tooltip text", "Row tooltip for row 15", tooltipText); + showCellTooltip(15, 3); + assertEquals("Tooltip text", "Row tooltip for row 15", + getTooltipText()); } @Test public void testRowAndCellDescription() { openTestURL(); - selectMenuPath("Component", "State", "Row description generator"); - selectMenuPath("Component", "State", "Cell description generator"); + selectRowGenerator("HTML"); + selectCellGenerator("HTML"); - getGridElement().getCell(5, 0).showTooltip(); - String tooltipText = findElement(By.className("v-tooltip-text")) - .getText(); + showCellTooltip(5, 0); assertEquals("Tooltip text", "Cell tooltip for row 5, column 0", - tooltipText); + getTooltipText()); - getGridElement().getCell(5, 3).showTooltip(); - tooltipText = findElement(By.className("v-tooltip-text")).getText(); - assertEquals("Tooltip text", "Row tooltip for row 5", tooltipText); + showCellTooltip(5, 3); + assertEquals("Tooltip text", "Row tooltip for row 5", getTooltipText()); } @Test - public void testContentTypes() { + public void testContentTypesCell() { openTestURL(); - - selectCellGenerator("Default"); - showCellTooltip(1, 0); - /* - * When porting this to the v7 version in Framework 8, the default - * should be changed to PREFORMATTED to preserve the more secure default - * that has accidentally been used there. - */ - assertHtmlTooltipShown(); - - selectRowGenerator("Default"); - showCellTooltip(1, 1); - /* - * When porting this to the v7 version in Framework 8, the default - * should be changed to PREFORMATTED to preserve the more secure default - * that has accidentally been used there. - */ - assertHtmlTooltipShown(); + assertEquals("Unexpected tooltip,", "", getTooltipText()); selectCellGenerator("Plain text"); showCellTooltip(2, 0); assertPlainTooltipShown(); - selectRowGenerator("Plain text"); - showCellTooltip(2, 1); - assertPlainTooltipShown(); - selectCellGenerator("Preformatted"); showCellTooltip(3, 0); assertPreTooltipShown(); - selectRowGenerator("Preformatted"); - showCellTooltip(3, 1); - assertPreTooltipShown(); - selectCellGenerator("HTML"); showCellTooltip(4, 0); assertHtmlTooltipShown(); + selectCellGenerator("None (Default)"); + showCellTooltip(1, 0); + assertEquals("Unexpected tooltip,", "", getTooltipText()); + } + + @Test + public void testContentTypesRow() { + openTestURL(); + assertEquals("Unexpected tooltip,", "", getTooltipText()); + + selectRowGenerator("Plain text"); + showCellTooltip(2, 1); + assertPlainTooltipShown(); + + selectRowGenerator("Preformatted"); + showCellTooltip(3, 1); + assertPreTooltipShown(); + selectRowGenerator("HTML"); showCellTooltip(4, 1); assertHtmlTooltipShown(); + + selectRowGenerator("None (Default)"); + showCellTooltip(1, 1); + assertEquals("Unexpected tooltip,", "", getTooltipText()); } private void assertPreTooltipShown() { - assertTrue("Tooltip should contain <b> as text", - getTooltipText().contains("<b>")); - assertTrue("Tooltip should contain a newline", - getTooltipText().contains("\n")); + try { + assertTrue("Tooltip should contain <b> as text", + getTooltipText().contains("<b>")); + assertTrue("Tooltip should contain a newline", + getTooltipText().contains("\n")); + } catch (AssertionError e) { + // showing tooltips is somewhat flaky, try again with another cell + showCellTooltip(5, 0); + assertTrue("Tooltip should contain <b> as text", + getTooltipText().contains("<b>")); + assertTrue("Tooltip should contain a newline", + getTooltipText().contains("\n")); + } } private void assertPlainTooltipShown() { - assertTrue("Tooltip should contain <b> as text", - getTooltipText().contains("<b>")); - assertFalse("Tooltip should not contain a newline", - getTooltipText().contains("\n")); + try { + assertTrue("Tooltip should contain <b> as text", + getTooltipText().contains("<b>")); + assertFalse("Tooltip should not contain a newline", + getTooltipText().contains("\n")); + } catch (AssertionError e) { + // showing tooltips is somewhat flaky, try again with another cell + showCellTooltip(5, 0); + assertTrue("Tooltip should contain <b> tag", + isElementPresent(By.cssSelector(".v-tooltip-text b"))); + } } private void assertHtmlTooltipShown() { - assertTrue("Tooltip should contain <b> tag", - isElementPresent(By.cssSelector(".v-tooltip-text b"))); + try { + assertTrue("Tooltip should contain <b> tag", + isElementPresent(By.cssSelector(".v-tooltip-text b"))); + } catch (AssertionError e) { + // showing tooltips is somewhat flaky, try again with another cell + showCellTooltip(5, 0); + assertTrue("Tooltip should contain <b> tag", + isElementPresent(By.cssSelector(".v-tooltip-text b"))); + } } private void showCellTooltip(int row, int col) { getGridElement().getCell(row, col).showTooltip(); + sleep(200); } private void selectCellGenerator(String name) { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java index 4dc1aa2dd2..9dee728d95 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java @@ -135,7 +135,7 @@ public class GridClientColumnPropertiesTest @Test public void testColumnWidths_onColumnReorder_columnWidthsKeptTheSame() { // given - openTestURL(); + openTestURL("theme=reindeer"); GridElement gridElement = getGridElement(); List<GridCellElement> headerCells = gridElement.getHeaderCells(0); @@ -146,6 +146,7 @@ public class GridClientColumnPropertiesTest // when selectMenuPath("Component", "State", "Reverse grid columns"); + sleep(100); // wait for layouting // then gridElement = getGridElement(); @@ -153,11 +154,12 @@ public class GridClientColumnPropertiesTest final int size = headerCells.size(); for (int i = 0; i < size; i++) { // Avoid issues with inaccuracies regarding subpixels. + // Increase leeway to 4 pixels for HTML header inaccuracies. assertEquals( "Column widths don't match after reset, index after flip " - + i, + + i + ",", columnWidths.get(i), - headerCells.get(size - 1 - i).getSize().getWidth(), 1.0d); + headerCells.get(size - 1 - i).getSize().getWidth(), 4.0d); } } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java index 8d3dcf89f4..04ebbb94bd 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java @@ -192,8 +192,13 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest { toggleDetailsFor(100); scrollToRow(100, ScrollDestination.ANY); - Range validScrollRange = Range.between(1691, 1706); - assertTrue(validScrollRange.contains(getGridVerticalScrollPos())); + Range validScrollRange = Range.between(3538, 3558); + int gridVerticalScrollPos = getGridVerticalScrollPos(); + assertTrue( + "Grid scrolled to " + gridVerticalScrollPos + + " (should be between " + validScrollRange.getStart() + + " and " + validScrollRange.getEnd() + ")", + validScrollRange.contains(gridVerticalScrollPos)); } @Test @@ -203,8 +208,13 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest { scrollGridVerticallyTo(999999); scrollToRow(100, ScrollDestination.ANY); - Range validScrollRange = Range.between(1981, 2001); - assertTrue(validScrollRange.contains(getGridVerticalScrollPos())); + Range validScrollRange = Range.between(3781, 3801); + int gridVerticalScrollPos = getGridVerticalScrollPos(); + assertTrue( + "Grid scrolled to " + gridVerticalScrollPos + + " (should be between " + validScrollRange.getStart() + + " and " + validScrollRange.getEnd() + ")", + validScrollRange.contains(gridVerticalScrollPos)); } @Test @@ -221,8 +231,13 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest { toggleDetailsFor(999); scrollToRow(999, ScrollDestination.START); - Range expectedRange = Range.withLength(19671, 20); - assertTrue(expectedRange.contains(getGridVerticalScrollPos())); + Range expectedRange = Range.withLength(37700, 20); + int gridVerticalScrollPos = getGridVerticalScrollPos(); + assertTrue( + "Grid scrolled to " + gridVerticalScrollPos + + " (should be between " + expectedRange.getStart() + + " and " + expectedRange.getEnd() + ")", + expectedRange.contains(gridVerticalScrollPos)); } private void scrollToRow(int rowIndex, ScrollDestination destination) { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java index 4d5df990fb..1784a7d024 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridEditorClientTest.java @@ -62,9 +62,11 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest { @Test public void testMouseOpeningClosing() { + selectMenuPath("Component", "Columns", "Column 2", "Width", "200px"); getGridElement().getCell(4, 0).doubleClick(); assertNotNull(getEditor()); + sleep(100); // wait for layouting // Move focus to the third input field getEditor().findElements(By.className("gwt-TextBox")).get(2).click(); @@ -73,17 +75,18 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest { getSaveButton().click(); // Make sure the editor went away - assertNull(getEditor()); + assertNull("Editor still exists", getEditor()); // Check that focus has moved to cell 4,2 - the last one that was // focused in Editor - assertTrue(getGridElement().getCell(4, 2).isFocused()); + assertTrue("Cell (4, 2) is not focused.", + getGridElement().getCell(4, 2).isFocused()); // Disable editor selectMenuPath("Component", "Editor", "Enabled"); getGridElement().getCell(4, 0).doubleClick(); - assertNull(getEditor()); + assertNull("Editor still exists", getEditor()); } @Test diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridFooterTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridFooterTest.java index ca47ff007e..f36504c1ef 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridFooterTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridFooterTest.java @@ -9,7 +9,6 @@ import java.util.Locale; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Actions; import com.vaadin.testbench.elements.GridElement.GridCellElement; import com.vaadin.v7.tests.components.grid.basicfeatures.GridBasicFeatures; @@ -190,6 +189,7 @@ public class GridFooterTest extends GridStaticSectionTest { openTestURL(); selectMenuPath("Component", "Footer", "Append row"); + selectMenuPath("Component", "Columns", "Column 0", "Width", "200px"); selectMenuPath("Component", "Columns", "Column 0", "Footer Type", "Widget Footer"); @@ -198,7 +198,7 @@ public class GridFooterTest extends GridStaticSectionTest { assertNotEquals("clicked", button.getText().toLowerCase(Locale.ROOT)); - new Actions(getDriver()).moveToElement(button, 5, 5).click().perform(); + button.click(); assertEquals("clicked", button.getText().toLowerCase(Locale.ROOT)); } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridHeaderTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridHeaderTest.java index f062d25a04..bc980a1a87 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridHeaderTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/client/GridHeaderTest.java @@ -11,7 +11,6 @@ import java.util.Locale; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Actions; import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.elements.GridElement.GridCellElement; @@ -232,10 +231,11 @@ public class GridHeaderTest extends GridStaticSectionTest { selectMenuPath("Component", "Columns", "Column 0", "Header Type", "Widget Header"); + selectMenuPath("Component", "Columns", "Column 0", "Width", "200px"); GridCellElement widgetCell = getGridElement().getHeaderCell(0, 0); WebElement button = widgetCell.findElement(By.className("gwt-Button")); - new Actions(getDriver()).moveToElement(button, 5, 5).click().perform(); + button.click(); assertEquals("clicked", button.getText().toLowerCase(Locale.ROOT)); } @@ -246,6 +246,7 @@ public class GridHeaderTest extends GridStaticSectionTest { selectMenuPath("Component", "Columns", "Column 0", "Header Type", "Widget Header"); + selectMenuPath("Component", "Columns", "Column 0", "Width", "200px"); selectMenuPath("Component", "Columns", "Column 0", "Sortable"); @@ -254,7 +255,7 @@ public class GridHeaderTest extends GridStaticSectionTest { assertNotEquals("clicked", button.getText().toLowerCase(Locale.ROOT)); - new Actions(getDriver()).moveToElement(button, 5, 5).click().perform(); + button.click(); assertEquals("clicked", button.getText().toLowerCase(Locale.ROOT)); } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java index 4b29e7e72d..63934a1ebb 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java @@ -14,9 +14,9 @@ public class GridColumnMaxWidthTest extends GridBasicFeaturesTest { openTestURL(); selectMenuPath("Component", "Columns", - "All columns expanding, Col 0 has max width of 30px"); + "All columns expanding, Col 0 has max width of 40px"); - assertEquals("Column 0 did not obey max width of 30px.", 30, + assertEquals("Column 0 did not obey max width of 40px.", 40, getGridElement().getCell(0, 0).getSize().getWidth()); } } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java index f45aa15c72..7d531409b8 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java @@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; import org.openqa.selenium.interactions.Actions; import com.vaadin.testbench.elements.GridElement.GridCellElement; @@ -104,10 +103,9 @@ public class GridColumnResizeTest extends GridBasicFeaturesTest { private void dragResizeColumn(int columnIndex, int posX, int offset) { GridCellElement headerCell = getGridElement().getHeaderCell(0, columnIndex); - Dimension size = headerCell.getSize(); new Actions(getDriver()) - .moveToElement(headerCell, size.getWidth() + posX, - size.getHeight() / 2) + .moveToElement(headerCell.findElement( + By.className("v-grid-column-resize-handle"))) .clickAndHold().moveByOffset(offset, 0).release().perform(); } diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java index a619a707da..0b167bfa95 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java @@ -273,6 +273,7 @@ public class GridEditorBufferedTest extends GridEditorTest { getGridElement().getCell(4, 0).doubleClick(); assertEditorOpen(); + sleep(100); // wait for layouting getCancelButton().click(); assertEditorClosed(); diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java index c97688e984..2621f2cd22 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridEditorTest.java @@ -57,7 +57,7 @@ public abstract class GridEditorTest extends GridBasicFeaturesTest { assertEditorClosed(); boolean thrown = logContainsText( "Exception occurred, java.lang.IllegalStateException"); - assertTrue("IllegalStateException thrown", thrown); + assertTrue("IllegalStateException not thrown", thrown); } @Test @@ -67,7 +67,7 @@ public abstract class GridEditorTest extends GridBasicFeaturesTest { assertEditorOpen(); boolean thrown = logContainsText( "Exception occurred, java.lang.IllegalStateException"); - assertTrue("IllegalStateException thrown", thrown); + assertTrue("IllegalStateException not thrown", thrown); } @Test diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java index 7dd1ac7619..7df8561d77 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java @@ -26,24 +26,24 @@ public class GridScrollTest extends GridBasicFeaturesTest { selectMenuPath("Settings", "Clear log"); $(GridElement.class).first().scrollToRow(40); assertEquals("Log row did not contain expected item request", - "0. Requested items 0 - 86", getLogRow(0)); + "0. Requested items 0 - 91", getLogRow(0)); assertEquals("There should be only one log row", " ", getLogRow(1)); selectMenuPath("Settings", "Clear log"); $(GridElement.class).first().scrollToRow(100); assertEquals("Log row did not contain expected item request", - "0. Requested items 47 - 146", getLogRow(0)); + "0. Requested items 43 - 151", getLogRow(0)); assertEquals("There should be only one log row", " ", getLogRow(1)); selectMenuPath("Settings", "Clear log"); $(GridElement.class).first().scrollToRow(300); assertEquals("Log row did not contain expected item request", - "0. Requested items 247 - 346", getLogRow(0)); + "0. Requested items 243 - 351", getLogRow(0)); assertEquals("There should be only one log row", " ", getLogRow(1)); } @Test public void workPendingWhileScrolling() { openTestURL("theme=valo"); - String script = "var c = window.vaadin.clients.runcomvaadintestscomponentsgridbasicfeaturesGridBasicFeatures;\n" + String script = "var c = window.vaadin.clients.runcomvaadinv7testscomponentsgridbasicfeaturesGridBasicFeatures;\n" // Scroll down and cause lazy loading + "c.getElementByPath(\"//Grid[0]#cell[21]\"); \n" + "return c.isActive();"; diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java b/uitest/src/test/java/com/vaadin/v7/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java index e7aa6047e8..89ce7560ae 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java @@ -32,9 +32,8 @@ public class NativeSelectsFocusAndBlurListenerTests extends MultiBrowserTest { getDriver().findElement(By.tagName("body")).click(); // Somehow selectByText causes focus + blur + focus + blur on - // Chrome/PhantomJS - if (BrowserUtil.isChrome(getDesiredCapabilities()) - || BrowserUtil.isPhantomJS(getDesiredCapabilities())) { + // PhantomJS + if (BrowserUtil.isPhantomJS(getDesiredCapabilities())) { assertEquals("4. FocusEvent", getLogRow(1)); assertEquals("5. BlurEvent", getLogRow(0)); } else { diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/window/UndefinedHeightSubWindowAndContentTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/window/UndefinedHeightSubWindowAndContentTest.java index d9373993c9..ef87c01cf1 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/window/UndefinedHeightSubWindowAndContentTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/window/UndefinedHeightSubWindowAndContentTest.java @@ -22,14 +22,14 @@ public class UndefinedHeightSubWindowAndContentTest extends MultiBrowserTest { WindowElement window = $(WindowElement.class).first(); int height = window.getSize().getHeight(); - assertTrue("Window height with validation failure", - 161 <= height && height <= 164); + assertTrue("Window height with validation failure, height: " + height, + 196 <= height && height <= 198); textField.setValue("valid"); textField.sendKeys(Keys.ENTER); height = window.getSize().getHeight(); - assertTrue("Window height with validation success", - 136 <= height && height <= 139); + assertTrue("Window height with validation success, height: " + height, + 171 <= height && height <= 173); } } |