@gah/e2e-plugin
v1.0.0
Published
A plugin for gah to work with playwright.
Downloads
15
Readme
gah E2E Plugin
This plugin provides the possibility to run tests in gah with playwright.
Configuration
With this plugin, you can configure shared test helpers which can be used in all test modules. If no shared test helper is needed you can skip the first step. (1. Shared-test helper)
1. Shared-test helper
- Navigate to the shared gah module folder.
- Create a libary for shared test helper.
- Open a terminal in the shared module folder and execute:
gah plugin add @gah/e2e-plugin
Press enter to skip "Enter test folder Path".
Enter the path to your generated libary index.ts file.
2. Module tests
- Navigate to the gah module folder of the module you want to write tests for.
You can Skip 2. if you have no shared-test files.
- Ensure the shared module that declares the shared test helpers is registered as a dependency in the module. (It should be, otherwise why would you need the helpers?)
- Open a terminal in this folder and execute:
gah plugin add @gah/e2e-plugin
- Enter the path to your test folder.
- Press enter to skip "Enter shared-test Path".
Installation
- Navigate to host folder and execute:
gah install
- Navigate to the module base folder where the test files are located and and execute:
gah install
You can skip 3. if you have no shared test files.
- Navigate to shared module folder where the shared test helpers are located and execute:
gah install
Usage
To run the tests navigate to the gah host folder and execute:
gah plugin run test-p <gah-modulename>
For CI:
gah plugin run test-ci-p <gah-modulename>