diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d00e9c27..40872040 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,11 +43,7 @@ jobs: env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload combined test coverage to Github Artifacts - uses: actions/upload-artifact@v2 - with: - name: Ambianic-PWA-Test-Artifact - path: .nyc_output/out.json + - name: Upload Cypress test recorded videos for debugging uses: actions/upload-artifact@v2 if: always() @@ -60,16 +56,23 @@ jobs: with: name: cypress-screenshots path: cypress/screenshots + - name: Code Coverage Report uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos file: | - ./cypress-coverage/coverage-final.json + ./coverage/coverage-final.json ./jest-coverage/coverage-final.json fail_ci_if_error: true # optional (default = false) path_to_write_report: ./coverage/codecov_report.txt + - name: Upload combined test coverage to Github Artifacts + uses: actions/upload-artifact@v2 + with: + name: Ambianic-PWA-Test-Artifact + path: ./coverage/codecov_report.txt + - name: Build PWA distribution for production run: | npm run build --if-present diff --git a/cypress/integration/ambianic-tests/navbar.spec.js b/cypress/integration/ambianic-tests/navbar.spec.js index f382b666..72d09fbe 100644 --- a/cypress/integration/ambianic-tests/navbar.spec.js +++ b/cypress/integration/ambianic-tests/navbar.spec.js @@ -11,10 +11,6 @@ context('Check Navbar Items', () => { cy.get('[data-cy=timeline]').click() }) - it('Should have a disabled search bar', () => { - cy.get('[data-cy=container').find('#searchbar').should('be.disabled') - }) - it('Should be a download off button', () => { const t = cy.get('[data-cy=download-off]') expect(t).to.exist @@ -35,6 +31,11 @@ context('Check Navbar Items', () => { */ it('Should display upgrade icon on different viewports', () => { + cy.window().then(win => win.__store__.dispatch('SAVE_AUTHENTICATED_USER', { + loadingAuth: false + })) + + expect(cy.get('[data-cy=profile-component]')).to.exist expect(cy.get('[data-cy=login]')).to.exist diff --git a/cypress/integration/ambianic-tests/subscription.spec.js b/cypress/integration/ambianic-tests/subscription.spec.js index 1e1c15f6..edcef75d 100644 --- a/cypress/integration/ambianic-tests/subscription.spec.js +++ b/cypress/integration/ambianic-tests/subscription.spec.js @@ -68,7 +68,7 @@ context('SubscriptionModal', () => { }) it('It contains 7 input forms', () => { - cy.get('input').its('length').should('be.eq', 7) + cy.get('input').its('length').should('be.eq', 6) }) it('Should close modal at click of `Cancel` button', () => { diff --git a/package.json b/package.json index a3d674f0..21511f7c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", - "codecov:e2e": "codecov -f ./jest-coverage/coverage-final.json", + "codecov:e2e": "codecov -f ./coverage/coverage-final.json", "codecov:unit": "codecov -f ./jest-coverage/coverage-final.json", "codecov": "codecov -f jest-coverage/coverage-final.json && codecov -f coverage/coverage-final.json", "copy:reports": "mkdir -p reports/ && cp coverage/coverage-final.json reports/from-cypress.json && cp jest-coverage/coverage-final.json reports/from-jest.json", diff --git a/src/views/Home.vue b/src/views/Home.vue index 6ee960d7..dc570758 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,21 +1,21 @@