Skip to content

Commit 13b735e

Browse files
add 'eslint-plugin-playwright' (#315)
1 parent f774289 commit 13b735e

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

.eslintrc.yml

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ overrides:
2222
- files: '**/*.js'
2323
env:
2424
node: true
25+
26+
- files: 'tests/**.ts'
27+
plugins: ['@typescript-eslint']
28+
extends:
29+
- 'plugin:playwright/playwright-test'
30+
2531
- files: ['**/*.ts', '**/*.tsx']
2632
parser: '@typescript-eslint/parser'
2733
parserOptions:

package-lock.json

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"css-loader": "6.7.1",
6565
"eslint": "8.20.0",
6666
"eslint-plugin-import": "2.27.5",
67+
"eslint-plugin-playwright": "0.12.0",
6768
"eslint-plugin-react": "7.32.2",
6869
"eslint-plugin-react-hooks": "4.6.0",
6970
"eslint-plugin-simple-import-sort": "10.0.0",

tests/demo.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ for (const name of SchemaPresets) {
3232

3333
await changeSchemaDialog.displayButton.click();
3434

35+
// eslint-disable-next-line playwright/no-wait-for-timeout
3536
await page.waitForTimeout(200); // FIXME
3637
await voyagerPage.waitForGraphToBeLoaded();
3738
await expect(voyagerPage.page).toHaveScreenshot(`show-${slug}-preset.png`);
@@ -75,7 +76,7 @@ test('use custom SDL', async ({ page }) => {
7576
await expect(voyagerPage.page).toHaveScreenshot('display-sdl.png');
7677
});
7778

78-
test.only('use custom SDL with custom directives', async ({ page }) => {
79+
test('use custom SDL with custom directives', async ({ page }) => {
7980
const voyagerPage = await gotoVoyagerPage(page);
8081
await voyagerPage.submitSDL('type Query @foo { bar: String @baz }');
8182

0 commit comments

Comments
 (0)