Skip to content

Commit 9e43faa

Browse files
authored
Upgrade playwright to 1.13.1 (#179)
* Upgrade playwright to 1.13.1 * Add command to install browser locally * Update screenshots Remove screenshot matching on completer
1 parent b41f2c1 commit 9e43faa

File tree

49 files changed

+85
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+85
-29
lines changed

command-palette/ui-tests/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
4444
```
4545
cd ui-tests
4646
jlpm install
47+
npx playwright install
4748
npx playwright test
4849
```
4950

@@ -77,6 +78,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
7778
```
7879
cd ui-tests
7980
jlpm install
81+
npx playwright install
8082
npx playwright codegen localhost:8888
8183
```
8284

@@ -110,5 +112,6 @@ jupyter lab --ServerApp.token= --ServerApp.password=
110112
```
111113
cd ui-tests
112114
jlpm install
115+
npx playwright install
113116
PWDEBUG=1 npx playwright test
114117
```

command-palette/ui-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "BSD-3-Clause",
88
"private": true,
99
"devDependencies": {
10-
"@playwright/test": "1.12.3",
10+
"@playwright/test": "1.13.1",
1111
"typescript": "~4.1.3"
1212
}
1313
}

commands/ui-tests/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
4444
```
4545
cd ui-tests
4646
jlpm install
47+
npx playwright install
4748
npx playwright test
4849
```
4950

@@ -77,6 +78,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
7778
```
7879
cd ui-tests
7980
jlpm install
81+
npx playwright install
8082
npx playwright codegen localhost:8888
8183
```
8284

@@ -110,5 +112,6 @@ jupyter lab --ServerApp.token= --ServerApp.password=
110112
```
111113
cd ui-tests
112114
jlpm install
115+
npx playwright install
113116
PWDEBUG=1 npx playwright test
114117
```

commands/ui-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "BSD-3-Clause",
88
"private": true,
99
"devDependencies": {
10-
"@playwright/test": "1.12.3",
10+
"@playwright/test": "1.13.1",
1111
"typescript": "~4.1.3"
1212
}
1313
}

completer/ui-tests/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
4444
```
4545
cd ui-tests
4646
jlpm install
47+
npx playwright install
4748
npx playwright test
4849
```
4950

@@ -77,6 +78,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
7778
```
7879
cd ui-tests
7980
jlpm install
81+
npx playwright install
8082
npx playwright codegen localhost:8888
8183
```
8284

@@ -110,5 +112,6 @@ jupyter lab --ServerApp.token= --ServerApp.password=
110112
```
111113
cd ui-tests
112114
jlpm install
115+
npx playwright install
113116
PWDEBUG=1 npx playwright test
114117
```

completer/ui-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "BSD-3-Clause",
88
"private": true,
99
"devDependencies": {
10-
"@playwright/test": "1.12.3",
10+
"@playwright/test": "1.13.1",
1111
"typescript": "~4.1.3"
1212
}
1313
}

completer/ui-tests/tests/completer.spec.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ test('should open a notebook and use the completer', async ({ page }) => {
5151
}
5252
}
5353

54-
// Increase tolerance as the cursor may or may not be captured
55-
// - the threshold is low enough to check the completion pop-up is missing
56-
expect(
57-
await (await page.$('.jp-Notebook.jp-NotebookPanel-notebook')).screenshot()
58-
).toMatchSnapshot('completer-example.png', { threshold: 0.2 });
59-
6054
// Click on suggestions
61-
await suggestions.click();
55+
await Promise.all([
56+
page.waitForSelector('code:has-text("yMagic")', { state: 'hidden' }),
57+
suggestions.click(),
58+
]);
6259

63-
expect(await page.waitForSelector('text=yMagic')).toBeTruthy();
60+
expect(
61+
await page.waitForSelector('text=yMagic', { state: 'visible' })
62+
).toBeTruthy();
6463
});
10.9 KB
Loading

context-menu/ui-tests/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
4444
```
4545
cd ui-tests
4646
jlpm install
47+
npx playwright install
4748
npx playwright test
4849
```
4950

@@ -77,6 +78,7 @@ jupyter lab --ServerApp.token= --ServerApp.password=
7778
```
7879
cd ui-tests
7980
jlpm install
81+
npx playwright install
8082
npx playwright codegen localhost:8888
8183
```
8284

@@ -110,5 +112,6 @@ jupyter lab --ServerApp.token= --ServerApp.password=
110112
```
111113
cd ui-tests
112114
jlpm install
115+
npx playwright install
113116
PWDEBUG=1 npx playwright test
114117
```

0 commit comments

Comments
 (0)