diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2020-10-01 13:11:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 13:11:01 +0300 |
commit | a94403277111f0d43a82cd667d6a0277934d15fb (patch) | |
tree | 8785e667fc07877d0092da50b0cfc69ae52431bd /uitest/src/main | |
parent | 528315ac0d1d6b49d07f10d4613a8d28bd47b566 (diff) | |
download | vaadin-framework-a94403277111f0d43a82cd667d6a0277934d15fb.tar.gz vaadin-framework-a94403277111f0d43a82cd667d6a0277934d15fb.zip |
Test fixes & split failsafe integration test runs into smaller batches (#12103)
Diffstat (limited to 'uitest/src/main')
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java | 7 | ||||
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java b/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java index b4dc972d89..6b114176a0 100644 --- a/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java +++ b/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java @@ -5,13 +5,16 @@ import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractReindeerTestUI; import com.vaadin.tests.widgetset.TestingWidgetSet; import com.vaadin.tests.widgetset.server.LayoutDuringStateUpdateComponent; +import com.vaadin.ui.Button; @Widgetset(TestingWidgetSet.NAME) public class LayoutDuringStateUpdate extends AbstractReindeerTestUI { @Override protected void setup(VaadinRequest request) { - addComponent(new LayoutDuringStateUpdateComponent()); + // delay adding of the component to ensure unrelated layouting calls + // don't interfere with the test + addComponent(new Button("Add component", + e -> addComponent(new LayoutDuringStateUpdateComponent()))); } - } diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java index 6ccb8d6175..1859362015 100644 --- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java +++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java @@ -11,6 +11,7 @@ import com.vaadin.tests.widgetset.server.LayoutDuringStateUpdateComponent; public class LayoutDuringStateUpdateConnector extends AbstractComponentConnector implements PostLayoutListener { private int layoutCount = 0; + private String changeLog = ""; @Override protected void init() { @@ -29,13 +30,22 @@ public class LayoutDuringStateUpdateConnector extends AbstractComponentConnector try { getLayoutManager().layoutNow(); + + // these should never be reached + if (changeLog.isEmpty()) { + changeLog += " properties: "; + } + for (String property : stateChangeEvent.getChangedProperties()) { + changeLog += property + ", "; + } } catch (AssertionError e) { // Ignore } } private void updateLabelText() { - getWidget().setText("Layout phase count: " + layoutCount); + getWidget().setText("Layout phase count: " + layoutCount + changeLog); + changeLog = ""; } @Override |