Browse Source

Use Rebase and Merge, Please (#12023)

tags/8.11.0^0
Zhe Sun 3 years ago
parent
commit
d1b3a396d8
No account linked to committer's email address
85 changed files with 593 additions and 41 deletions
  1. 22
    0
      client/src/main/java/com/vaadin/client/WidgetUtil.java
  2. 3
    0
      client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
  3. 4
    18
      client/src/main/java/com/vaadin/client/ui/VComboBox.java
  4. 2
    17
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java
  5. 9
    2
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java
  6. 3
    0
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTextualDate.java
  7. 3
    1
      compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
  8. 2
    0
      compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
  9. 35
    1
      compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java
  10. 1
    0
      compatibility-themes/src/main/themes/VAADIN/themes/base/table/table.scss
  11. 1
    0
      themes/src/main/themes/VAADIN/themes/valo/components/_table.scss
  12. BIN
      uitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.png
  13. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__buttons.png
  14. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__labels.png
  15. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__notification-error.png
  16. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__notification-tray.png
  17. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__notification-warning.png
  18. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-fifth-open.png
  19. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-first-open.png
  20. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-fourth-open.png
  21. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-second-open.png
  22. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-third-open.png
  23. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects.png
  24. BIN
      uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__textfields.png
  25. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-fifth-open.png
  26. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-first-open.png
  27. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-fourth-open.png
  28. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-second-open.png
  29. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-third-open.png
  30. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects.png
  31. BIN
      uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__textfields.png
  32. BIN
      uitest/reference-screenshots/chrome/CheckboxAlignmentWithNoHeaderGridTest-alignments_are_correct_ANY_Chrome__alignment.png
  33. BIN
      uitest/reference-screenshots/chrome/ComboBoxBorderTest-testComboBoxArrow_ANY_Chrome__arrow.png
  34. BIN
      uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-16x16-page1.png
  35. BIN
      uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-16x16-page2.png
  36. BIN
      uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-16x16-selected-1-3-5-9.png
  37. BIN
      uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-32x32-page2.png
  38. BIN
      uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-64x64-page1-highlight-first.png
  39. BIN
      uitest/reference-screenshots/chrome/FontIconsTest-checkScreenshot_ANY_Chrome__allVaadinIcons.png
  40. BIN
      uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col2-col3-a.png
  41. BIN
      uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col2-col3-b.png
  42. BIN
      uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col2-col3-c.png
  43. BIN
      uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col3.png
  44. BIN
      uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__initial.png
  45. BIN
      uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__no-footer.png
  46. BIN
      uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png
  47. BIN
      uitest/reference-screenshots/chrome/GridLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled.png
  48. BIN
      uitest/reference-screenshots/chrome/GridLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError.png
  49. BIN
      uitest/reference-screenshots/chrome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled-End.png
  50. BIN
      uitest/reference-screenshots/chrome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled-Middle.png
  51. BIN
      uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-asc-died-at-age.png
  52. BIN
      uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-asc-name.png
  53. BIN
      uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-desc-died-at-age.png
  54. BIN
      uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-desc-name.png
  55. BIN
      uitest/reference-screenshots/chrome/HeaderSyncOnScrollTest-testFooter_ANY_Chrome__100pct-no-scrollbar-second.png
  56. BIN
      uitest/reference-screenshots/chrome/HeaderSyncOnScrollTest-testFooter_ANY_Chrome__100pct-no-scrollbar.png
  57. BIN
      uitest/reference-screenshots/chrome/HeaderSyncOnScrollTest-testFooter_ANY_Chrome__300px-scrolled-right.png
  58. BIN
      uitest/reference-screenshots/chrome/HeaderUpdateWhenNoRowsTest-testFooter_ANY_Chrome__headerHidden.png
  59. BIN
      uitest/reference-screenshots/chrome/HeaderUpdateWhenNoRowsTest-testFooter_ANY_Chrome__headerVisible.png
  60. BIN
      uitest/reference-screenshots/chrome/HeaderUpdateWhenNoRowsTest-testFooter_ANY_Chrome__headerVisible2.png
  61. BIN
      uitest/reference-screenshots/chrome/LabelModesTest-testLabelModes_ANY_Chrome__labelmodes.png
  62. BIN
      uitest/reference-screenshots/chrome/LabelTooltipTest-testLabelToolTipChameleonTheme_ANY_Chrome__tooltipVisible.png
  63. BIN
      uitest/reference-screenshots/chrome/ReindeerThemeTest-testTheme_ANY_Chrome__textfields.png
  64. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-fifth-open.png
  65. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-first-open.png
  66. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-fourth-open.png
  67. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-second-open.png
  68. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-third-open.png
  69. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects.png
  70. BIN
      uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__textfields.png
  71. BIN
      uitest/reference-screenshots/chrome/UndefinedSizeScrollbarsTest-testNoScrollbars_ANY_Chrome__noscrollbars.png
  72. BIN
      uitest/reference-screenshots/chrome/VLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled.png
  73. BIN
      uitest/reference-screenshots/chrome/ValoThemeUITest-selects_ANY_Chrome__selects.png
  74. 45
    0
      uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReadOnlyPopup.java
  75. 2
    1
      uitest/src/main/java/com/vaadin/tests/components/table/CtrlShiftMultiselect.java
  76. 41
    0
      uitest/src/main/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTouchDetectionDisabled.java
  77. 86
    0
      uitest/src/main/java/com/vaadin/tests/components/table/TableScrollsOnRefresh.java
  78. 64
    0
      uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableMultiselect.java
  79. 89
    0
      uitest/src/main/java/com/vaadin/v7/tests/components/combobox/ComboboxPageLengthZeroFilter.java
  80. 1
    1
      uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
  81. 26
    0
      uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxReadOnlyPopupTest.java
  82. 40
    0
      uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTouchDetectionDisabledTest.java
  83. 48
    0
      uitest/src/test/java/com/vaadin/tests/components/table/TableScrollsOnRefreshTest.java
  84. 38
    0
      uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableMultiselectTest.java
  85. 28
    0
      uitest/src/test/java/com/vaadin/v7/tests/components/combobox/ComboboxPageLengthZeroFilterTest.java

+ 22
- 0
client/src/main/java/com/vaadin/client/WidgetUtil.java View File

@@ -42,6 +42,7 @@ import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.EventListener;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.shared.ui.ErrorLevel;
import com.vaadin.shared.util.SharedUtil;
@@ -1962,4 +1963,25 @@ public class WidgetUtil {
return indicator;
}
}

