Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
fa8c99a
initial commit for e2e
Jan 15, 2025
6a197a8
Merge branch 'develop' into feat/e2e-playwright
Jan 15, 2025
7fe5a11
updated readme
Jan 15, 2025
a438a05
activate only stackable for all tests
kaeizen Jan 27, 2025
aa58c5a
add tsconfig
kaeizen Jan 27, 2025
d543e12
add tests for settings page and editor page
kaeizen Jan 27, 2025
b69b0df
Merge branch 'develop' into feat/e2e-playwright
kaeizen Jan 27, 2025
497f8f3
add tests for site editor, global settings
kaeizen Jan 31, 2025
3864ca4
minor change to tests for admin and block editor
kaeizen Jan 31, 2025
1355de4
Merge branch 'develop' into feat/e2e-playwright
kaeizen Jan 31, 2025
1ffa888
Merge branch 'develop' into feat/e2e-playwright
kaeizen Jan 31, 2025
c2f4a6d
use custom test utils
kaeizen Feb 5, 2025
c8252b7
Merge branch 'develop' into feat/e2e-playwright
kaeizen Feb 5, 2025
19a9e06
run tests
kaeizen Feb 5, 2025
d63fe72
update playwright workflows
kaeizen Feb 5, 2025
0623f04
add .wp-env.json
kaeizen Feb 5, 2025
70c5f33
add env
kaeizen Feb 5, 2025
fa6a5d4
fix env slug
kaeizen Feb 5, 2025
20da040
log plugins installed
kaeizen Feb 5, 2025
8ae8947
update steps, slug
kaeizen Feb 5, 2025
e32eb62
install playwright browsers
kaeizen Feb 5, 2025
bd33774
comment out site editor tests, add reporter
kaeizen Feb 5, 2025
2a8fda5
add try catch for newly installed plugin
kaeizen Feb 5, 2025
b3606ba
update admin test
kaeizen Feb 5, 2025
addf024
update stackable fixture
kaeizen Feb 5, 2025
60f7890
comment on PR
kaeizen Feb 5, 2025
4b895ae
fix PR comment
kaeizen Feb 5, 2025
4d6ef18
add id for upload artifact, update comment body
kaeizen Feb 5, 2025
3b1eaf7
update yml file
kaeizen Feb 5, 2025
3820390
include site editor tests
kaeizen Feb 6, 2025
b1043f8
minor update in yml file
kaeizen Feb 6, 2025
57c3608
always update comment
kaeizen Feb 6, 2025
a519bde
upload traces
kaeizen Feb 6, 2025
abf48b9
test script
kaeizen Feb 6, 2025
a3cb37d
update comment content
kaeizen Feb 6, 2025
dedf6f2
get failed tests
kaeizen Feb 6, 2025
3ceb2e8
use $GITHUB_OUTPUT
kaeizen Feb 6, 2025
8b43484
update to multiline
kaeizen Feb 6, 2025
253332e
update output name
kaeizen Feb 6, 2025
e4f0924
fix failed tests content
kaeizen Feb 6, 2025
66d0995
escape special characters
kaeizen Feb 6, 2025
790f603
use markdown to output
kaeizen Feb 6, 2025
b6706e2
run mto even on fail
kaeizen Feb 6, 2025
926fdb0
strip Ansi Escapes
kaeizen Feb 6, 2025
643dfee
try multiple upload
kaeizen Feb 7, 2025
b15d33a
test multiple upload
kaeizen Feb 7, 2025
74eda4b
use test ids and trace file path
kaeizen Feb 7, 2025
7cad560
update reporter
kaeizen Feb 7, 2025
1d94db4
test matrix
kaeizen Feb 7, 2025
03a2c7e
update .wp-env.json and name
kaeizen Feb 7, 2025
93e5821
update php version, remove unit tests
kaeizen Feb 7, 2025
e40aa82
continue matrix even if one job fails
kaeizen Feb 7, 2025
7bf5aa1
use different artifact name based on matrix
kaeizen Feb 7, 2025
e5f53b4
try all test env
kaeizen Feb 7, 2025
a2c9632
remove comments, update matrix
kaeizen Feb 7, 2025
f310faa
update php version
kaeizen Feb 7, 2025
aba59a7
update conditions, log wp and php version
kaeizen Feb 7, 2025
1feb5d5
add quotes
kaeizen Feb 7, 2025
a64cb24
update php version
kaeizen Feb 7, 2025
f596c50
run other tests
kaeizen Feb 7, 2025
06ec688
test custom reporter
kaeizen Feb 7, 2025
5b44cef
update condition
kaeizen Feb 7, 2025
a42c89e
add report to summary
kaeizen Feb 7, 2025
bf2c16a
comment site editor tests temporarily
kaeizen Feb 7, 2025
252ebb1
update report url
kaeizen Feb 7, 2025
3585bdd
update wp version
kaeizen Feb 7, 2025
0a09b08
update block editor test
kaeizen Feb 10, 2025
d86d9be
use custom way to get block attributes
kaeizen Feb 10, 2025
6159ea7
fix missing global settings for older wp versions
kaeizen Feb 10, 2025
4ef30ce
add comments, update tests
kaeizen Feb 10, 2025
c844e91
Merge branch 'develop' into feat/e2e-playwright
kaeizen Feb 10, 2025
112f772
Merge branch 'fix/missing-global-settings-for-older-wp-versions' into…
kaeizen Feb 10, 2025
4bd8941
update tests
kaeizen Feb 10, 2025
6d032e4
test with existing post
kaeizen Feb 10, 2025
210503a
update command
kaeizen Feb 10, 2025
fd37885
use tests-cli
kaeizen Feb 10, 2025
3dcc46a
run wp-env first
kaeizen Feb 10, 2025
38bc72d
update file path
kaeizen Feb 10, 2025
cdd9c62
check post content
kaeizen Feb 10, 2025
b7e2482
update file path
kaeizen Feb 10, 2025
c90d8f7
update file path
kaeizen Feb 10, 2025
a19e21b
update reporter
kaeizen Feb 10, 2025
072eb8b
update locator for global settings block defaults
kaeizen Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .github/workflows/js-unit-test.yml

