add: full multi-tenancy control
This commit is contained in:
25
packages/Webkul/Admin/tests/e2e-pw/setup.ts
Normal file
25
packages/Webkul/Admin/tests/e2e-pw/setup.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { test as base, expect, type Page } from "@playwright/test";
|
||||
|
||||
type AdminFixtures = {
|
||||
adminPage: Page;
|
||||
};
|
||||
|
||||
export const test = base.extend<AdminFixtures>({
|
||||
adminPage: async ({ page }, use) => {
|
||||
const adminCredentials = {
|
||||
email: "admin@example.com",
|
||||
password: "admin123",
|
||||
};
|
||||
|
||||
await page.goto("admin/login");
|
||||
await page.fill('input[name="email"]', adminCredentials.email);
|
||||
await page.fill('input[name="password"]', adminCredentials.password);
|
||||
await page.press('input[name="password"]', "Enter");
|
||||
|
||||
await page.waitForURL("**/admin/dashboard");
|
||||
|
||||
await use(page);
|
||||
},
|
||||
});
|
||||
|
||||
export { expect };
|
||||
Reference in New Issue
Block a user