public static void disableBrowserAutocomplete(TextBox textBox) {
/*-
* Stop the browser from showing its own suggestion popup.
*
* Using an invalid value instead of "off" as suggested by
* https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
*
* Leaving the non-standard Safari options autocapitalize and
* autocorrect untouched since those do not interfere in the same
* way, and they might be useful in a combo box where new items are
* allowed.
*/
if (BrowserInfo.get().isChrome()) {
// Chrome supports "off" and random number does not work with
// Chrome
textBox.getElement().setAttribute("autocomplete", "off");
} else {
textBox.getElement().setAttribute("autocomplete", Math.random() + "");
}
}
}

+ 3
- 0
client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java View File

@@ -36,6 +36,7 @@ import com.vaadin.client.BrowserInfo;
import com.vaadin.client.Focusable;
import com.vaadin.client.LocaleNotLoadedException;
import com.vaadin.client.LocaleService;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.ui.aria.AriaHelper;
import com.vaadin.client.ui.aria.HandlesAriaCaption;
import com.vaadin.client.ui.aria.HandlesAriaInvalid;
@@ -90,6 +91,8 @@ public abstract class VAbstractTextualDate<R extends Enum<R>>
if (BrowserInfo.get().isIE()) {
addDomHandler(this, KeyDownEvent.getType());
}
// Stop the browser from showing its own suggestion popup.
WidgetUtil.disableBrowserAutocomplete(text);
add(text);
publishJSHelpers(getElement());
}

+ 4
- 18
client/src/main/java/com/vaadin/client/ui/VComboBox.java View File

@@ -1438,24 +1438,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler,
* @since 7.6.4
*/
public FilterSelectTextBox() {
/*-
* Stop the browser from showing its own suggestion popup.
*
* Using an invalid value instead of "off" as suggested by
* https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
*
* Leaving the non-standard Safari options autocapitalize and
* autocorrect untouched since those do not interfere in the same
* way, and they might be useful in a combo box where new items are
* allowed.
*/
if (BrowserInfo.get().isChrome()) {
// Chrome supports "off" and random number does not work with
// Chrome
getElement().setAttribute("autocomplete", "off");
} else {
getElement().setAttribute("autocomplete", Math.random() + "");
}
WidgetUtil.disableBrowserAutocomplete(this);
}

