79091335

Date: 2024-10-15 18:47:04
Score: 0.5
Natty:
Report link

Figured it out.

    export const test = base.extend<TestOptions & MyFixtures>({
  storeID: [1, { option: true }],


  logIn: async ({ page, storeID }, use) => {
    // Set up the fixture.
    const logIn = new LogIn(page);
    await logIn.goto();
    await logIn.loginWorkFlow(storeID);
    // Use the fixture value in the test.
    await use(logIn);
  },
  testData: async ({ storeID }, use) => {
    let NY = await require('../testData/NYTestData.json');
    let NC = await require('../testData/NCTestData.json');
    if (storeID == 1) {
      await use({ ...NY });
    } else {
      await use({ ...NC });
    }
  },
});
export { expect } from '@playwright/test';
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Steven Rutherford