Files
ueblueprint/tests/fixtures/test.js
barsdeveloper 7469d55518 Replace parsing and test libraries
* 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
2024-02-14 00:40:42 +01:00

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"