Skip to content

Commit fc0d7f1

Browse files
committed
fix: Update playwright test support
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
1 parent 6bcf25d commit fc0d7f1

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.vue,.ts,.mjs src playwright",
1111
"lint:fix": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.vue,.ts,.mjs src playwright --fix",
1212
"start:nextcloud": "node playwright/start-nextcloud-server.mjs",
13+
"test:e2e": "playwright test",
14+
"test:e2e:ui": "playwright test --ui",
15+
"test:e2e:report": "playwright show-report",
1316
"stylelint": "stylelint 'src/**/*.vue' 'css/**/*.css'",
1417
"stylelint:fix": "stylelint 'src/**/*.vue' 'css/**/*.css' --fix"
1518
},

playwright/support/login.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ export async function login(page: Page): Promise<void> {
1818
await page.locator('#password').press('Enter')
1919

2020
// Wait for login to finish
21-
await page.waitForURL('**/apps/**', { waitUntil: 'domcontentloaded' })
21+
await page.waitForURL('**/apps/**', {
22+
waitUntil: 'domcontentloaded',
23+
timeout: 60000,
24+
})
2225
}

playwright/support/sections/NoteEditor.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ export class NoteEditor {
1111
public readonly content: Locator
1212

1313
constructor(public readonly page: Page) {
14-
this.el = this.page.locator('.editor').first()
15-
this.content = this.el.getByRole('textbox')
14+
this.el = this.page.locator('.text-editor, .note-editor').first()
15+
this.content = this.el
16+
.locator(
17+
'.ProseMirror, .CodeMirror textarea, [contenteditable="true"]',
18+
)
19+
.first()
1620
}
1721

1822
public async type(keys: string): Promise<void> {

0 commit comments

Comments
 (0)