mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
Add support for E2E (end-to-end) tests (#625)
This changeset lays the foundation for supporting E2E (end-to-end) integration tests for US Notify. It brings in the Playwright testing framework along with the Playwright pytest plugin to make this possible, and includes the following adjustments: - A new test session fixture for ensuring that Playwright authenticates with the sites that are currently behind HTTP Auth (requies env-var config) - A new end_to_end test directory specifically for E2E tests - Updates to the Makefile that make sure E2E tests are not run as a part of the normal test routine but can be run separately - A new command in the Makefile to run E2E tests that will run in Chromium, Firefox, and Webkit headless browsers Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
8
.github/workflows/checks.yml
vendored
8
.github/workflows/checks.yml
vendored
@@ -41,7 +41,13 @@ jobs:
|
||||
- name: Run js tests
|
||||
run: npm test
|
||||
- name: Run py tests with coverage
|
||||
run: pipenv run coverage run --omit=*/notifications_utils/* -m pytest --maxfail=10
|
||||
run: pipenv run coverage run --omit=*/notifications_utils/* -m pytest --maxfail=10 --ignore=tests/end_to_end tests/
|
||||
- name: Run E2E tests
|
||||
run: pipenv run pytest -v --browser chromium --browser firefox --browser webkit tests/end_to_end
|
||||
env:
|
||||
NOTIFY_STAGING_HTTP_AUTH_PASSWORD: ${{ secrets.NOTIFY_STAGING_HTTP_AUTH_PASSWORD }}
|
||||
NOTIFY_STAGING_HTTP_AUTH_USER: ${{ secrets.NOTIFY_STAGING_HTTP_AUTH_USER }}
|
||||
NOTIFY_STAGING_URI: ${{ secrets.NOTIFY_STAGING_URI }}
|
||||
- name: Check coverage threshold
|
||||
run: pipenv run coverage report --fail-under=90
|
||||
|
||||
|
||||
Reference in New Issue
Block a user