/**
@@ -2045,6 +2028,9 @@ public class VComboBox extends Composite implements Field, KeyDownHandler,

/** For internal use only. May be removed or replaced in the future. */
public void updateReadOnly() {
if (readonly) {
suggestionPopup.hide();
}
debug("VComboBox: updateReadOnly()");
tb.setReadOnly(readonly || !textInputEnabled);
}

+ 2
- 17
compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java View File

@@ -1409,23 +1409,8 @@ public class VFilterSelect extends Composite
* @since 7.6.4
*/
public FilterSelectTextBox() {
/*-
* Stop the browser from showing its own suggestion popup.
*
* Using an invalid value instead of "off" as suggested by
* https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
*
* Leaving the non-standard Safari options autocapitalize and
* autocorrect untouched since those do not interfere in the same
* way, and they might be useful in a combo box where new items are
* allowed.
*/
if (BrowserInfo.get().isChrome()) {
// Chrome supports "off" and random number does not work with Chrome
getElement().setAttribute("autocomplete", "off");
} else {
getElement().setAttribute("autocomplete", Math.random() + "");
}
// Stop the browser from showing its own suggestion popup.
WidgetUtil.disableBrowserAutocomplete(this);
}

/**

+ 9
- 2
compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java View File

@@ -349,6 +349,8 @@ public class VScrollTable extends FlowPanel

private SelectMode selectMode = SelectMode.NONE;

private boolean multiSelectTouchDetectionEnabled = true;

public final HashSet<String> selectedRowKeys = new HashSet<String>();

/*
@@ -1502,6 +1504,10 @@ public class VScrollTable extends FlowPanel
} else {
selectMode = SelectMode.NONE;
}
if (uidl.hasAttribute("touchdetection")) {
multiSelectTouchDetectionEnabled = uidl
.getBooleanAttribute("touchdetection");
}
}
}

@@ -1951,9 +1957,10 @@ public class VScrollTable extends FlowPanel
}

private void setMultiSelectMode(int multiselectmode) {
if (BrowserInfo.get().isTouchDevice()) {
if (BrowserInfo.get().isTouchDevice()
&& multiSelectTouchDetectionEnabled) {
// Always use the simple mode for touch devices that do not have
// shift/ctrl keys
// shift/ctrl keys (unless this feature is explicitly disabled)
this.multiselectmode = MULTISELECT_MODE_SIMPLE;
} else {
this.multiselectmode = multiselectmode;

+ 3
- 0
compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTextualDate.java View File

@@ -35,6 +35,7 @@ import com.vaadin.client.BrowserInfo;
import com.vaadin.client.Focusable;
import com.vaadin.client.LocaleNotLoadedException;
import com.vaadin.client.LocaleService;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.ui.SubPartAware;
import com.vaadin.client.ui.aria.AriaHelper;
import com.vaadin.client.ui.aria.HandlesAriaCaption;
@@ -115,6 +116,8 @@ public class VTextualDate extends VDateField
if (BrowserInfo.get().isIE()) {
addDomHandler(this, KeyDownEvent.getType());
}
// Stop the browser from showing its own suggestion popup.
WidgetUtil.disableBrowserAutocomplete(text);
add(text);
}


+ 3
- 1
compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java View File

@@ -620,7 +620,9 @@ public class ComboBox extends AbstractSelect
// page length usable for non-null items
int effectivePageLength = pageLength
- (needNullSelectOption && (currentPage == 0) ? 1 : 0);
return Math.min(size - 1, first + effectivePageLength - 1);
// zero pageLength implies infinite page size
return pageLength == 0 ? size - 1
: Math.min(size - 1, first + effectivePageLength - 1);
}

/**

+ 2
- 0
compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java View File

@@ -38,6 +38,7 @@ import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
@@ -3473,6 +3474,7 @@ public class Grid extends AbstractComponent
if (caption == null) {
caption = ""; // Render null as empty
}
caption = Jsoup.parse(caption).text();
state.headerCaption = caption;

HeaderRow row = grid.getHeader().getDefaultRow();

+ 35
- 1
compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java View File

@@ -588,6 +588,8 @@ public class Table extends AbstractSelect implements Action.Container,

private MultiSelectMode multiSelectMode = MultiSelectMode.DEFAULT;

private boolean multiSelectTouchDetectionEnabled = true;

private boolean rowCacheInvalidated;

private RowGenerator rowGenerator = null;
@@ -3775,6 +3777,10 @@ public class Table extends AbstractSelect implements Action.Container,
if (isSelectable()) {
target.addAttribute("selectmode",
(isMultiSelect() ? "multi" : "single"));
if (isMultiSelect()) {
target.addAttribute("touchdetection",
isMultiSelectTouchDetectionEnabled());
}
} else {
target.addAttribute("selectmode", "none");
}
@@ -5188,7 +5194,10 @@ public class Table extends AbstractSelect implements Action.Container,
* <p>
* Note, that on some clients the mode may not be respected. E.g. on touch
* based devices CTRL/SHIFT base selection method is invalid, so touch based
* browsers always use the {@link MultiSelectMode#SIMPLE}.
* browsers always use the {@link MultiSelectMode#SIMPLE} unless touch multi
* select is explicitly disabled.
*
* @see #setMultiSelectTouchDetectionEnabled(boolean)
*
* @param mode
* The select mode of the table
@@ -5207,6 +5216,31 @@ public class Table extends AbstractSelect implements Action.Container,
return multiSelectMode;
}

/**
* Default behavior on touch-reporting devices is to switch from CTRL/SHIFT
* based multi-selection to simple mode, but you can use this method to
* explicitly disable the touch device detection. Thus you can keep using
* keyboard-based multi selection on hybrid devices that have both a touch
* screen and a keyboard.
*
* @param multiSelectTouchDetectionEnabled
* Whether to enable or disable touch screen detection
*/
public void setMultiSelectTouchDetectionEnabled(
boolean multiSelectTouchDetectionEnabled) {
this.multiSelectTouchDetectionEnabled = multiSelectTouchDetectionEnabled;
markAsDirty();
}

