2
0

AppendTextToEditorUntilContains.ts 289 B

1234567891011
  1. import { expect, type Page } from '@playwright/test';
  2. export const appendTextToEditorUntilContains = async (
  3. page: Page,
  4. text: string,
  5. ) => {
  6. await page.locator('.cm-content').fill(text);
  7. await expect(page.getByTestId('page-editor-preview-body')).toContainText(
  8. text,
  9. );
  10. };