Skip to content

BEXIS2/bexis2-core-ui-tests

Repository files navigation

Initial setup

It is recommended to install Playwright's official Visual Studio Code extension for a better testing experience and an interactive GUI.

Shared functions

Create a .env file in the root folder of the project for your user credentials and host URL. HOST, USER and PASSWORD are the environment variables required to run shared functions.

Here's an example .env file contents:

export HOST="https://localhost:4173"
export ACCOUNT_USERNAME="user"
export ACCOUNT_PASSWORD="user"

Using shared variables

Importing shared functions from shared.ts:

import { login, host } from  './shared';


Usage of shared functions in tests:

test('Test', async ({ page }) => {
    await login(page); // Login
    await page.goto(`${host}/test/`); // Go to /test route
});

Playwright Docs

You can check Playwright documentation page for more details, guides and information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published