Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout-based integration tests stabilization for Chrome #304

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ java.util.Date date = new java.util.Date();
</div>
</div>
<script>
setTimeout(function(){ document.getElementById("date-panel").style.display = 'none'; }, 3000);
setTimeout(function(){ document.getElementById("date-panel").style.display = 'none'; }, 10000);
</script>
<%@ include file="/includes/bodyContent.jsp" %>
<%@ include file="/includes/footer.jsp" %>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
</div>
<script>
setTimeout(function(){ document.getElementById("test-element").style.display = ''; }, 4000);
setTimeout(function(){ document.getElementById("test-element").style.display = ''; }, 8000);
</script>

<%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
</div>
<script>
setTimeout(function(){ document.getElementById("test-element").style.display = ''; }, 4000);
setTimeout(function(){ document.getElementById("test-element").style.display = ''; }, 11000);
</script>

<%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@
elementToChange.innerHTML = 'Final Text That is displayed after timeout while page elements are still loading.';
}
++COUNTER;
}, t * 600);
}, t * 1000);
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
@Modules(GuiceModule.class)
public class HomePageTilesTest {

private static final int TESTS = 113;
private static final int TESTS = 115;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two tests have been added in this PR: #294


private static final int EXPECTED_TESTS_SUCCESS = 66;
private static final int EXPECTED_TESTS_SUCCESS = 68;

private static final int EXPECTED_TESTS_WARN = 5;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Feature: Tests Results Filtering
Scenario: Filtering Tests Results: layout
Given I have opened sample tests report page
When I search for tests containing "layout"
Then There are 13 tiles visible
And Statistics text contains "13 ( 3 / 0 / 10 / 0 )"
Then There are 15 tiles visible
And Statistics text contains "15 ( 4 / 0 / 11 / 0 )"

Scenario: Filtering Tests Results: jserrors
Given I have opened sample tests report page
Expand Down Expand Up @@ -98,4 +98,4 @@ Feature: Tests Results Filtering
Given I have opened sample tests report page
When I search for tests containing "wait-for-image-completion"
Then There are 4 tiles visible
And Statistics text contains "4 ( 2 / 0 / 2 / 0 )"
And Statistics text contains "4 ( 1 / 0 / 3 / 0 )"
2 changes: 1 addition & 1 deletion integration-tests/test-suite/partials/sleep-modifier.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<collect>
<open />
<resolution width="1500" />
<sleep duration="6000" />
<sleep duration="10000" />
<screen />
</collect>
<compare>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<collect>
<open />
<resolution width="1500" />
<wait-for-element-to-be-visible css="#test-element" timeout = "6000"/>
<wait-for-element-to-be-visible css="#test-element" timeout = "10000"/>
<screen />
</collect>
<compare>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<test name="S-modifier-Wait-For-Image-Completion">
<collect>
<open />
<resolution width="1500" />
<resolution width="1500" height="800"/>
<wait-for-image-completion xpath="//img[@id = 'image-to-wait-for']" timeout = "15000"/>
<screen />
</collect>
Expand All @@ -39,8 +39,8 @@
<test name="F-modifier-Wait-For-Image-Completion-not-visible">
<collect>
<open />
<resolution width="1500" />
<wait-for-image-completion css="#image-to-wait-for" timeout = "100"/>
<resolution width="1500" />
<wait-for-image-completion css="#image-to-wait-for" timeout="100"/>
<screen />
</collect>
<compare>
Expand All @@ -54,7 +54,7 @@
<test name="S-modifier-Wait-For-Image-Completion-slow-image">
<collect>
<open />
<resolution width="1500" />
<resolution width="1500" />
<!-- image is served with additional latency -->
<wait-for-image-completion css="#image-to-wait-for" timeout = "7000"/>
<screen />
Expand All @@ -67,11 +67,12 @@
</urls>
</test>

<test name="F-modifier-Wait-For-Image-Completion-slow-image">
<!-- Should pass because Chrome waits for images in the <open> phase -->
<test name="S-modifier-Wait-For-Image-Completion-slow-image-short-timeout">
<collect>
<open />
<!-- image is served with additional latency -->
<wait-for-image-completion xpath="//img[@id = 'image-to-wait-for']" timeout = "3000"/>
<wait-for-image-completion xpath="//img[@id = 'image-to-wait-for']" timeout = "1"/>
<screen />
</collect>
<compare>
Expand Down