Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TestCase

Hierarchy

  • TestCase

Index

Properties

environments

environments: string[]

What environments should the testcase run on

exec

exec: (project: Project, page: Page) => Promise<void>

Execute testcase

see

https://playwright.dev/docs/api/class-playwright for playwright API

example
 async exec(project, page) {
     const isElementVisible = async (page, selector) => {
         assert.ok(await page.isVisible(selector), `${ selector } not visible`);
     };
     const { url } = project;
     await page.goto(`${url}/my-subpage`);
     await isElementVisible(page, 'div.my-element');
 }

Type declaration

    • (project: Project, page: Page): Promise<void>
    • Parameters

      Returns Promise<void>

Optional headless

headless: undefined | boolean

Can be turned on the see the browser. This might help for debugging test cases

name

name: string

Name of the test case

requireAuth

requireAuth: boolean

Does the testcase require to be logged in

Generated using TypeDoc