Skip to content

Commit

Permalink
Refactor setup tests (#2498)
Browse files Browse the repository at this point in the history
* Update setup tests

* Fix lint
  • Loading branch information
shashwatahalder01 authored Jan 3, 2025
1 parent de5c7a1 commit 13e32f6
Show file tree
Hide file tree
Showing 29 changed files with 1,148 additions and 344 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e_api_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
if: always() && (steps.e2e-test.outcome == 'success' || steps.e2e-test.outcome == 'failure')
working-directory: tests/pw
run: |
npm run test:e2e:coverage
npm run test:e2e:coverage
# Run api tests
- name: 🧪 Run api tests
Expand All @@ -198,18 +198,18 @@ jobs:
# # Find PR comment
# - name: Find PR comment by github-actions[bot]
# uses: peter-evans/find-comment@v3
# id: find-comment
# if: github.event_name == 'pull_request'
# uses: peter-evans/find-comment@v3
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: Tests Summary

# # Post test summary as PR comment
# - name: Create or update PR comment
# uses: peter-evans/create-or-update-comment@v4
# if: github.event_name == 'pull_request'
# uses: peter-evans/create-or-update-comment@v4
# with:
# comment-id: ${{ steps.find-comment.outputs.comment-id }}
# issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -226,8 +226,8 @@ jobs:
# Upload artifacts
- name: Archive test artifacts (screenshots, HTML snapshots, Reports)
uses: actions/upload-artifact@v4
if: always() && steps.debug-log.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: test-artifact
path: |
Expand Down
1 change: 1 addition & 0 deletions tests/pw/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ Temporary Items
playwright/
test-results/
playwright-report/
blob-report/
playwright/.cache/
visual.spec.ts-snapshots/

Expand Down
3 changes: 2 additions & 1 deletion tests/pw/.wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"mappings": {
".htaccess": ".htaccess",
"wp-data": "./wp-data",
"wp-content/debug.log": "./wp-data/debug.log"
"wp-content/debug.log": "./wp-data/debug.log",
"wp-content/mu-plugins": "./mu-plugins"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/pw/api.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default defineConfig({
/* Configure reporters */
reporter: CI
? [
['github'],
// ['github'],
['html', { open: 'never', outputFolder: 'playwright-report/api/html-report' }],
// ['junit', { outputFile: 'playwright-report/api/junit-report/api-results.xml' }],
['list', { printSteps: true }],
Expand Down
3 changes: 3 additions & 0 deletions tests/pw/feature-map/feature-map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,9 @@
vendor can delete booking resource: true
vendor can add booking for guest customer: true
vendor can add booking for existing customer: true
vendor can add booking with new order id: false
vendor can add booking with existing order id: false
vendor can add booking without order id: false
vendor can update booking product title: true
vendor can add booking product accommodation booking option: true
vendor can update booking product accommodation booking option: true
Expand Down
2 changes: 2 additions & 0 deletions tests/pw/mu-plugins/disable-doing-it-wrong.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
add_filter( 'doing_it_wrong_trigger_error', '__return_false' );
Loading

0 comments on commit 13e32f6

Please sign in to comment.