Skip to content

Commit

Permalink
chore: fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Leksat committed Jan 27, 2025
1 parent 45cb6bc commit a7e47fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/tests/silverback-gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"scripts": {
"test:static": "tsc --noEmit && eslint . --quiet",
"test:integration": "playwright install chromium && pnpm test:readonly && pnpm test:mutating",
"test:integration:headed": "playwright install chromium && pnpm test:readonly --headed && pnpm test:mutating --headed",
"test:readonly": "playwright test --pass-with-no-tests",
"test:mutating": "playwright test --pass-with-no-tests -c playwright.config.mutating.ts",
"headed:readonly": "pnpm test:readonly --headed",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ test('basic updates', async ({ page }) => {
await drupalLogin(page);

await page.goto(`${drupal.baseUrl}/node/add/article`);
await page.type('#edit-title-0-value', title);
await page.getByLabel('Editor editing area: main.').fill(initialBodyText);
await page.fill('#edit-title-0-value', title);
await page
.getByRole('textbox', { name: 'Rich Text Editor. Editing' })
.fill(initialBodyText);
await page.click('#edit-submit');
await waitForGatsby();

Expand All @@ -31,7 +33,9 @@ test('basic updates', async ({ page }) => {
await expect(page.locator('body')).toContainText(initialBodyText);

await page.goto(`${drupal.baseUrl}${pagePath}/edit`);
await page.getByLabel('Editor editing area: main.').fill(updatedBodyText);
await page
.getByRole('textbox', { name: 'Rich Text Editor. Editing' })
.fill(updatedBodyText);
await page.click('#edit-submit');
await waitForGatsby();

Expand Down

0 comments on commit a7e47fa

Please sign in to comment.