mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 09:29:49 +02:00
Fix markdown-shortcuts.test.ts
for webkit (#5367)
* Fix test failure on webkit * Increase Playwright timeout
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { test, expect, Page } from '@playwright/test'
|
||||
|
||||
test.setTimeout(60 * 1000)
|
||||
|
||||
test.describe('code highlighting', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
page.goto('http://localhost:3000/examples/code-highlighting')
|
||||
|
@@ -14,7 +14,7 @@ test.describe('On markdown-shortcuts example', () => {
|
||||
).toContain('A wise quote.')
|
||||
})
|
||||
|
||||
test('can add list items', async ({ page }) => {
|
||||
test('can add list items', async ({ page }, testInfo) => {
|
||||
expect(
|
||||
await page
|
||||
.getByRole('textbox')
|
||||
@@ -23,7 +23,9 @@ test.describe('On markdown-shortcuts example', () => {
|
||||
).toBe(0)
|
||||
|
||||
await page.getByRole('textbox').click()
|
||||
await page.getByRole('textbox').press('Home')
|
||||
await page
|
||||
.getByRole('textbox')
|
||||
.press(testInfo.project.name === 'webkit' ? 'Meta+ArrowLeft' : 'Home')
|
||||
await page.getByRole('textbox').type('* 1st Item')
|
||||
await page.keyboard.press('Enter')
|
||||
await page.getByRole('textbox').type('2nd Item')
|
||||
|
Reference in New Issue
Block a user