/**
* Returns if touch screen detection is used to toggle multi select mode.
*
* @return If touch screen detection for multi select is enabled
*/
public boolean isMultiSelectTouchDetectionEnabled() {
return multiSelectTouchDetectionEnabled;
}

/**
* Lazy loading accept criterion for Table. Accepted target rows are loaded
* from server once per drag and drop operation. Developer must override one

+ 1
- 0
compatibility-themes/src/main/themes/VAADIN/themes/base/table/table.scss View File

@@ -137,6 +137,7 @@
}
.#{$primaryStyleName}-body {
border: 1px solid #aaa;
overflow-anchor: none; /* In Chrome 56+ */
}
.#{$primaryStyleName}-row-spacer {
height: 10px;

+ 1
- 0
themes/src/main/themes/VAADIN/themes/valo/components/_table.scss View File

@@ -268,6 +268,7 @@ $v-table-background-color: null !default;

.#{$primary-stylename}-body {
border: $v-table-border-width solid $border-color;
overflow-anchor: none; /* In Chrome 56+ */
@include user-select(text);
}


BIN
uitest/reference-screenshots/chrome/AccordionClipsContentTest-testAccordionClipsContent_ANY_Chrome__button-clicked.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__buttons.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__labels.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__notification-error.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__notification-tray.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__notification-warning.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-fifth-open.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-first-open.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-fourth-open.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-second-open.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects-third-open.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__selects.png View File


BIN
uitest/reference-screenshots/chrome/BaseThemeTest-testTheme_ANY_Chrome__textfields.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-fifth-open.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-first-open.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-fourth-open.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-second-open.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects-third-open.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__selects.png View File


BIN
uitest/reference-screenshots/chrome/ChameleonThemeTest-testTheme_ANY_Chrome__textfields.png View File


BIN
uitest/reference-screenshots/chrome/CheckboxAlignmentWithNoHeaderGridTest-alignments_are_correct_ANY_Chrome__alignment.png View File


BIN
uitest/reference-screenshots/chrome/ComboBoxBorderTest-testComboBoxArrow_ANY_Chrome__arrow.png View File


BIN
uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-16x16-page1.png View File


BIN
uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-16x16-page2.png View File


