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

test: add a failing test with React re-render #2545

Merged
merged 1 commit into from
Jun 11, 2020
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
2 changes: 2 additions & 0 deletions src/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
const { force = false, position } = options;
if (!force)
await this._waitForDisplayedAtStablePositionAndEnabled(progress);
if ((options as any).__testHookAfterStable)
await (options as any).__testHookAfterStable();

progress.log(apiLog, ' scrolling into view if needed');
progress.throwIfAborted(); // Avoid action that has side-effects.
Expand Down
12 changes: 12 additions & 0 deletions test/assets/react.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<head>
<script src="./react/react@16.13.1.production.min.js"></script>
<script src="./react/react-dom@16.13.1.production.min.js"></script>
</head>
<body>
<div class='react-root'></div>
<script>
window.e = React.createElement;
window.reactRoot = document.querySelector('.react-root');
window.renderComponent = c => ReactDOM.render(c, window.reactRoot);
</script>
</body>
Loading