Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit 00f8015

Browse files
chore(deps): bump playwright from 1.4.2 to 1.7.1 (#1643)
1 parent 3891785 commit 00f8015

File tree

9 files changed

+1558
-7203
lines changed

9 files changed

+1558
-7203
lines changed

lib/a11y-snapshot/__snapshots__/aom.test.js.snap

Lines changed: 1516 additions & 7141 deletions
Large diffs are not rendered by default.

lib/a11y-snapshot/a11y-tree-serializer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ function serializeAxNode(node) {
4242
{
4343
"combobox list": "MenuListPopup", // what chromium uses
4444
"combobox option": "menuitem", // what chromium uses
45-
"date editor": "Date",
45+
"date editor": "DateTime", // what chromium uses
46+
"list item marker": "ListMarker", // what chromium uses
4647
// Chromium still uses textbox.
4748
"password text": "textbox",
4849
// TODO: should probably use the paragraph role instead?
4950
"text container": "text-container",
5051
"text leaf": "text",
52+
"time editor": "InputTime", // what chromium uses
5153
// Chrome uses <button pressed="true|false" />
5254
"toggle button": "togglebutton",
5355
}[role] || role;

lib/a11y-snapshot/aom.test.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ describe.each(["chromium", "firefox"])("%s", (browserType) => {
66
* @type {import('playwright').Browser}
77
*/
88
let browser;
9-
/**
10-
* @type {import('playwright').Page}
11-
*/
12-
let page;
139

1410
beforeAll(async () => {
1511
browser = await playwright[browserType].launch();
@@ -19,16 +15,9 @@ describe.each(["chromium", "firefox"])("%s", (browserType) => {
1915
await browser.close();
2016
});
2117

22-
beforeEach(async () => {
23-
page = await browser.newPage();
24-
});
25-
26-
afterEach(async () => {
27-
await page.close();
28-
});
29-
3018
it("/", async () => {
31-
blockSocials(page);
19+
const page = await browser.newPage();
20+
await blockSocials(page);
3221
await gotoMuiPage(page, "/");
3322
const tree = await page.accessibility.snapshot({ interestingOnly: false });
3423

@@ -135,7 +124,8 @@ describe.each(["chromium", "firefox"])("%s", (browserType) => {
135124
"/components/rating/",
136125
"/components/tree-view/",
137126
])(`%s`, async (docsRoute) => {
138-
blockAds(page);
127+
const page = await browser.newPage();
128+
await blockAds(page);
139129
await gotoMuiPage(page, docsRoute);
140130
const main = await page.$("main");
141131
const tree = await page.accessibility.snapshot({

lib/a11y-snapshot/axe.test.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ describe.each(["chromium"])("%s", (browserType) => {
2727
* @type {import('playwright').Browser}
2828
*/
2929
let browser;
30-
/**
31-
* @type {import('playwright').Page}
32-
*/
33-
let page;
3430

3531
beforeAll(async () => {
3632
browser = await playwright[browserType].launch();
@@ -40,19 +36,17 @@ describe.each(["chromium"])("%s", (browserType) => {
4036
await browser.close();
4137
});
4238

43-
beforeEach(async () => {
44-
page = await browser.newPage();
39+
async function newPage() {
40+
const page = await browser.newPage();
4541
await page.addInitScript({
4642
path: require.resolve("axe-core"),
4743
});
48-
});
49-
50-
afterEach(async () => {
51-
await page.close();
52-
});
44+
return page;
45+
}
5346

5447
it("/", async () => {
55-
blockSocials(page);
48+
const page = await newPage();
49+
await blockSocials(page);
5650
await gotoMuiPage(page, "/");
5751

5852
await expect(axeRun(page)).resolves.toMatchAxeSnapshot();
@@ -81,7 +75,8 @@ describe.each(["chromium"])("%s", (browserType) => {
8175
"/components/rating/",
8276
"/components/tree-view/",
8377
])(`%s`, async (docsRoute) => {
84-
blockAds(page);
78+
const page = await newPage();
79+
await blockAds(page);
8580
await gotoMuiPage(page, docsRoute);
8681

8782
await expect(axeRun(page)).resolves.toMatchAxeSnapshot();

lib/a11y-snapshot/deploy.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
{
2-
"id": "5feefb6c270be300082db725",
2+
"id": "5ff055ad0661c60008aec543",
33
"site_id": "64f32322-7c26-4008-b886-60800cd747b0",
4-
"build_id": "5feefb6c270be300082db723",
4+
"build_id": "5ff055ad0661c60008aec541",
55
"state": "ready",
66
"name": "material-ui",
77
"url": "http://material-ui.netlify.app",
88
"admin_url": "https://app.netlify.com/sites/material-ui",
99
"deploy_url": "http://next--material-ui.netlify.app",
1010
"deploy_ssl_url": "https://next--material-ui.netlify.app",
11-
"created_at": "2021-01-01T10:37:32.182Z",
12-
"updated_at": "2021-01-01T11:06:07.003Z",
13-
"commit_ref": "f736ebe441d73c823919887ac0f8d5fa983ef0e0",
11+
"created_at": "2021-01-02T11:14:53.574Z",
12+
"updated_at": "2021-01-02T11:29:49.203Z",
13+
"commit_ref": "377deb77cc424cc4e50190a1ad787b44568a0639",
1414
"review_id": null,
1515
"skipped": null,
1616
"locked": null,
1717
"branch": "next",
18-
"commit_url": "https://github.com/mui-org/material-ui/commit/f736ebe441d73c823919887ac0f8d5fa983ef0e0",
18+
"commit_url": "https://github.com/mui-org/material-ui/commit/377deb77cc424cc4e50190a1ad787b44568a0639",
1919
"log_access_attributes": {
2020
"type": "firebase",
21-
"url": "https://netlify-builds2.firebaseio.com/builds/5feefb6c270be300082db723/log",
22-
"endpoint": "https://netlify-builds2.firebaseio.com",
23-
"path": "/builds/5feefb6c270be300082db723/log",
24-
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2IjowLCJpYXQiOjE2MDk1MDUxNzMsImQiOnsidWlkIjoiIn19.MyTwpqnqDPE3ThZKF-dhq_8lpvV1UDvEWIrNaTFDhdE"
21+
"url": "https://netlify-builds4.firebaseio.com/builds/5ff055ad0661c60008aec541/log",
22+
"endpoint": "https://netlify-builds4.firebaseio.com",
23+
"path": "/builds/5ff055ad0661c60008aec541/log",
24+
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2IjowLCJpYXQiOjE2MDk2MDg5NTQsImQiOnsidWlkIjoiIn19.F1yeT05D7ZoesQB_G593dvne7U5jEWu5WyadmhZOTEA"
2525
},
26-
"title": "[DatePicker] Fix year only view, hide the current month (#24205)",
26+
"title": "[docs] Sync translations (#24161)",
2727
"review_url": null,
2828
"published_at": null,
2929
"context": "branch-deploy",
30-
"deploy_time": 995,
30+
"deploy_time": 893,
3131
"public": true,
3232
"plugin_state": "success"
3333
}

lib/a11y-snapshot/mui-utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ async function blockAds(page) {
3535
"https://cd2n.codefund.io/**",
3636
"https://cdn.carbonads.com/**",
3737
].map((url) => {
38-
return page.route(url, (route) => {
39-
route.abort();
38+
return page.route(url, async (route) => {
39+
await route.abort();
4040
});
4141
})
4242
);
@@ -49,8 +49,8 @@ async function blockSocials(page) {
4949
await Promise.all(
5050
["https://platform.twitter.com/**", "https://buttons.github.io/**"].map(
5151
(url) => {
52-
return page.route(url, (route) => {
53-
route.abort();
52+
return page.route(url, async (route) => {
53+
await route.abort();
5454
});
5555
}
5656
)

lib/a11y-snapshot/screen-reader.test.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ describe("nvda", () => {
3030
* @type {import('playwright').Browser}
3131
*/
3232
let browser;
33-
/**
34-
* @type {import('playwright').Page}
35-
*/
36-
let page;
3733

3834
beforeAll(async () => {
3935
browser = await playwright.chromium.launch({ headless: false });
@@ -43,23 +39,16 @@ describe("nvda", () => {
4339
await browser.close();
4440
});
4541

46-
beforeEach(async () => {
47-
page = await browser.newPage();
48-
});
49-
50-
afterEach(async () => {
51-
await page.close();
52-
});
53-
5442
test("quick access to the docs search", async () => {
43+
const page = await browser.newPage();
5544
await blockSocials(page);
5645
await gotoMuiPage(page, "/");
5746

5847
await expect(async () => {
5948
await page.keyboard.press("Control+k");
6049
}).toMatchSpeechInlineSnapshot(`
6150
"banner landmark"
62-
"Search, combo box, expanded, has auto complete, editable, Search…"
51+
"Search, combo box, expanded, has auto complete, editable, Search…, blank"
6352
`);
6453

6554
await expect(async () => {
@@ -75,6 +64,7 @@ describe("nvda", () => {
7564
}, 20000);
7665

7766
test("settings drawer", async () => {
67+
const page = await browser.newPage();
7868
await blockAds(page);
7969
await gotoMuiPage(page, "/components/box");
8070
const $document = await getDocument(page);
@@ -125,6 +115,7 @@ describe("nvda", () => {
125115

126116
describe("Slider", () => {
127117
test("keyboard navigation when horizontal", async () => {
118+
const page = await browser.newPage();
128119
await blockAds(page);
129120
await gotoMuiPage(page, "/components/slider");
130121
const $document = await getDocument(page);
@@ -170,6 +161,7 @@ describe("nvda", () => {
170161
}, 30000);
171162

172163
test("keyboard navigation when vertical", async () => {
164+
const page = await browser.newPage();
173165
await blockAds(page);
174166
await gotoMuiPage(page, "/components/slider");
175167
const $document = await getDocument(page);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"lodash": "^4.17.20",
2323
"netlify": "^6.0.7",
2424
"node-fetch": "^2.6.1",
25-
"playwright": "1.4.2",
25+
"playwright": "1.7.1",
2626
"playwright-testing-library": "^2.7.0",
2727
"prettier": "^2.2.1",
2828
"react": "^17.0.1",

yarn.lock

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5573,10 +5573,10 @@ playwright-testing-library@^2.7.0:
55735573
"@testing-library/dom" "^7.22.2"
55745574
wait-for-expect "^3.0.2"
55755575

5576-
playwright@1.4.2:
5577-
version "1.4.2"
5578-
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.4.2.tgz#84dac641ff7af9f465e367e01fde8a8f1cc274bf"
5579-
integrity sha512-qiQHrhU4JBxup9JoGZff6hdFL2VrD+ae5QLELGHwRq/vYNQFeJF10Z3ENnQ6hWJmG+YnpfzgoBvX+cUg4WHwTw==
5576+
playwright@1.7.1:
5577+
version "1.7.1"
5578+
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.7.1.tgz#841638811bc39eb2fed792ffaacbcc959a0aaf5e"
5579+
integrity sha512-dOSWME42wDedJ/PXv8k0zG0Kxd6d6R2OKA51/05++Z2ISdA4N58gHlWqlVKPDkBog1MI6lu/KNt7QDn19AybWQ==
55805580
dependencies:
55815581
debug "^4.1.1"
55825582
extract-zip "^2.0.1"
@@ -5585,6 +5585,7 @@ [email protected]:
55855585
mime "^2.4.6"
55865586
pngjs "^5.0.0"
55875587
progress "^2.0.3"
5588+
proper-lockfile "^4.1.1"
55885589
proxy-from-env "^1.1.0"
55895590
rimraf "^3.0.2"
55905591
ws "^7.3.1"

0 commit comments

Comments
 (0)