BIN
uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-16x16-selected-1-3-5-9.png View File


BIN
uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-32x32-page2.png View File


BIN
uitest/reference-screenshots/chrome/ComboBoxLargeIconsTest-testComboBoxIcons_ANY_Chrome__icons-64x64-page1-highlight-first.png View File


BIN
uitest/reference-screenshots/chrome/FontIconsTest-checkScreenshot_ANY_Chrome__allVaadinIcons.png View File


BIN
uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col2-col3-a.png View File


BIN
uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col2-col3-b.png View File


BIN
uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col2-col3-c.png View File


BIN
uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__footer-col1-col3.png View File


BIN
uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__initial.png View File


BIN
uitest/reference-screenshots/chrome/FooterTest-testFooter_ANY_Chrome__no-footer.png View File


BIN
uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png View File


BIN
uitest/reference-screenshots/chrome/GridLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled.png View File


BIN
uitest/reference-screenshots/chrome/GridLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError.png View File


BIN
uitest/reference-screenshots/chrome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled-End.png View File


BIN
uitest/reference-screenshots/chrome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled-Middle.png View File


BIN
uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-asc-died-at-age.png View File


BIN
uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-asc-name.png View File


BIN
uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-desc-died-at-age.png View File


BIN
uitest/reference-screenshots/chrome/HeaderPositionWhenSortingTest-testFooter_ANY_Chrome__sort-desc-name.png View File


BIN
uitest/reference-screenshots/chrome/HeaderSyncOnScrollTest-testFooter_ANY_Chrome__100pct-no-scrollbar-second.png View File


BIN
uitest/reference-screenshots/chrome/HeaderSyncOnScrollTest-testFooter_ANY_Chrome__100pct-no-scrollbar.png View File


BIN
uitest/reference-screenshots/chrome/HeaderSyncOnScrollTest-testFooter_ANY_Chrome__300px-scrolled-right.png View File


BIN
uitest/reference-screenshots/chrome/HeaderUpdateWhenNoRowsTest-testFooter_ANY_Chrome__headerHidden.png View File


BIN
uitest/reference-screenshots/chrome/HeaderUpdateWhenNoRowsTest-testFooter_ANY_Chrome__headerVisible.png View File


BIN
uitest/reference-screenshots/chrome/HeaderUpdateWhenNoRowsTest-testFooter_ANY_Chrome__headerVisible2.png View File


BIN
uitest/reference-screenshots/chrome/LabelModesTest-testLabelModes_ANY_Chrome__labelmodes.png View File


BIN
uitest/reference-screenshots/chrome/LabelTooltipTest-testLabelToolTipChameleonTheme_ANY_Chrome__tooltipVisible.png View File


BIN
uitest/reference-screenshots/chrome/ReindeerThemeTest-testTheme_ANY_Chrome__textfields.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-fifth-open.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-first-open.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-fourth-open.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-second-open.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects-third-open.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__selects.png View File


BIN
uitest/reference-screenshots/chrome/RunoThemeTest-testTheme_ANY_Chrome__textfields.png View File


BIN
uitest/reference-screenshots/chrome/UndefinedSizeScrollbarsTest-testNoScrollbars_ANY_Chrome__noscrollbars.png View File


BIN
uitest/reference-screenshots/chrome/VLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled.png View File


BIN
uitest/reference-screenshots/chrome/ValoThemeUITest-selects_ANY_Chrome__selects.png View File


+ 45
- 0
uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReadOnlyPopup.java View File

@@ -0,0 +1,45 @@
package com.vaadin.tests.components.combobox;

import com.vaadin.event.ShortcutAction;
import com.vaadin.event.ShortcutListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.ComboBox;

public class ComboBoxReadOnlyPopup extends AbstractReindeerTestUI {

static final String[] ITEMS = { "First", "Second", "Third" };

@Override
protected void setup(VaadinRequest request) {
String boxLabel = String
.format("Press 'Q' to toggle ComboBox's read-only mode");
final ComboBox<String> comboBox = new ComboBox<>(boxLabel);

comboBox.setItems(ITEMS);
comboBox.setSelectedItem(ITEMS[0]);

ShortcutListener shortcutListener = new ShortcutListener("", null,
ShortcutAction.KeyCode.Q) {
@Override
public void handleAction(Object sender, Object target) {
comboBox.setReadOnly(!comboBox.isReadOnly());
}
};
comboBox.addShortcutListener(shortcutListener);

addComponents(comboBox);
}

@Override
protected String getTestDescription() {
return "ComboBox that turns to read-only mode while expanded "
+ "should have its popup set to hidden.";
}

@Override
protected Integer getTicketNumber() {
return 12021;
}

}

