Loading...
Loading...
Compare original and translation side by side
packages/Webkul/{Admin,Shop}/tests/e2e-pw/
├── playwright.config.ts # testDir ./tests, workers 1, retries 0
├── setup.ts # adminPage / shopPage fixtures
├── pages/ # page objects (BasePage subclasses)
├── tests/ # *.spec.ts, grouped by admin menu section
├── utils/ # faker.ts, admin.ts (login)
└── data/ # fixture files for uploadscd packages/Webkul/Admin
npm install && npx playwright install --with-deps chromium
npx playwright test --config=tests/e2e-pw/playwright.config.ts
npx playwright test --config=tests/e2e-pw/playwright.config.ts -g "create a category"packages/Webkul/{Admin,Shop}/tests/e2e-pw/
├── playwright.config.ts # testDir ./tests, workers 1, retries 0
├── setup.ts # adminPage / shopPage fixtures
├── pages/ # page objects (BasePage subclasses)
├── tests/ # *.spec.ts, grouped by admin menu section
├── utils/ # faker.ts, admin.ts (login)
└── data/ # fixture files for uploadscd packages/Webkul/Admin
npm install && npx playwright install --with-deps chromium
npx playwright test --config=tests/e2e-pw/playwright.config.ts
npx playwright test --config=tests/e2e-pw/playwright.config.ts -g "create a category".envBASE_URL.envBASE_URLplaywright.config.ts.envAPP_URLbaseURL: `${process.env.APP_URL}/`.replace(/\/+$/, "/")BASE_URLBASE_URLAPP_URL.envsedBASE_URL=…APP_URLplaywright.config.ts.envAPP_URLbaseURL: `${process.env.APP_URL}/`.replace(/\/+$/, "/")BASE_URLBASE_URLsed.envAPP_URLBASE_URL=…APP_URL| File | Load when |
|---|---|
| authoring.md | Writing a new spec or page object — structure, fixtures, ACL tests, naming |
| troubleshooting.md | A test fails, hangs, or passes when it should not |
| 文件 | 加载时机 |
|---|---|
| authoring.md | 编写新测试用例或页面对象时——涉及结构、测试夹具、ACL测试、命名规范 |
| troubleshooting.md | 测试失败、挂起或出现误通过情况时 |
workers: 1retries: 0fullyParallel: false--shard=i/10.state/admin-auth.jsonadminPageworkers: 1retries: 0fullyParallel: false--shard=i/10.state/admin-auth.jsonadminPageimport { test } from "../../setup";
import { CategoryPage } from "../../pages/admin/catalog/CategoryPage";
test.describe("category management", () => {
test("should create a category", async ({ adminPage }) => {
const categoryPage = new CategoryPage(adminPage);
await categoryPage.createCategory();
});
});import { test } from "../../setup";
import { CategoryPage } from "../../pages/admin/catalog/CategoryPage";
test.describe("category management", () => {
test("should create a category", async ({ adminPage }) => {
const categoryPage = new CategoryPage(adminPage);
await categoryPage.createCategory();
});
});meta.totalgetByText("Delete")getByRole("button", { name: "Static Content" })meta.totalgetByText("Delete")getByRole("button", { name: "Static Content" })