Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diff --git a/.github/workflows/cypress-test.yaml b/.github/workflows/cypress-test.yaml index c80ac37..8626403 100644 --- a/.github/workflows/cypress-test.yaml +++ b/.github/workflows/cypress-test.yaml @@ -6,10 +6,6 @@ on: jobs: cypress-run: runs-on: ubuntu-latest - container: - image: cypress/browsers:node16.5.0-chrome97-ff96 - # @see cypress-io/github-action#446 (comment) - options: --user 1001 steps: - uses: actions/checkout@v2 - name: Cache pnpm modules @@ -30,18 +26,20 @@ jobs: cache: "pnpm" - name: Build extension run: pnpm build - # tests multiple browser - name: Cypress run on Chrome uses: cypress-io/github-action@v2 with: install: false start: pnpm run serve wait-on: 'http://localhost:3000' - browser: chrome - - name: Cypress run on Firefox - uses: cypress-io/github-action@v2 + - uses: actions/upload-artifact@v2 + if: failure() with: - install: false - start: pnpm run serve - wait-on: 'http://localhost:3000' - browser: firefox \ No newline at end of file + name: cypress-screenshots + path: cypress/screenshots + # Test run video was always captured, so this action uses "always()" condition + - uses: actions/upload-artifact@v2 + if: always() + with: + name: cypress-videos + path: cypress/videos \ No newline at end of file diff --git a/cypress/integration/e2e.ts b/cypress/integration/e2e.ts index bceba02..e396346 100644 --- a/cypress/integration/e2e.ts +++ b/cypress/integration/e2e.ts @@ -113,7 +113,7 @@ describe("App", () => { cy.window().its("close").should("be.called"); }); - it.skip("TODO: on Enter key", () => { + it.only("TODO: on Enter key", () => { cy.get("[data-cy=search-input]").type("history-item"); cy.get("[data-cy=search-result-0]").should("have.class", "selected-item"); cy.get("[data-cy=search-input]").type("{enter}"); diff --git a/cypress/support/support.ts b/cypress/support/support.ts index 5af019e..f518131 100644 --- a/cypress/support/support.ts +++ b/cypress/support/support.ts @@ -21,8 +21,9 @@ export const setupExtensionEnvironment = ({ addListener: cy.stub(), } as any, onConnect: { - addListener: cy.stub(), + addListener: cy.stub().as("onConnect"), } as any, + connect: cy.stub().as("connect").returns(cy.stub()) }; (win.chrome.history as Partial<typeof chrome.history>) = { search: ((_: any, callback: (data: any[]) => void) => {
- Loading branch information