mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-20 05:11:53 +02:00
Fix markdown-shortcuts.test.ts
for webkit (#5367)
* Fix test failure on webkit * Increase Playwright timeout
This commit is contained in:
parent
4244a8d67c
commit
a9c0e37472
@ -46,7 +46,7 @@ const retries = process.env.PLAYWRIGHT_RETRIES
|
||||
const config: PlaywrightTestConfig = {
|
||||
testDir: './playwright',
|
||||
/* Maximum time one test can run for. */
|
||||
timeout: 10 * 1000,
|
||||
timeout: 20 * 1000,
|
||||
expect: {
|
||||
/**
|
||||
* Maximum time expect() should wait for the condition to be met.
|
||||
|
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user