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 6f4e134 commit 29a7291
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 123 deletions.
31 changes: 14 additions & 17 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 @@ -67,33 +67,30 @@ jobs:
- name: Make sure PlayWright doesn't play it wrong
run: yarn add -WD playwright

- 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: Build event-espresso-core
run: cd event-espresso-core && yarn && yarn build

- name: Install WordPress
run: yarn wp-env start

- name: Setup Playwright
uses: microsoft/playwright-github-action@v1

# - 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: Clone event-espresso-core
run: source tools/deploy-test.sh "event-espresso-core" "dev"

- 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
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
102 changes: 0 additions & 102 deletions tools/deploy-test.sh

This file was deleted.

0 comments on commit 29a7291

Please sign in to comment.