Skip to content

Commit

Permalink
Remove e2e tests
Browse files Browse the repository at this point in the history
All of those tests have either been moved to the theme
or the blocks have been retired (eg. S2C).

Also removed related CI jobs.
  • Loading branch information
comzeradd committed Nov 12, 2024
1 parent 946922b commit 47c885b
Show file tree
Hide file tree
Showing 27 changed files with 1 addition and 1,987 deletions.
75 changes: 1 addition & 74 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
command: PUPPETEER_SKIP_DOWNLOAD=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install eslint-plugin-react --unsafe-perm=true
- run:
name: Lint JS
command: eslint "assets/src/**/*.js" "tests/e2e/**/*.js" "admin/js/**/*.js"
command: eslint "assets/src/**/*.js" "admin/js/**/*.js"
- store_test_results:
path: /tmp/test-results

Expand Down Expand Up @@ -171,66 +171,6 @@ jobs:
- booking.json
- pr

request-test-user:
docker:
- image: greenpeaceinternational/circleci-base:latest
auth:
<<: *docker_auth
steps:
- attach_workspace:
at: /tmp/workspace
- run:
name: Create test user
command: /usr/local/bin/test-user.py --create --instance=test-$(cat /tmp/workspace/test-instance)

e2e-tests:
working_directory: /usr/app/
docker:
- image: mcr.microsoft.com/playwright:v1.37.1
auth:
<<: *docker_auth
steps:
- attach_workspace:
at: /tmp/workspace
- checkout:
path: /usr/app/planet4-plugin-gutenberg-blocks
- run:
name: Install dependencies
command: |
npm install @playwright/[email protected] @wordpress/[email protected] dotenv
npx playwright install --with-deps
- run:
name: End-to-end tests
command: |
cd /usr/app/planet4-plugin-gutenberg-blocks
export TICKET=$(head -c 11 /tmp/workspace/commit-message)
export WP_BASE_URL="https://www-dev.greenpeace.org/test-$(cat /tmp/workspace/test-instance)/"
export WP_TEST_USERNAME="p4_test_user"
export WP_TEST_PASSWORD="${WP_TEST_USER}"
npx playwright test
- run:
name: Delete test user
when: always
command: |
instance_repo="planet4-test-$(cat /tmp/workspace/test-instance)"
curl -vvv --request POST \
--url https://circleci.com/api/v2/project/github/greenpeace/${instance_repo}/pipeline \
--header "Circle-Token: ${CIRCLE_TOKEN}" \
--header 'content-type: application/json' \
--data '{"parameters":{"run_develop":false, "run_create_test_user":false, "run_delete_test_user":true}}'
- run:
name: Extract tests artifacts
when: always
command: |
mkdir -p /usr/artifacts/playwright/results /usr/artifacts/playwright/report
cp -r /usr/app/planet4-plugin-gutenberg-blocks/e2e-results/* /usr/artifacts/playwright/results || true
cp -r /usr/app/planet4-plugin-gutenberg-blocks/e2e-report/* /usr/artifacts/playwright/report || true
cp /usr/app/planet4-plugin-gutenberg-blocks/results.xml /usr/artifacts/playwright/ || true
- store_test_results:
path: /usr/artifacts
- store_artifacts:
path: /usr/artifacts

comment-pr:
docker:
- image: greenpeaceinternational/circleci-base:latest
Expand Down Expand Up @@ -399,19 +339,6 @@ workflows:
<<: *on_pr
requires:
- instance-ready
- request-test-user:
<<: *on_pr
requires:
- instance-ready
- test-user-ready:
<<: *on_pr
type: approval
requires:
- request-test-user
- e2e-tests:
<<: *on_pr
requires:
- test-user-ready
- publish-zip:
<<: *on_tag
requires:
Expand Down
1 change: 0 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@
<arg value="ps"/>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/acceptance/*</exclude-pattern>
<exclude-pattern>languages/*.php</exclude-pattern>
</ruleset>
22 changes: 0 additions & 22 deletions tests/e2e/blocks-report-api.spec.js

This file was deleted.

86 changes: 0 additions & 86 deletions tests/e2e/carousel-header.spec.js

This file was deleted.

18 changes: 0 additions & 18 deletions tests/e2e/columns-icons.spec.js

This file was deleted.

18 changes: 0 additions & 18 deletions tests/e2e/columns-images.spec.js

This file was deleted.

18 changes: 0 additions & 18 deletions tests/e2e/columns-no-image.spec.js

This file was deleted.

18 changes: 0 additions & 18 deletions tests/e2e/columns-tasks.spec.js

This file was deleted.

33 changes: 0 additions & 33 deletions tests/e2e/editor-selector.spec.js

This file was deleted.

Loading

0 comments on commit 47c885b

Please sign in to comment.