From f1efc578cb6f333b5c448a9e9dd39b51274ed2cd Mon Sep 17 00:00:00 2001 From: nixocio Date: Thu, 3 Mar 2022 15:38:12 -0500 Subject: [PATCH] Split UI test run Split UI test run See: https://github.com/ansible/awx/issues/10678 --- .github/workflows/ci.yml | 9 ++++++--- Makefile | 11 ++++++++++- awx/ui/package.json | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99df2f7d72..c9465e9c32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,9 +33,12 @@ jobs: - name: ui-lint label: Run UI Linters command: make ui-lint - - name: ui-test - label: Run UI Tests - command: make ui-test + - name: ui-test-screens + label: Run UI Screens Tests + command: make ui-test-screens + - name: ui-test-general + label: Run UI General Tests + command: make ui-test-general steps: - uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index 839851f9e2..968db81d57 100644 --- a/Makefile +++ b/Makefile @@ -402,9 +402,18 @@ ui-lint: ui-test: $(NPM_BIN) --prefix awx/ui install - $(NPM_BIN) run --prefix awx/ui test + $(NPM_BIN) run --prefix awx/ui test +ui-test-screens: + $(NPM_BIN) --prefix awx/ui install + $(NPM_BIN) run --prefix awx/ui pretest + $(NPM_BIN) run --prefix awx/ui test-screens --runInBand +ui-test-general: + $(NPM_BIN) --prefix awx/ui install + $(NPM_BIN) run --prefix awx/ui pretest + $(NPM_BIN) run --prefix awx/ui/ test-general --runInBand + # Build a pip-installable package into dist/ with a timestamped version number. dev_build: $(PYTHON) setup.py dev_build diff --git a/awx/ui/package.json b/awx/ui/package.json index 040d6c14d1..adaacbb5e8 100644 --- a/awx/ui/package.json +++ b/awx/ui/package.json @@ -75,6 +75,8 @@ "start-instrumented": "ESLINT_NO_DEV_ERRORS=true DEBUG=instrument-cra PORT=3001 HTTPS=true DANGEROUSLY_DISABLE_HOST_CHECK=true react-scripts -r @cypress/instrument-cra start", "build": "INLINE_RUNTIME_CHUNK=false react-scripts build", "test": "TZ='UTC' react-scripts test --watchAll=false", + "test-screens": "TZ='UTC' react-scripts test screens --watchAll=false", + "test-general": "TZ='UTC' react-scripts test --testPathIgnorePatterns='/src/screens/' --watchAll=false", "test-watch": "TZ='UTC' react-scripts test", "eject": "react-scripts eject", "lint": "eslint --ext .js --ext .jsx .",