Skip to content

Commit

Permalink
Small improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolad committed Feb 9, 2021
1 parent 5e018cc commit a6dacd5
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 138 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn ${{ matrix.task }}:ci ${{ env.CLI_ARGS }}
e2e:
name: E2E Tests
# needs: [build]
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -64,36 +64,33 @@ jobs:
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

# - name: Make sure PlayWright doesn't play it wrong
# run: yarn add -WD playwright
- name: Make sure PlayWright doesn't play it wrong
run: yarn add -WD playwright

# - name: Install WordPress
# run: yarn wp-env start
- name: Check out event-espresso-core
uses: actions/checkout@v2
with:
repository: eventespresso/event-espresso-core
path: event-espresso-core
persist-credentials: true
ref: dev
token: ${{ secrets.GH_ACTIONS_ACCESS_TOKEN }}

# - name: Setup Playwright
# uses: microsoft/playwright-github-action@v1
- name: Build event-espresso-core
run: cd event-espresso-core && yarn && yarn build

# - name: Check out event-espresso-core
# uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
# env:
# GIT_TRACE: 1
# GIT_CURL_VERBOSE: 1
# with:
# repository: eventespresso/event-espresso-core
# path: event-espresso-core
# persist-credentials: true
# ref: dev
# token: ${{ secrets.GH_ACTIONS_ACCESS_TOKEN }}
- name: Install WordPress
run: yarn wp-env start

- name: Clone event-espresso-core
run: source tools/deploy-test.sh "event-espresso-core" "dev"
- name: Setup Playwright
uses: microsoft/playwright-github-action@v1

# - name: Running the tests
# run: yarn test:e2e
- name: Running the tests
run: yarn test:e2e

- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@v2
# if: failure()
if: failure()
with:
name: failures-artifacts
path: artifacts
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ typings/

# SB-related
storybook-static

event-espresso-core
2 changes: 1 addition & 1 deletion domains/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-select": "^4.0.2"
},
"devDependencies": {
"@types/react-select": "^4.0.13",
"@types/react-select": "^3.1.2",
"@types/wordpress__block-editor": "^2.2.9",
"@types/wordpress__components": "^9.8.6",
"@types/wordpress__i18n": "^3.11.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"sb": "start-storybook -p 6006",
"test": "node scripts/test.js",
"test:ci": "FORCE_COLOR=true CI=true yarn test",
"test:e2e": "jest --detectOpenHandles --config packages/e2e-tests/jest.playwright.config.js",
"test:e2e": "jest --config packages/e2e-tests/jest.playwright.config.js",
"update-deps": "npx ncu -u && yarn workspaces run update-deps"
},
"lint-staged": {
Expand Down
10 changes: 0 additions & 10 deletions packages/e2e-tests/config/setup.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/e2e-tests/plugins/disable-animations.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ function enqueue_disable_animations_stylesheet() {
wp_add_inline_style( 'wp-components', $custom_css );
}

add_action( 'admin_enqueue_scripts', 'enqueue_disable_animations_stylesheet' );
add_action( 'admin_enqueue_scripts', 'enqueue_disable_animations_stylesheet' );
2 changes: 1 addition & 1 deletion packages/e2e-tests/plugins/nonce.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
function gutenberg_test_plugin_nonce_life() {
return 5;
}
add_filter( 'nonce_life', 'gutenberg_test_plugin_nonce_life' );
add_filter( 'nonce_life', 'gutenberg_test_plugin_nonce_life' );
8 changes: 7 additions & 1 deletion packages/e2e-tests/specs/hello.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ describe('hello playwright', () => {
it('should work', async () => {
await loginUser();

await activatePlugin('event-espresso-core');
await activatePlugin('event-espresso');

expect(true).toBe(true);

await page.click(`.toplevel_page_espresso_events > a`);

const espressoAdmin = await page.$eval('.espresso-admin', (el) => el.innerHTML);

expect(espressoAdmin).toContain('Event Espresso - Events');

await browser.close();
});
});
2 changes: 1 addition & 1 deletion packages/e2e-tests/utils/activate-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function activatePlugin(slug) {

await page.click(`tr[data-slug="${slug}"] .activate a`);

await page.isVisible(`tr[data-slug="${slug}"] .deactivate a`);
// await page.isVisible(`tr[data-slug="${slug}"] .deactivate a`);

await page.screenshot({ path: `artifacts/activatePlugin-after.png` });

Expand Down
92 changes: 0 additions & 92 deletions tools/deploy-test.sh

This file was deleted.

9 changes: 4 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4786,12 +4786,11 @@
"@types/draft-js" "*"
"@types/react" "*"

"@types/react-select@^4.0.13":
version "4.0.13"
resolved "https://registry.yarnpkg.com/@types/react-select/-/react-select-4.0.13.tgz#8d2c41a0df7fbf67ab0b995797b0e9b4e6b38cde"
integrity sha512-rXYEc565IzzjgQzs9C0YCFxV/QajMZnCHG5QwRQ5BZMfH0Lj90VI/xohawemRkD46IvpaLRbO6xzSquJlgBGUA==
"@types/react-select@^3.1.2":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@types/react-select/-/react-select-3.1.2.tgz#38627df4b49be9b28f800ed72b35d830369a624b"
integrity sha512-ygvR/2FL87R2OLObEWFootYzkvm67LRA+URYEAcBuvKk7IXmdsnIwSGm60cVXGaqkJQHozb2Cy1t94tCYb6rJA==
dependencies:
"@emotion/serialize" "^1.0.0"
"@types/react" "*"
"@types/react-dom" "*"
"@types/react-transition-group" "*"
Expand Down

0 comments on commit a6dacd5

Please sign in to comment.