+ 2
- 1
uitest/src/main/java/com/vaadin/tests/components/table/CtrlShiftMultiselect.java View File

@@ -10,9 +10,10 @@ import com.vaadin.v7.ui.Table.TableDragMode;
@SuppressWarnings("serial")
public class CtrlShiftMultiselect extends TestBase {

protected final Table table = new Table("Multiselectable table");

@Override
protected void setup() {
final Table table = new Table("Multiselectable table");

table.setContainerDataSource(createContainer());
table.setImmediate(true);

+ 41
- 0
uitest/src/main/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTouchDetectionDisabled.java View File

@@ -0,0 +1,41 @@
package com.vaadin.tests.components.table;

import java.util.Set;

import com.vaadin.v7.data.Property;
import com.vaadin.v7.ui.Label;

public class CtrlShiftMultiselectTouchDetectionDisabled
extends CtrlShiftMultiselect {

protected Label label;

@Override
protected void setup() {
super.setup();
label = new Label("0");
label.setId("count");
label.setCaption("Amount of selected items");
table.setMultiSelectTouchDetectionEnabled(false);
table.addValueChangeListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent event) {
Property property = event.getProperty();
Set set = (Set) property.getValue();
label.setValue("" + set.size());
}
});
addComponent(label);
}

@Override
protected String getDescription() {
return "Allow disabling multi selection's touch screen detection for hybrid devices";
}

@Override
protected Integer getTicketNumber() {
return 11601;
}

}

+ 86
- 0
uitest/src/main/java/com/vaadin/tests/components/table/TableScrollsOnRefresh.java View File

@@ -0,0 +1,86 @@
package com.vaadin.tests.components.table;

import java.util.ArrayList;
import java.util.List;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.util.BeanItemContainer;
import com.vaadin.v7.ui.Table;

public class TableScrollsOnRefresh extends AbstractTestUI {
private Table table = new Table(
"scroll down table, so it loads next page, and then click 'refresh' button");
private Button refresh = new Button("refresh");
private BeanItemContainer<TableItem> container = new BeanItemContainer<TableItem>(
TableItem.class);

@Override
protected void setup(VaadinRequest request) {
refresh.addClickListener(new Button.ClickListener() {

@Override
public void buttonClick(Button.ClickEvent event) {
table.refreshRowCache();
}
});
table.setSizeFull();
addComponents(refresh, table);
VerticalLayout vl = getLayout();
vl.setExpandRatio(table, 1f);
vl.setSizeFull();
vl.getParent().setSizeFull();
table.setContainerDataSource(container);
populateContainer();
}

private void populateContainer() {
List<TableItem> items = new ArrayList<TableItem>();
for (int i = 0; i < 1000; i++) {
items.add(new TableItem("Item " + Integer.toString(i),
"Item description " + Integer.toString(i)));

}
container.addAll(items);
}

@Override
protected String getTestDescription() {
return "Refreshing row cache shouldn't change scroll position.";
}

@Override
protected Integer getTicketNumber() {
return 8707;
}

public class TableItem {

private String name;
private String description;

public TableItem(String name, String description) {
this.name = name;
this.description = description;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

}
}

+ 64
- 0
uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableMultiselect.java View File

@@ -0,0 +1,64 @@
package com.vaadin.tests.components.treetable;

import static com.vaadin.server.Sizeable.Unit.PIXELS;

import java.util.Set;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.v7.data.Property;
import com.vaadin.v7.ui.Label;
import com.vaadin.v7.ui.TreeTable;

public class TreeTableMultiselect extends AbstractTestUI {

protected final TreeTable tt = new TreeTable("Multiselectable treetable");
protected Label label;

@Override
protected void setup(VaadinRequest request) {
label = new Label("0");
label.setCaption("Amount of selected items");
label.setId("count");

tt.setImmediate(true);
tt.addContainerProperty("Foo", String.class, "");
tt.setColumnWidth("Foo", 100);
tt.addContainerProperty("Bar", String.class, "");
tt.setColumnWidth("Bar", 100);
tt.setHeight(400, PIXELS);
Object item1 = tt.addItem(new Object[] { "Foo", "Bar" }, null);
Object item2 = tt.addItem(new Object[] { "Foo2", "Bar2" }, null);
Object item3 = tt.addItem(new Object[] { "Foo3", "Bar3" }, null);
tt.setParent(item2, item1);
tt.setParent(item3, item1);
tt.setCollapsed(item1, false);
tt.setSelectable(true);
tt.setMultiSelect(true);
tt.setMultiSelectTouchDetectionEnabled(false);
tt.setWidth("400px");
tt.setHeight("400px");
tt.addValueChangeListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent event) {
Property property = event.getProperty();
Set set = (Set) property.getValue();
label.setValue("" + set.size());
}
});

