-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition in embedding tests (#8507)
* Wait for a shadow root to appear to work around race condition with HTML import polyfill * Update chrome driver to 83.0.4103.39 (#8407) * IE compatible version of JS Co-authored-by: Zhe Sun <[email protected]>
- Loading branch information
Showing
11 changed files
with
43 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ng-test-assets/src/test/java/com/vaadin/flow/webcomponent/EmbeddingChromeBrowserTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.vaadin.flow.webcomponent; | ||
|
||
import com.vaadin.flow.testutil.ChromeBrowserTest; | ||
|
||
public abstract class EmbeddingChromeBrowserTest extends ChromeBrowserTest { | ||
|
||
@Override | ||
protected void open() { | ||
super.open(); | ||
|
||
// Wait for at least one shadow root to appear. This is to avoid race | ||
// conditions where the test starts before the shadow root has been | ||
// attached #8329 | ||
this.waitUntil((driver) -> Boolean.TRUE | ||
.equals(this.getCommandExecutor().executeScript( | ||
"return Array.prototype.slice.call(document.getElementsByTagName(\"*\")).some(function (x) { return !!x.shadowRoot })"))); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters