It is possible to have fixture fromFirstPageToBaseUrl
invoke the fixture setFromStartApis
?
const baseTest = test.extend({
setFromStartApis: async ({ page }) => {
injectOktaToken(page);
await setClientsApiMock(page);
await setReconcileApiMock(page);
},
fromFirstPageToBaseUrl: async ({ page, setFromStartApis }, use) => {
use(setFromStartApis)
await page.goto('/');
},
describe.only('When using the portal', function() {
it('reconciler should be accessable from the portal', async ({ fromFirstPageToBaseUrl }) => {
await fromFirstPageToBaseUrl.getByText('GO TO PATIENT RECONCILIATION').click();
expect(fromFirstPageToBaseUrl).toHaveURL(/.*reconcile/);
});
This thread is trying to answer question "How to invoke a fixture from another fixture?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].