addComponent(tt);
addComponent(label);
}

@Override
public String getTestDescription() {
return "Allow disabling multi selection's touch screen detection for hybrid devices";
}

@Override
protected Integer getTicketNumber() {
return 11601;
}

}

+ 89
- 0
uitest/src/main/java/com/vaadin/v7/tests/components/combobox/ComboboxPageLengthZeroFilter.java View File

@@ -0,0 +1,89 @@
/*
* Copyright 2000-2020 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.v7.tests.components.combobox;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.v7.data.util.BeanContainer;
import com.vaadin.v7.ui.AbstractSelect.ItemCaptionMode;
import com.vaadin.v7.ui.ComboBox;

/**
* Test for issue #11246 where ComboBox set to render from Property does not
* filter correctly when page size is 0
*
* @author Vaadin Ltd
*/
@SuppressWarnings("deprecation")
public class ComboboxPageLengthZeroFilter extends AbstractTestUI {

public static class Topping {
private int id;
private String name;

public Topping(int id, String name) {
this.id = id;
this.name = name;
}

public void setId(int id) {
this.id = id;
}

public int getId() {
return id;
}

public void setName(String name) {
this.name = name;
}

public String getName() {
return name;
}
}

@Override
protected void setup(VaadinRequest request) {
BeanContainer<Integer, Topping> container = new BeanContainer<Integer, Topping>(
Topping.class);
container.setBeanIdProperty("id");
for (int i = 0; i < 12; i++) {
container.addBean(new Topping(i, "Topping " + i));
}

final ComboBox comboBox = new ComboBox();
comboBox.setPageLength(0);
comboBox.setItemCaptionMode(ItemCaptionMode.PROPERTY);
comboBox.setItemCaptionPropertyId("name");
comboBox.setContainerDataSource(container);
comboBox.setInvalidAllowed(false);
comboBox.setNullSelectionAllowed(false);
comboBox.setTextInputAllowed(true);

getLayout().addComponent(comboBox);
}

@Override
protected Integer getTicketNumber() {
return 11246;
}

@Override
protected String getTestDescription() {
return "Filtering should work even when ComboBox page length is zero.";
}
}

+ 1
- 1
uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java View File

