Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 26x 26x 1x 1x 1x 1x 25x 25x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 11x 11x 1x 1x 1x 13x 13x 1x 1x 1x 11x 11x 1x 1x 1x 5x 5x 5x 1x 1x 1x 1x 1x 1x | // @ts-check
const base = require('@playwright/test');
const { HomePage } = require('../pages/HomePage');
const { TestCasesPage } = require('../pages/TestCasesPage');
const { ContactUsPage } = require('../pages/ContactUsPage');
const { SignupLoginPage } = require('../pages/SignupLoginPage');
const { ProductsPage } = require('../pages/ProductsPage');
const { CartPage } = require('../pages/CartPage');
const { CheckoutPage } = require('../pages/CheckoutPage');
const { setupAdBlocker } = require('../utils/adBlocker');
/**
* Custom Playwright test fixture extending base test with Page Objects
* and pre-configured network blockers.
*/
const test = base.test.extend({
// Auto-applied page setup fixture for ad blocking
page: async ({ page }, use) => {
await setupAdBlocker(page);
await use(page);
},
// Page Object Fixtures
homePage: async ({ page }, use) => {
const homePage = new HomePage(page);
await use(homePage);
},
testCasesPage: async ({ page }, use) => {
const testCasesPage = new TestCasesPage(page);
await use(testCasesPage);
},
contactUsPage: async ({ page }, use) => {
const contactUsPage = new ContactUsPage(page);
await use(contactUsPage);
},
signupLoginPage: async ({ page }, use) => {
const signupLoginPage = new SignupLoginPage(page);
await use(signupLoginPage);
},
productsPage: async ({ page }, use) => {
const productsPage = new ProductsPage(page);
await use(productsPage);
},
cartPage: async ({ page }, use) => {
const cartPage = new CartPage(page);
await use(cartPage);
},
checkoutPage: async ({ page }, use) => {
const checkoutPage = new CheckoutPage(page);
await use(checkoutPage);
},
});
module.exports = {
test,
expect: base.expect,
};
|