Skip to content

Commit 0416617

Browse files
authored
test(cdk/testing): attempt to deflake webdriver tests (#27319)
The Selenium Webdriver tests for harnesses have been flaky for a while now, because the click coordinates haven't been consistent across test runs. My theory is that it's due to the page being scrolled down on some of them. These changes attempt to reduce the flakes by making the clicked element fixed.
1 parent 5b62817 commit 0416617

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cdk/testing/tests/test-main-component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
<!-- Note that this element is fixed to avoid flakiness if the page has been scrolled down. -->
12
<div class="click-test" (click)="onClick($event)" (contextmenu)="onRightClick($event)"
2-
style="width: 100px; height: 100px; background: grey"
3+
style="width: 100px; height: 100px; background: grey; position: fixed; top: 0; right: 0; z-index: 10;"
34
#clickTestElement>
45
</div>
56
<div class="click-test-result">{{clickResult.x}}-{{clickResult.y}}</div>

0 commit comments

Comments
 (0)