diff --git a/.circleci/config.yml b/.circleci/config.yml index 07590c318..f034386f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ orbs: executors: with-chrome-and-firefox: docker: - - image: "cypress/browsers:node12.16.2-chrome81-ff75" + - image: "cypress/browsers:node12.18.0-chrome83-ff77" # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # commands: @@ -118,7 +118,7 @@ linux-workflow: &linux-workflow name: "UI Tests - Firefox - Mobile" browser: firefox spec: cypress/tests/ui/* - config: "viewportWidth=375,viewportHeight=667" + config: viewportWidth=375,viewportHeight=667 executor: with-chrome-and-firefox wait-on: "http://localhost:3000" yarn: true diff --git a/.node-version b/.node-version index 499fd8b18..a66526b79 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -12.16 \ No newline at end of file +12.18 \ No newline at end of file diff --git a/cypress.json b/cypress.json index 1ea36acce..441625f6a 100644 --- a/cypress.json +++ b/cypress.json @@ -4,6 +4,7 @@ "integrationFolder": "cypress/tests", "viewportHeight": 1000, "viewportWidth": 1280, + "firefoxGcInterval": null, "env": { "apiUrl": "http://localhost:3001", "mobileViewportWidthBreakpoint": 414, diff --git a/cypress/tests/ui/notifications.spec.ts b/cypress/tests/ui/notifications.spec.ts index 9e8488c55..f76ee7c21 100644 --- a/cypress/tests/ui/notifications.spec.ts +++ b/cypress/tests/ui/notifications.spec.ts @@ -86,7 +86,11 @@ describe("Notifications", function () { cy.visit(`/transaction/${transaction.id}`); }); + const likesCountSelector = "[data-test*=transaction-like-count]"; + cy.contains(likesCountSelector, 0); cy.getBySelLike("like-button").click(); + cy.getBySelLike("like-button").should("be.disabled"); + cy.contains(likesCountSelector, 1); cy.switchUser(ctx.userA.username); @@ -97,6 +101,7 @@ describe("Notifications", function () { cy.location("pathname").should("equal", "/notifications"); cy.getBySelLike("notification-list-item") + .should("have.length", 9) .first() .should("contain", ctx.userC.firstName) .and("contain", "liked"); @@ -125,6 +130,8 @@ describe("Notifications", function () { cy.getBySelLike("comment-input").type("Thank You{enter}"); + cy.wait("@postComment"); + cy.switchUser(ctx.userB.username); cy.getBySelLike("notifications-link").click();