Skip to content

Commit 97f8be1

Browse files
committed
attempt to fix failing playwright test
1 parent 88f3f80 commit 97f8be1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

playwright/integration/examples/code-highlighting.test.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test.setTimeout(60 * 1000)
44

55
test.describe('code highlighting', () => {
66
test.beforeEach(async ({ page }) => {
7-
page.goto('http://localhost:3000/examples/code-highlighting')
7+
await page.goto('http://localhost:3000/examples/code-highlighting')
88
})
99

1010
for (const testCase of getTestCases()) {
@@ -32,7 +32,10 @@ test.describe('code highlighting', () => {
3232
async function setText(page: Page, text: string, language: string) {
3333
await page.locator('[data-slate-editor]').fill('') // clear editor
3434
await page.getByTestId('code-block-button').click() // convert first and the only one paragraph to code block
35-
await page.getByTestId('language-select').selectOption({ value: language }) // select the language option
35+
await page
36+
.getByTestId('language-select')
37+
.first()
38+
.selectOption({ value: language }) // select the language option
3639

3740
await page.keyboard.type(text) // type text
3841
}

0 commit comments

Comments
 (0)