-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from getodk/fix/post-060-wfp
Fix: Web Forms Preview demo form links
- Loading branch information
Showing
6 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test('Web Forms Preview: demo forms load', async ({ context, page }) => { | ||
await page.goto('http://localhost:5174/'); | ||
|
||
const formPreviewLinks = await page.locator('.form-preview-link').all(); | ||
|
||
expect(formPreviewLinks.length).toBeGreaterThan(0); | ||
|
||
for await (const link of formPreviewLinks) { | ||
const [previewPage] = await Promise.all([context.waitForEvent('page'), link.click()]); | ||
|
||
await previewPage.waitForSelector( | ||
'.form-initialization-status.error, .form-initialization-status.ready', | ||
{ | ||
state: 'attached', | ||
} | ||
); | ||
|
||
const [failureDialog] = await previewPage.locator('.form-load-failure-dialog').all(); | ||
|
||
expect(failureDialog).toBeUndefined(); | ||
|
||
await previewPage.close(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters