Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Update Checkout block E2E fixture and increase node version in GH actions #5678

Merged
merged 6 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 4 additions & 56 deletions .github/workflows/php-js-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,8 @@ on:
pull_request:

jobs:
Setup:
runs-on: ubuntu-latest
name: Setup
steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-
${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-

- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Npm install and build
run: |
npm ci
FORCE_REDUCED_MOTION=true npm run build:e2e-test

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
tools: composer

- name: Composer install
run: |
composer install

JSE2EWithGutenberg:
name: JavaScript E2E Tests (WP latest with Gutenberg plugin)
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -75,10 +24,10 @@ jobs:
${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-
${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Npm install and build
run: |
Expand Down Expand Up @@ -130,7 +79,6 @@ jobs:

JSE2ETests:
name: JavaScript E2E Tests (latest)
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -147,10 +95,10 @@ jobs:
${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-
${{ runner.OS }}-build-${{ secrets.CACHE_VERSION }}-

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Npm install and build
run: |
Expand Down
1 change: 1 addition & 0 deletions bin/wp-env-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ wp rewrite structure '/%postname%/'
wp rewrite flush
wp core version --extra
wp plugin list
wp theme activate storefront

exit $EXIT_CODE
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"./assets/js/atomic/blocks/**",
"./assets/js/filters/**",
"./assets/js/middleware/**",
"./assets/js/blocks/cart-checkout/checkout/inner-blocks/**/index.tsx",
"./assets/js/blocks/cart-checkout/checkout/inner-blocks/register-components.ts",
"./assets/js/blocks/checkout/inner-blocks/**/index.tsx",
"./assets/js/blocks/checkout/inner-blocks/register-components.ts",
"./assets/js/blocks/cart-checkout/cart/inner-blocks/**/index.tsx",
"./assets/js/blocks/cart-checkout/cart/inner-blocks/register-components.ts"
],
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/backend/__fixtures__/checkout.fixture.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"title":"Checkout Block","pageContent":"<!-- wp:woocommerce/checkout -->\n<div class=\"wp-block-woocommerce-checkout is-loading\"></div>\n<!-- /wp:woocommerce/checkout -->"}
{"title":"Checkout Block","pageContent":"<!-- wp:woocommerce/checkout -->\n<div class=\"wp-block-woocommerce-checkout wc-block-checkout is-loading\"><!-- wp:woocommerce/checkout-fields-block -->\n<div class=\"wp-block-woocommerce-checkout-fields-block\"><!-- wp:woocommerce/checkout-express-payment-block -->\n<div class=\"wp-block-woocommerce-checkout-express-payment-block\"></div>\n<!-- /wp:woocommerce/checkout-express-payment-block -->\n\n<!-- wp:woocommerce/checkout-contact-information-block -->\n<div class=\"wp-block-woocommerce-checkout-contact-information-block\"></div>\n<!-- /wp:woocommerce/checkout-contact-information-block -->\n\n<!-- wp:woocommerce/checkout-shipping-address-block -->\n<div class=\"wp-block-woocommerce-checkout-shipping-address-block\"></div>\n<!-- /wp:woocommerce/checkout-shipping-address-block -->\n\n<!-- wp:woocommerce/checkout-billing-address-block -->\n<div class=\"wp-block-woocommerce-checkout-billing-address-block\"></div>\n<!-- /wp:woocommerce/checkout-billing-address-block -->\n\n<!-- wp:woocommerce/checkout-shipping-methods-block -->\n<div class=\"wp-block-woocommerce-checkout-shipping-methods-block\"></div>\n<!-- /wp:woocommerce/checkout-shipping-methods-block -->\n\n<!-- wp:woocommerce/checkout-payment-block -->\n<div class=\"wp-block-woocommerce-checkout-payment-block\"></div>\n<!-- /wp:woocommerce/checkout-payment-block -->\n\n<!-- wp:woocommerce/checkout-order-note-block -->\n<div class=\"wp-block-woocommerce-checkout-order-note-block\"></div>\n<!-- /wp:woocommerce/checkout-order-note-block -->\n\n<!-- wp:woocommerce/checkout-terms-block -->\n<div class=\"wp-block-woocommerce-checkout-terms-block\"></div>\n<!-- /wp:woocommerce/checkout-terms-block -->\n\n<!-- wp:woocommerce/checkout-actions-block -->\n<div class=\"wp-block-woocommerce-checkout-actions-block\"></div>\n<!-- /wp:woocommerce/checkout-actions-block --></div>\n<!-- /wp:woocommerce/checkout-fields-block -->\n\n<!-- wp:woocommerce/checkout-totals-block -->\n<div class=\"wp-block-woocommerce-checkout-totals-block\"><!-- wp:woocommerce/checkout-order-summary-block -->\n<div class=\"wp-block-woocommerce-checkout-order-summary-block\"></div>\n<!-- /wp:woocommerce/checkout-order-summary-block --></div>\n<!-- /wp:woocommerce/checkout-totals-block --></div>\n<!-- /wp:woocommerce/checkout -->"}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.base.json",
"include": [
"./assets/js/**/*",
"./assets/js/blocks/cart-checkout/checkout/**/block.json",
"./assets/js/blocks/checkout/**/block.json",
"./assets/js/blocks/cart-checkout/mini-cart-contents/inner-blocks/**/block.json",
"./storybook/**/*"
],
Expand Down