/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/e2e-test-utils-playwright/src/editor/save-draft.ts
17 строк
463 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import type { Editor } from './index'; /** * Saves the post as a draft, resolving once the request is complete (once a notice * is displayed). */ export async function saveDraft( this: Editor ) { await this.page .getByRole( 'region', { name: 'Editor top bar' } ) .getByRole( 'button', { name: 'Save draft' } ) .click(); await this.page .getByRole( 'button', { name: 'Dismiss this notice' } ) .filter( { hasText: 'Draft saved' } ) .waitFor(); }