1
0
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:
Joe Anderson 2023-03-16 23:20:41 +00:00 committed by GitHub
parent 4244a8d67c
commit a9c0e37472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -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.

View File

@ -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')

View File

@ -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')