This file was deleted.

79 changes: 0 additions & 79 deletions .github/workflows/php-5.6.39.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/php-7.3.5.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/php-8.0.0.yml

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Playwright Tests
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false # Ensures the matrix doesn't stop if one job fails
matrix:
include:
- php_version: '7.3'
wp_version: 6.4.5

- php_version: '7.3'
wp_version: null

- php_version: '8.2'
wp_version: 6.4.5

- php_version: '8.2'
wp_version: 6.5.5

- php_version: '8.2'
wp_version: 6.6.2

- php_version: '8.2'
wp_version: null

name: PHP ${{ matrix.php_version }} and WP ${{ matrix.wp_version || 'latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Set the version suffix for the output
run: echo VERSION_SUFFIX=${GITHUB_REF_NAME//\//-} >> $GITHUB_ENV
- name: Set WP Version and create .wp-env.json
run: |
WP_VERSION="${{ matrix.wp_version }}"
core='"Wordpress/Wordpress#'${{ matrix.wp_version }}'"'

if [[ -z "$WP_VERSION" || "$WP_VERSION" == "null" ]]; then
WP_VERSION="latest"
core=null
fi

echo "WP_VERSION=$WP_VERSION" >> $GITHUB_ENV

echo '{
"core": '$core',
"phpVersion": "${{ matrix.php_version }}",
"plugins": [ "." ],
"config": {
"SCRIPT_DEBUG": false
}
}' > .wp-env.json

cat .wp-env.json
- name: Build Stackable Free Plugin
run: |
npm ci --legacy-peer-deps
npm run build:no-translate
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
- name: Install wp-env
run: |
npm install -g @wordpress/env
- name: Start wp-env
run: wp-env start
- name: Create post with existing blocks
run: |
POST_ID=$(wp-env run tests-cli wp post create wp-content/plugins/Stackable/e2e/config/post-content.txt --post_title="Existing Blocks" --post_status=publish --porcelain)
echo "WP_TEST_POSTID=$POST_ID" >> $GITHUB_ENV
continue-on-error: true
- name: Run playwright tests
id: run-playwright-tests
env:
WP_BASE_URL: http://localhost:8889
WP_AUTH_STORAGE: wp-auth.json
WP_USERNAME: admin
WP_PASSWORD: password
STACKABLE_SLUG: Stackable/plugin
WP_TEST_POSTID: ${{ env.WP_TEST_POSTID }}
run: npm run test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() && steps.run-playwright-tests.outcome == 'failure' }}
id: artifact-upload-step
with:
name: playwright-report-php_${{ matrix.php_version }}-wp_${{ env.WP_VERSION }}-${{ env.VERSION_SUFFIX }}
path: playwright-report/
overwrite: true
retention-days: 30
- uses: markpatterson27/markdown-to-output@v1
id: mto
if: ${{ !cancelled() && steps.run-playwright-tests.outcome == 'failure' }}
with:
filepath: ./playwright-stk/errors.md
- name: Add test results to summary
if: ${{ !cancelled() && steps.run-playwright-tests.outcome == 'failure' }}
run: |
echo "${{ steps.mto.outputs.body }}" >> $GITHUB_STEP_SUMMARY
echo "Report: [playwright-report-php_${{ matrix.php_version }}-wp_${{ env.WP_VERSION }}-${{ env.VERSION_SUFFIX }}.zip](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }})" >> $GITHUB_STEP_SUMMARY
Loading
Loading