Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve E2E Tests & Stability #12439

Merged
merged 133 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 127 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
c0821ff
Improve taxonomies e2e tests
swissspidy Sep 30, 2022
3770568
Add `jest.retryTimes` to every spec file
swissspidy Oct 4, 2022
b1e4591
Further improve taxonomy tests
swissspidy Oct 4, 2022
14b9b50
Improve hotlinking tests
swissspidy Oct 4, 2022
f52fc52
Wrap all `page.waitForNavigation()` calls in `Promise.all`
swissspidy Oct 4, 2022
a01867b
Deactivate importer again after install
swissspidy Oct 4, 2022
2c9abe0
Remove `:focus-visible` polyfill
swissspidy Oct 4, 2022
b20767d
Dynamically import `@mediapipe/selfie_segmentation`
swissspidy Oct 4, 2022
66cdf5c
Re-enable admin menu e2e tests
swissspidy Oct 4, 2022
c07b438
Re-enable shopify test
swissspidy Oct 4, 2022
5fd349b
Re-enable WooCommerce test
swissspidy Oct 4, 2022
a0bdf3c
Re-enable story bg audio test
swissspidy Oct 4, 2022
c84da4a
Re-enable font check test
swissspidy Oct 4, 2022
b1a9340
Re-enable story deletion test
swissspidy Oct 5, 2022
ed88e93
Re-enable story saving failing test
swissspidy Oct 5, 2022
f404039
Re-enable quick edit test
swissspidy Oct 5, 2022
ebc0d15
Improve status check and re-enable status check tests
swissspidy Oct 5, 2022
cd7dd69
Re-enable CORS check test
swissspidy Oct 5, 2022
828ef7a
Re-enable widget tests
swissspidy Oct 5, 2022
651e9b5
Re-enable font check metrics test
swissspidy Oct 6, 2022
9330172
Make publishPost util more robust
swissspidy Oct 6, 2022
9f230d5
Re-enable archive page tests
swissspidy Oct 6, 2022
54188c7
Re-enable block widget test
swissspidy Oct 6, 2022
e7e1512
Re-enable pending stories test
swissspidy Oct 6, 2022
f0f3ce0
Re-enable Site Kit analytics test
swissspidy Oct 6, 2022
e51b89a
Re-enable Web Stories block tests
swissspidy Oct 6, 2022
9fee29e
Remove redundant test
swissspidy Oct 7, 2022
44879a0
Re-enable shopping product test
swissspidy Oct 7, 2022
70dff0a
Re-enable dashboard keyboard navigation test
swissspidy Oct 7, 2022
c553280
Re-enable publisher logo test
swissspidy Oct 7, 2022
c749031
Add types for `expect-puppeteer` to improve IDE assistance
swissspidy Oct 7, 2022
f983ca7
Re-enable checklist test
swissspidy Oct 7, 2022
cba8f26
Re-enable some Media3P tests
swissspidy Oct 7, 2022
1a30750
Remove ext from import
swissspidy Oct 7, 2022
16e651e
Remove outdated export
swissspidy Oct 7, 2022
4fb30a8
Re-enable media library test
swissspidy Oct 7, 2022
99c5a4c
Avoid using `undefined` as background image
swissspidy Oct 7, 2022
a9f3fec
Re-enable webm video tests
swissspidy Oct 7, 2022
0dd209e
Re-enable media insertion test
swissspidy Oct 7, 2022
8e9924d
Re-enable mov insertion test
swissspidy Oct 7, 2022
dac5a2a
Re-enable pre-publish modal poster test
swissspidy Oct 7, 2022
4fc724a
Re-enable pre-publish modal poster test w/ contributor
swissspidy Oct 7, 2022
a9bdadb
Remove useless telemetry banner test
swissspidy Oct 7, 2022
1a6f390
Do not prefetch colorthief chunk
swissspidy Oct 7, 2022
c2975af
Remove some debug cruft
swissspidy Oct 7, 2022
841bd64
Do not use `toMatchElement` return value
swissspidy Oct 7, 2022
dfbe091
Delete also cropped media in cleanup
swissspidy Oct 7, 2022
5ab2d3f
Improve addTextElement util
swissspidy Oct 7, 2022
0f0a3b0
Improve previewStory util
swissspidy Oct 7, 2022
8785149
Use sync fs api
swissspidy Oct 7, 2022
5a301f3
Remove useless check
swissspidy Oct 7, 2022
a92f7db
Do not use `toMatchElement` return value
swissspidy Oct 7, 2022
9ee9434
Fix draft-js-export-html dependency entry
swissspidy Oct 14, 2022
7f5bd62
Add types for `expect-puppeteer` to improve IDE assistance
swissspidy Oct 7, 2022
488262c
Do not fail fast for now
swissspidy Oct 7, 2022
b5e24a8
Update browserslist db (#12446)
googleforcreators-bot Oct 10, 2022
71effa5
Add missing await
swissspidy Oct 12, 2022
01e411b
Update to Puppeteer v18
swissspidy Oct 12, 2022
c92c978
Improve custom font util
swissspidy Oct 12, 2022
5e97e57
Bump eslint-plugin-jest from 27.0.4 to 27.1.1 (#12458)
dependabot[bot] Oct 10, 2022
0d94df0
Bump @rollup/plugin-json from 4.1.0 to 5.0.0 (#12457)
dependabot[bot] Oct 10, 2022
61f2735
Bump semver from 7.3.7 to 7.3.8 (#12456)
dependabot[bot] Oct 10, 2022
8dd25da
Disallow closing story takeover dialog (#12440)
swissspidy Oct 11, 2022
f80428a
Bump eslint from 8.24.0 to 8.25.0 (#12455)
dependabot[bot] Oct 11, 2022
434233d
Bump @rollup/plugin-node-resolve from 14.1.0 to 15.0.0 (#12454)
dependabot[bot] Oct 11, 2022
f4d046a
Bump @rollup/plugin-url from 7.0.0 to 8.0.0 (#12452)
dependabot[bot] Oct 11, 2022
fc45b11
Bump css-minimizer-webpack-plugin from 4.2.0 to 4.2.1 (#12453)
dependabot[bot] Oct 11, 2022
98b01df
Bump @typescript-eslint/parser from 5.39.0 to 5.40.0 (#12451)
dependabot[bot] Oct 11, 2022
c532ad0
Bump sirbrillig/phpcs-variable-analysis from 2.11.8 to 2.11.9 (#12450)
dependabot[bot] Oct 11, 2022
2c62e80
Bump github/codeql-action from 2.1.26 to 2.1.27 (#12448)
dependabot[bot] Oct 11, 2022
e15e309
Bump actions/checkout from 3.0.2 to 3.1.0 (#12449)
dependabot[bot] Oct 12, 2022
8f5c8db
Improve story locking dialog wording and layout (#12447)
swissspidy Oct 12, 2022
f5726b9
Run tests against WordPress 6.1 RC (#12412)
swissspidy Oct 14, 2022
42920a9
[WIP] CI: Use composite actions (#12438)
swissspidy Oct 13, 2022
3ab8995
Composer update
swissspidy Oct 13, 2022
9dc1d42
Add checkout step
swissspidy Oct 13, 2022
d79ea4b
Revert "Add checkout step"
swissspidy Oct 13, 2022
545de65
Revert "[WIP] CI: Use composite actions (#12438)"
swissspidy Oct 13, 2022
f267161
Revert "Composer update"
swissspidy Oct 13, 2022
df5a9ac
Lint fix
swissspidy Oct 13, 2022
a6bcd55
Code Quality: Use `preloadImage` in `wp-dashboard` (#12466)
spacedmonkey Oct 13, 2022
aafab06
Code Quality: Fix `preloadImage` function signature (#12468)
spacedmonkey Oct 13, 2022
3652a96
Media: Video Segmentation Prototype (#12335)
timarney Oct 13, 2022
528ce4e
Improve widget tests
swissspidy Oct 14, 2022
9361574
Improve publisher logo test
swissspidy Oct 14, 2022
9a79208
Remove duplicate entry
swissspidy Oct 14, 2022
a8e0fbd
Improve taxonomy test
swissspidy Oct 14, 2022
0ac0a8c
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 14, 2022
602315c
Fix workflow
swissspidy Oct 14, 2022
a881088
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 14, 2022
792ead1
Fix fail-fast
swissspidy Oct 14, 2022
9889a13
Update lock file
swissspidy Oct 14, 2022
87f0e12
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 14, 2022
22aa40b
Update dashboard test
swissspidy Oct 14, 2022
1031060
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 14, 2022
f2636e8
Improve widget tests
swissspidy Oct 14, 2022
ec651de
Fix password protected story test
swissspidy Oct 14, 2022
fd914a7
Improve createNewTerm util
swissspidy Oct 14, 2022
ad1170a
Try improving `addCategory` util
swissspidy Oct 14, 2022
f84964c
Update to Puppeteer v19
swissspidy Oct 14, 2022
66c1a7f
Improve `addTextElement`
swissspidy Oct 14, 2022
7078f5b
Adjust `previewPage`
swissspidy Oct 14, 2022
a0fcb46
Try patching jest-environment-puppeteer
swissspidy Oct 14, 2022
7616ab2
Update `previewStory` util
swissspidy Oct 14, 2022
c34cc2d
Improve addTextElement
swissspidy Oct 14, 2022
11b6d85
Fix patch
swissspidy Oct 14, 2022
a8e2079
Update patch
swissspidy Oct 14, 2022
d24d3b4
Fix zero width chars
swissspidy Oct 14, 2022
e2254d2
Remove patch
swissspidy Oct 14, 2022
3cb7e65
Fix publishing flow test
swissspidy Oct 15, 2022
658fee6
Update `addTextElement`
swissspidy Oct 15, 2022
17510a0
Refactor `deleteWidgets`
swissspidy Oct 15, 2022
7da374b
Adjust publisher logo test
swissspidy Oct 15, 2022
998950b
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 17, 2022
9172a4b
Improve web stories block test
swissspidy Oct 17, 2022
a1aa1d4
Add env var
swissspidy Oct 17, 2022
97199a2
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 17, 2022
2036175
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 18, 2022
dedfab8
Add fix for REST API change in 6.1
swissspidy Oct 18, 2022
322a3c0
Wait for dialog to be dismissed
swissspidy Oct 18, 2022
b4f7163
Adjust author test
swissspidy Oct 18, 2022
4eeee59
Add hardening
swissspidy Oct 18, 2022
b09d977
Update lock file
swissspidy Oct 18, 2022
655b504
Adjust widget test
swissspidy Oct 18, 2022
a910ceb
Adjust font check test
swissspidy Oct 18, 2022
af67f6a
Increase retry times
swissspidy Oct 18, 2022
af736b5
Retry unit tests with AMP validation
swissspidy Oct 18, 2022
cb051e9
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 19, 2022
059a4b8
A few focus-visible fixes
swissspidy Oct 19, 2022
e7a8df7
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 20, 2022
7e4e860
Fix selfie segmentation lazy load
swissspidy Oct 20, 2022
c33845d
More rigorously trash posts between tests
swissspidy Oct 20, 2022
4665a10
Merge branch 'main' into fix/e2e-tests-stability
swissspidy Oct 21, 2022
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
9 changes: 9 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,15 @@
"node": true
}
},
{
"files": [
"packages/jest-puppeteer-amp/src/**/*.js"
],
"globals": {
"browser": "readonly",
"page": "readonly"
}
},
{
"files": [
"packages/e2e-test-utils/**/*.js",
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
continue-on-error: ${{ matrix.experimental == true }}
needs: [build, nonce]
strategy:
fail-fast: false
matrix:
# TODO: add back Firefox once support is more mature.
browser: ['chrome']
Expand All @@ -148,10 +149,6 @@ jobs:
wp: 'latest'
snapshots: true
shard: '2/2'
- browser: 'chrome'
wp: 'latest'
snapshots: true
shard: '1/2'
- browser: 'chrome'
wp: '6.1-RC1'
experimental: true
Expand Down Expand Up @@ -202,6 +199,13 @@ jobs:
echo "chromium_path=${CHROMIUM}" >> $GITHUB_ENV
if: ( matrix.snapshots ) && ( github.event.pull_request.draft == false )

- name: Download AMP validator JS
id: amp_validator
run: |
cd $RUNNER_TEMP && curl -O -f -s -S https://cdn.ampproject.org/v0/validator_wasm.js
AMP_VALIDATOR_FILE="${RUNNER_TEMP}/validator_wasm.js"
echo "validator_file=$AMP_VALIDATOR_FILE" >> $GITHUB_ENV
swissspidy marked this conversation as resolved.
Show resolved Hide resolved

- name: Run E2E tests with percy
run: npm run test:e2e:percy -- -- --shard=$SHARD
env:
Expand All @@ -210,13 +214,15 @@ jobs:
PERCY_BROWSER_EXECUTABLE: ${{ env.chromium_path }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}
SHARD: ${{ matrix.shard }}
AMP_VALIDATOR_FILE: ${{ env.validator_file }}
if: ( matrix.snapshots ) && ( github.event.pull_request.draft == false )

- name: Run E2E tests
run: npm run test:e2e -- --shard=$SHARD
env:
WP_VERSION: ${{ matrix.wp }}
SHARD: ${{ matrix.shard }}
AMP_VALIDATOR_FILE: ${{ env.validator_file }}
if: ( ! matrix.snapshots ) || ( github.event.pull_request.draft == true )

- name: Stop Docker environment
Expand Down
20 changes: 12 additions & 8 deletions bin/local-env/install-wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ fi
echo -e $(status_message "Installing and activating RTL Tester plugin...")
wp plugin install rtl-tester --activate --force --quiet

echo -e $(status_message "Installing WordPress importer...")
wp plugin install wordpress-importer --activate --force --quiet

# Only install woocommerce on latest version of WordPress.
# Only install WooCommerce on latest version of WordPress.
if [ "$WP_VERSION" == "latest" ] || [ "$WP_VERSION" == "6.1-RC1" ]; then
echo -e $(status_message "Installing WooCommerce plugin...")
wp plugin install woocommerce --activate --force --quiet
echo -e $(status_message "Installing WordPress importer...")
wp plugin install wordpress-importer --activate --force --quiet

echo -e $(status_message "Installing WooCommerce plugin...")
wp plugin install woocommerce --activate --force --quiet
fi

echo -e $(status_message "Installing AMP plugin...")
Expand Down Expand Up @@ -234,8 +234,12 @@ wp plugin list --format=yaml

# Only install woocommerce on latest version of WordPress.
if [ "$WP_VERSION" == "latest" ] || [ "$WP_VERSION" == "6.1-RC1" ]; then
echo -e $(status_message "Import sample woocommerce products...")
echo -e $(status_message "Import sample WooCommerce products...")
wp import /var/www/html/wp-content/plugins/woocommerce/sample-data/sample_products.xml --authors=skip --quiet
# deactivate test etc... can activate as needed

echo -e $(status_message "Deactivating WooCommerce again...")
wp plugin deactivate woocommerce

echo -e $(status_message "Deactivating WordPress importer again...")
wp plugin deactivate wordpress-importer --quiet
fi
1 change: 1 addition & 0 deletions includes/Admin/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ public function load_stories_dashboard(): void {
'link',
'preview_link',
'edit_link',
'_links', // Needed for WP 6.1+
// _web_stories_envelope will add these fields, we need them too.
'body',
'status',
Expand Down
Loading