From bbef04d1c431fc19a88808b98be67b394d81fd08 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Sep 2020 22:04:17 +0100 Subject: [PATCH 1/5] chore(deps): update dependency cypress to v5.2.0 (#253) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c770c01..cba3c5d 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "babel-plugin-prismjs": "2.0.1", "babel-preset-react-app": "9.1.2", "commitizen": "4.2.1", - "cypress": "5.1.0", + "cypress": "5.2.0", "cypress-file-upload": "4.1.1", "cz-conventional-changelog": "3.3.0", "dotenv": "8.2.0", diff --git a/yarn.lock b/yarn.lock index 1cad7e5..c292cf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6534,10 +6534,10 @@ cypress-file-upload@4.1.1: dependencies: mime "^2.4.4" -cypress@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-5.1.0.tgz#979e9ff3e0acd792eefd365bf104046479a9643b" - integrity sha512-craPRO+Viu4268s7eBvX5VJW8aBYcAQT+EwEccQSMY+eH1ZPwnxIgyDlmMWvxLVX9SkWxOlZbEycPyzanQScBQ== +cypress@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-5.2.0.tgz#6902efd90703242a2539f0623c6e1118aff01f95" + integrity sha512-9S2spcrpIXrQ+CQIKHsjRoLQyRc2ehB06clJXPXXp1zyOL/uZMM3Qc20ipNki4CcNwY0nBTQZffPbRpODeGYQg== dependencies: "@cypress/listr-verbose-renderer" "^0.4.1" "@cypress/request" "^2.88.5" From cd447604b0d0d6af6056e0c9f95495f0d4382b01 Mon Sep 17 00:00:00 2001 From: Rui Saraiva Date: Sat, 19 Sep 2020 17:46:39 +0100 Subject: [PATCH 2/5] test(cypress): increase wait time --- cypress/integration/drag-and-drop.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/drag-and-drop.spec.js b/cypress/integration/drag-and-drop.spec.js index 5a0174a..da943fa 100644 --- a/cypress/integration/drag-and-drop.spec.js +++ b/cypress/integration/drag-and-drop.spec.js @@ -5,14 +5,14 @@ describe('Drag & Drop', () => { beforeEach(() => { cy.viewport(1280, 720) cy.visit('/') - cy.wait(200) + cy.wait(250) }) function dropFile(fixture) { cy.get('[data-cy="drag-and-drop"]').attachFile(fixture, { subjectType: 'drag-n-drop', }) - cy.wait(20) + cy.wait(50) } it('Drop 310x310 PNG file', () => { From cc34beb5810ab78480751a2494b56f0380b5763d Mon Sep 17 00:00:00 2001 From: Rui Saraiva Date: Sat, 19 Sep 2020 21:28:39 +0100 Subject: [PATCH 3/5] chore: test with local production server (#257) * chore: test with local production server * chore: remove sample cypress test file --- .github/workflows/tests.yml | 41 ++++++++++++++++-------------- cypress/integration/sample.spec.js | 7 ----- 2 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 cypress/integration/sample.spec.js diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b3f88bc..37a8672 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,31 +3,34 @@ name: Tests on: pull_request jobs: - wait_deploy: - name: Wait Vercel Deploy - runs-on: ubuntu-latest - outputs: - preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} - steps: - - name: Wait for Vercel preview deployment to be ready - uses: patrickedqvist/wait-for-vercel-preview@master - id: waitForVercelPreviewDeployment - with: - token: ${{ secrets.GITHUB_TOKEN }} - max_timeout: 120 - test_e2e: name: Run Cypress - needs: wait_deploy runs-on: ubuntu-16.04 steps: - uses: actions/checkout@v2 - - name: Run Cypress - uses: cypress-io/github-action@v1 + + - name: Use Node.js 12 + uses: actions/setup-node@v1 with: - config: baseUrl=${{ needs.wait_deploy.outputs.preview_url }} - wait-on: ${{ needs.wait_deploy.outputs.preview_url }} - wait-on-timeout: 120 + node-version: "12" + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + + - name: Cache Next.js build cache + uses: actions/cache@v2 + with: + path: ${{ github.workspace }}/.next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }} + + - name: Build static assets + run: yarn build + + - name: Run Cypress + uses: cypress-io/github-action@v2 + with: + start: npm start + wait-on: http://localhost:3000 # after the test run completes # store videos and any screenshots # NOTE: screenshots will be generated only if E2E test failed diff --git a/cypress/integration/sample.spec.js b/cypress/integration/sample.spec.js deleted file mode 100644 index d56aeb2..0000000 --- a/cypress/integration/sample.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -/// - -describe('My First Test', () => { - it('Visits the Favycon', () => { - cy.visit('/') - }) -}) From 5ec53dc68fa18bead2bfb0a05b6a4653d8c29a42 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 19 Sep 2020 21:48:49 +0100 Subject: [PATCH 4/5] chore(deps): update dependency prettier to v2.1.2 (#255) Co-authored-by: Renovate Bot Co-authored-by: Rui Saraiva --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cba3c5d..b9432f9 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "postcss-100vh-fix": "0.1.1", "postcss-flexbugs-fixes": "4.2.1", "postcss-preset-env": "6.7.0", - "prettier": "2.1.1", + "prettier": "2.1.2", "react-refresh": "0.8.3", "regenerator-runtime": "0.13.7", "sass": "1.26.10", diff --git a/yarn.lock b/yarn.lock index c292cf8..6ab1ebd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13255,10 +13255,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6" - integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw== +prettier@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" + integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== prettier@^1.16.4: version "1.19.1" From 5076d17d68fe6f278bfc699da26a743f6db96a5c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 19 Sep 2020 21:49:43 +0100 Subject: [PATCH 5/5] chore(deps): update dependency lint-staged to v10.4.0 (#256) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b9432f9..13162e2 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "eslint-plugin-react": "7.20.6", "eslint-plugin-react-hooks": "4.1.2", "husky": "4.3.0", - "lint-staged": "10.3.0", + "lint-staged": "10.4.0", "npm-run-all": "4.1.5", "postcss-100vh-fix": "0.1.1", "postcss-flexbugs-fixes": "4.2.1", diff --git a/yarn.lock b/yarn.lock index 6ab1ebd..75ad181 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10375,10 +10375,10 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@10.3.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.3.0.tgz#388c3d440590c45c339e7163f669ea69ae90b1e0" - integrity sha512-an3VgjHqmJk0TORB/sdQl0CTkRg4E5ybYCXTTCSJ5h9jFwZbcgKIx5oVma5e7wp/uKt17s1QYFmYqT9MGVosGw== +lint-staged@10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.0.tgz#d18628f737328e0bbbf87d183f4020930e9a984e" + integrity sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0"