generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace custom test fixture with global setup
- Loading branch information
1 parent
68d6ba3
commit 165e6ec
Showing
10 changed files
with
51 additions
and
39 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 was deleted.
Oops, something went wrong.
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,24 @@ | ||
import { type FullConfig, chromium } from '@playwright/test' | ||
|
||
const globalSetup = async (config: FullConfig) => { | ||
console.log('Starting global setup...') | ||
|
||
const browser = await chromium.launch() | ||
|
||
// Create a new browser context | ||
const context = await browser.newContext() | ||
|
||
// Create a new page in the context | ||
const page = await context.newPage() | ||
await page.goto('http://localhost:8892/modules') | ||
|
||
console.log('Waiting for modules to load...') | ||
await page.waitForFunction(() => { | ||
const moduleNames = ['time', 'echo', 'cron', 'fsm', 'http', 'pubsub'] | ||
|
||
return moduleNames.every((module) => document.querySelector(`li#module-tree-module-${module}`) !== null) | ||
}) | ||
console.log('Modules loaded!') | ||
} | ||
|
||
export default globalSetup |
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
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