calcom/apps/web/playwright/lib/fixtures.ts
Demian Caldelas 0390ae9ee1
Introducing Playwright Fixtures - Users Factory (#2293)
* Fix not able to logout using the logout path

* Add users fixture for e2e tests

* typo

Co-authored-by: Omar López <zomars@me.com>
2022-03-28 20:06:41 +00:00

17 lines
458 B
TypeScript

import { test as base } from "@playwright/test";
import { createUsersFixture } from "../fixtures/users";
import type { UsersFixture } from "../fixtures/users";
interface Fixtures {
users: UsersFixture;
}
export const test = base.extend<Fixtures>({
users: async ({ page }, use, testInfo) => {
// instantiate the fixture
const usersFixture = createUsersFixture(page);
// use the fixture within the test
await use(usersFixture);
},
});