Lock yarn to 1.23.0 (#922)
* Lock yarn to 1.23.0 * fix flaky test * Fix flaky tests
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/.yarn/releases/** binary
|
||||||
|
/.yarn/plugins/** binary
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -3,7 +3,6 @@
|
|||||||
.idea
|
.idea
|
||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
# yarn.lock
|
|
||||||
|
|
||||||
temp
|
temp
|
||||||
|
|
||||||
@@ -17,3 +16,7 @@ build
|
|||||||
dist
|
dist
|
||||||
|
|
||||||
.turbo
|
.turbo
|
||||||
|
|
||||||
|
# `.yarn/install-state.gz` is an optimization file that you shouldn't ever have to commit.
|
||||||
|
# It simply stores the exact state of your project so that the next commands can boot without having to resolve your workspaces all over again.
|
||||||
|
.yarn/install-state.gz
|
||||||
147392
.yarn/releases/yarn-1.23.0-20220130.1630.cjs
vendored
Executable file
147392
.yarn/releases/yarn-1.23.0-20220130.1630.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
yarnPath: '.yarn/releases/yarn-1.23.0-20220130.1630.cjs'
|
||||||
@@ -547,36 +547,39 @@ describe('record integration tests', function (this: ISuite) {
|
|||||||
await page.goto('about:blank');
|
await page.goto('about:blank');
|
||||||
await page.setContent(getHtml.call(this, 'frame2.html'));
|
await page.setContent(getHtml.call(this, 'frame2.html'));
|
||||||
|
|
||||||
|
await page.waitForTimeout(10); // wait till frame was added to dom
|
||||||
|
await waitForRAF(page); // wait till browser loaded contents of frame
|
||||||
|
|
||||||
await page.evaluate(() => {
|
await page.evaluate(() => {
|
||||||
const sleep = (ms: number) =>
|
// get contentDocument of iframe five
|
||||||
new Promise((resolve) => setTimeout(resolve, ms));
|
const contentDocument1 = document.querySelector('iframe')!
|
||||||
let iframe: HTMLIFrameElement;
|
.contentDocument!;
|
||||||
sleep(10)
|
// create shadow dom #1
|
||||||
.then(() => {
|
contentDocument1.body.attachShadow({ mode: 'open' });
|
||||||
// get contentDocument of iframe five
|
contentDocument1.body.shadowRoot!.appendChild(
|
||||||
const contentDocument1 = document.querySelector('iframe')!
|
document.createElement('div'),
|
||||||
.contentDocument!;
|
);
|
||||||
// create shadow dom #1
|
const div = contentDocument1.body.shadowRoot!.childNodes[0];
|
||||||
contentDocument1.body.attachShadow({ mode: 'open' });
|
const iframe = contentDocument1.createElement('iframe');
|
||||||
contentDocument1.body.shadowRoot!.appendChild(
|
// append an iframe to shadow dom #1
|
||||||
document.createElement('div'),
|
div.appendChild(iframe);
|
||||||
);
|
|
||||||
const div = contentDocument1.body.shadowRoot!.childNodes[0];
|
|
||||||
iframe = contentDocument1.createElement('iframe');
|
|
||||||
// append an iframe to shadow dom #1
|
|
||||||
div.appendChild(iframe);
|
|
||||||
return sleep(10);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
const contentDocument2 = iframe.contentDocument!;
|
|
||||||
// create shadow dom #2 in the iframe
|
|
||||||
contentDocument2.body.attachShadow({ mode: 'open' });
|
|
||||||
contentDocument2.body.shadowRoot!.appendChild(
|
|
||||||
document.createElement('span'),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
await page.waitForTimeout(50);
|
|
||||||
|
await waitForRAF(page); // wait till browser loaded contents of frame
|
||||||
|
|
||||||
|
page.evaluate(() => {
|
||||||
|
const iframe: HTMLIFrameElement = document
|
||||||
|
.querySelector('iframe')!
|
||||||
|
.contentDocument!.body.shadowRoot!.querySelector('iframe')!;
|
||||||
|
|
||||||
|
const contentDocument2 = iframe.contentDocument!;
|
||||||
|
// create shadow dom #2 in the iframe
|
||||||
|
contentDocument2.body.attachShadow({ mode: 'open' });
|
||||||
|
contentDocument2.body.shadowRoot!.appendChild(
|
||||||
|
document.createElement('span'),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
await waitForRAF(page); // wait till browser sent snapshots
|
||||||
|
|
||||||
const snapshots = await page.evaluate('window.snapshots');
|
const snapshots = await page.evaluate('window.snapshots');
|
||||||
assertSnapshot(snapshots);
|
assertSnapshot(snapshots);
|
||||||
|
|||||||
Reference in New Issue
Block a user