mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-12 16:14:46 +08:00
* WIP * WIP * wip * WIP * Several fixes * Tests wip port to playwright * WIP * Fix more tests * Serialization tests fixed * Several fixes for tests * Input options types * Type adjustments * Fix object reference parser * Tests fixes * More tests fixes
27 lines
840 B
JavaScript
27 lines
840 B
JavaScript
import base from "@playwright/test"
|
|
import BlueprintFixture from "./BlueprintFixture.js"
|
|
|
|
export const test = /**
|
|
@type {typeof base.extend<{}, {
|
|
sharedContext: import("@playwright/test").BrowserContext,
|
|
blueprintPage: BlueprintFixture,
|
|
}>}
|
|
*/(base.extend)(
|
|
{
|
|
sharedContext: [async ({ browser }, use) => {
|
|
const context = await browser.newContext()
|
|
await use(context)
|
|
await context.close()
|
|
}, { scope: "worker" }],
|
|
blueprintPage: [async ({ sharedContext }, use) => {
|
|
const page = await sharedContext.newPage()
|
|
const blueprintPage = new BlueprintFixture(page)
|
|
await blueprintPage.setup()
|
|
await use(blueprintPage)
|
|
}, { scope: "worker" }]
|
|
}
|
|
)
|
|
|
|
export const expect = base.expect
|
|
export * from "@playwright/test"
|