@@ -25,7 +25,7 @@ public class VerifyBrowserVersionTest extends MultiBrowserTest {
// Chrome version does not necessarily match the desired version
// because of auto updates...
browserIdentifier = getExpectedUserAgentString(
getDesiredCapabilities()) + "81";
getDesiredCapabilities()) + "83";
} else if (BrowserUtil.isFirefox(getDesiredCapabilities())) {
browserIdentifier = getExpectedUserAgentString(
getDesiredCapabilities()) + "75";

+ 26
- 0
uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxReadOnlyPopupTest.java View File

@@ -0,0 +1,26 @@
package com.vaadin.tests.components.combobox;

import static org.junit.Assert.assertFalse;

import org.junit.Test;

import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class ComboBoxReadOnlyPopupTest extends MultiBrowserTest {

@Test
public void expandedComboBoxSetToReadOnlyShouldHidePopup() {
openTestURL();

ComboBoxElement comboBox = $(ComboBoxElement.class).first();
comboBox.openPopup();

// Calls comboBox.setReadOnly(true);
comboBox.sendKeys(String.valueOf('q'));

assertFalse("Read-only ComboBox's popup should be hidden!",
comboBox.isPopupOpen());
}

}

+ 40
- 0
uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTouchDetectionDisabledTest.java View File

@@ -0,0 +1,40 @@
package com.vaadin.tests.components.table;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.openqa.selenium.Keys;
import org.openqa.selenium.interactions.Actions;

import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.testbench.elements.TableElement;
import com.vaadin.tests.tb3.SingleBrowserTest;

public class CtrlShiftMultiselectTouchDetectionDisabledTest
extends SingleBrowserTest {

@Override
protected boolean requireWindowFocusForIE() {
return true;
}

@Test
public void testSelectedCount() {
openTestURL();
clickRow(3);
new Actions(driver).keyDown(Keys.SHIFT).perform();
clickRow(8);
new Actions(driver).keyUp(Keys.SHIFT).perform();
new Actions(driver).release().perform();
LabelElement labelElement = $(LabelElement.class).id("count");
assertEquals("Unexpected amount of selected rows", "6",
labelElement.getText());

}

private void clickRow(int index) {
TableElement tableElement = $(TableElement.class).first();
tableElement.getRow(index).click();
}

}

+ 48
- 0
uitest/src/test/java/com/vaadin/tests/components/table/TableScrollsOnRefreshTest.java View File

@@ -0,0 +1,48 @@
package com.vaadin.tests.components.table;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.elements.TableElement;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class TableScrollsOnRefreshTest extends MultiBrowserTest {

@Test
public void ensureNoScrolling() throws InterruptedException {
openTestURL();
TableElement table = $(TableElement.class).first();
table.scroll(10000);
sleep(500); // wait for both data requests
String firstCellText = getFirstVisibleCell(table).getText();

ButtonElement refresh = $(ButtonElement.class).first();
refresh.click();
sleep(500); // wait for both data requests
Assert.assertEquals(firstCellText,
getFirstVisibleCell(table).getText());

refresh.click();
sleep(500); // wait for both data requests
Assert.assertEquals(firstCellText,
getFirstVisibleCell(table).getText());
}

private WebElement getFirstVisibleCell(TableElement table) {
int tableBodyTop = table.findElement(By.className("v-table-body"))
.getLocation().getY();
List<WebElement> cells = table
.findElements(By.className("v-table-cell-content"));
for (WebElement cell : cells) {
if (cell.getLocation().getY() > tableBodyTop) {
return cell;
}
}
return null;
}
}

+ 38
- 0
uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableMultiselectTest.java View File

@@ -0,0 +1,38 @@
package com.vaadin.tests.components.treetable;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.openqa.selenium.Keys;
import org.openqa.selenium.interactions.Actions;

import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.testbench.elements.TreeTableElement;
import com.vaadin.tests.tb3.SingleBrowserTest;

public class TreeTableMultiselectTest extends SingleBrowserTest {

@Override
protected boolean requireWindowFocusForIE() {
return true;
}

@Test
public void testSelectedCount() {
openTestURL();
clickRow(0);
new Actions(driver).keyDown(Keys.SHIFT).perform();
clickRow(2);
new Actions(driver).keyUp(Keys.SHIFT).perform();
new Actions(driver).release().perform();
LabelElement labelElement = $(LabelElement.class).id("count");
assertEquals("Unexpected amount of selected rows", "3",
labelElement.getText());
}

private void clickRow(int index) {
TreeTableElement treeTable = $(TreeTableElement.class).first();
treeTable.getRow(index).click();
}

}

+ 28
- 0
uitest/src/test/java/com/vaadin/v7/tests/components/combobox/ComboboxPageLengthZeroFilterTest.java View File

@@ -0,0 +1,28 @@
package com.vaadin.v7.tests.components.combobox;
import java.util.List;

import org.junit.Assert;
import org.junit.Test;

import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class ComboboxPageLengthZeroFilterTest extends MultiBrowserTest {

@Test
public void testOptionsNotEmpty() {
openTestURL();

List<String> suggestions = getFilterSuggestions("T");

Assert.assertEquals("All items should be presented!", 12,
suggestions.size());
}

private List<String> getFilterSuggestions(String string) {
ComboBoxElement comboBox = $(ComboBoxElement.class).first();
comboBox.findElement(By.vaadin("#textbox")).sendKeys(string);
return comboBox.getPopupSuggestions();
}
}

Loading…
Cancel
Save