Skip to content

Commit

Permalink
fix(SLB-304): pick specific form in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab authored and mattiasimonato committed Apr 16, 2024
1 parent 6c749a2 commit 6dc1872
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/e2e/specs/drupal/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ test('All blocks are rendered', async ({ page }) => {
);

// Form
await expect(page.locator('.silverback-iframe iframe')).toHaveAttribute(
'src',
'http://127.0.0.1:8000/en/form/contact?iframe=true',
);
await expect(
page.locator('.silverback-iframe iframe').last(),
).toHaveAttribute('src', 'http://127.0.0.1:8000/en/form/contact?iframe=true');
});
2 changes: 2 additions & 0 deletions tests/e2e/specs/drupal/webforms.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test('Webforms work', async ({ page }) => {
// Webform can be submitted.
await page
.frameLocator('.silverback-iframe iframe')
.last()
.getByRole('button', { name: 'Send message' })
.click();

Expand All @@ -29,6 +30,7 @@ test('Webforms work', async ({ page }) => {
await page.goto(websiteUrl('/de/blocks-complete'));
await page
.frameLocator('.silverback-iframe iframe')
.last()
.getByRole('button', { name: 'Send message' })
.click();
// TODO: Find out why it does not work.
Expand Down

0 comments on commit 6dc1872

Please sign in to comment.