From c5078e09a06ed9e3fecfa38cb2f986607086317a Mon Sep 17 00:00:00 2001 From: helenanull Date: Tue, 6 Apr 2021 21:45:32 +0300 Subject: [PATCH] issues with 7.0.0, roll back to 6.9.1 version --- cypress/integration/article.spec.js | 44 +++++++------- package-lock.json | 94 ++++++++++++++--------------- package.json | 2 +- 3 files changed, 68 insertions(+), 72 deletions(-) diff --git a/cypress/integration/article.spec.js b/cypress/integration/article.spec.js index 741f873..8b3e336 100644 --- a/cypress/integration/article.spec.js +++ b/cypress/integration/article.spec.js @@ -11,31 +11,11 @@ describe('Article', () => { }) }) - it('logged out user can see article page', function () { - cy.createArticle().then((link) => { - // log out to visit article as logged out user - cy.clearCookies() - cy.clearLocalStorage() - cy.visit(`/article/${link}`) - }) - cy.get(article.title).should('be.visible') - cy.get(article.banner).should('be.visible') - cy.get(article.author).should('be.visible') - .and('have.text', this.username) - cy.get(article.followButton).should('be.visible') - .and('contain', `Follow ${this.username}`) - cy.get(article.favoriteButton).should('be.visible') - cy.get(article.body).should('be.visible') - cy.get(article.commentTextForLoggedOutUsers).should('be.visible') - .and('contain', 'Sign in or sign up to add comments on this article') - cy.get(article.actions).should('be.visible') - }) - it('can create a new article', () => { cy.visit('/editor/') cy.get(editor.titleField).type('My post title') cy.get(editor.aboutField).type('Cypress') - cy.get(editor.bodyField).type(`Cypress is so cool awyeah! ${seeMoreLink}`) + cy.get(editor.bodyField).type(`Simple automation project ${seeMoreLink}`) cy.get(editor.publishButton).click() cy.get(article.title).should('be.visible') .and('have.text', 'My post title') @@ -45,7 +25,7 @@ describe('Article', () => { cy.visit('/editor/') cy.get(editor.titleField).type('My post title') cy.get(editor.aboutField).type('Cypress') - cy.get(editor.bodyField).type(`Cypress is so cool awyeah! ${seeMoreLink}`) + cy.get(editor.bodyField).type(`Simple automation project ${seeMoreLink}`) cy.get(editor.tagsField).type('cypress{enter}') cy.get(editor.tagsField).should('have.value', '') cy.get(editor.addedTags).should('be.visible') @@ -66,6 +46,26 @@ describe('Article', () => { .and('contain', 'test-automation') }) + it('logged out user can see article page', function () { + cy.createArticle().then((link) => { + // log out to visit article as logged out user + cy.clearCookies() + cy.clearLocalStorage() + cy.visit(`/article/${link}`) + }) + cy.get(article.title).should('be.visible') + cy.get(article.banner).should('be.visible') + cy.get(article.author).should('be.visible') + .and('have.text', this.username) + cy.get(article.followButton).should('be.visible') + .and('contain', `Follow ${this.username}`) + cy.get(article.favoriteButton).should('be.visible') + cy.get(article.body).should('be.visible') + cy.get(article.commentTextForLoggedOutUsers).should('be.visible') + .and('contain', 'Sign in or sign up to add comments on this article') + cy.get(article.actions).should('be.visible') + }) + it('can edit an article', () => { // we already know if creating an article works or not from the first test // we can now use a shortcut (cy.createArticle() command) to test other scenarios diff --git a/package-lock.json b/package-lock.json index ac92b7d..20065df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -202,9 +202,9 @@ } }, "@types/node": { - "version": "14.14.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", - "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==", + "version": "12.12.50", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.50.tgz", + "integrity": "sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w==", "dev": true }, "@types/sinonjs__fake-timers": { @@ -444,9 +444,9 @@ "dev": true }, "ci-info": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz", - "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, "cli-cursor": { @@ -586,19 +586,19 @@ } }, "cypress": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-7.0.0.tgz", - "integrity": "sha512-gri53gIGQPf/RoUknwvNS3alUjZwdmtp9BcKzLgyrwA/gBxJcpDLZ1t+MTvXy57ifRWEMxmEWzQe+iszCzJZqA==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-6.9.1.tgz", + "integrity": "sha512-/RVx6sOhsyTR9sd9v0BHI4tnDZAhsH9rNat7CIKCUEr5VPWxyfGH0EzK4IHhAqAH8vjFcD4U14tPiJXshoUrmQ==", "dev": true, "requires": { "@cypress/listr-verbose-renderer": "^0.4.1", "@cypress/request": "^2.88.5", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", - "@types/sinonjs__fake-timers": "^6.0.2", + "@types/node": "12.12.50", + "@types/sinonjs__fake-timers": "^6.0.1", "@types/sizzle": "^2.3.2", - "arch": "^2.2.0", - "blob-util": "^2.0.2", + "arch": "^2.1.2", + "blob-util": "2.0.2", "bluebird": "^3.7.2", "cachedir": "^2.3.0", "chalk": "^4.1.0", @@ -606,41 +606,31 @@ "cli-table3": "~0.6.0", "commander": "^5.1.0", "common-tags": "^1.8.0", - "dayjs": "^1.10.4", + "dayjs": "^1.9.3", "debug": "4.3.2", - "eventemitter2": "^6.4.3", - "execa": "4.1.0", + "eventemitter2": "^6.4.2", + "execa": "^4.0.2", "executable": "^4.1.1", "extract-zip": "^1.7.0", - "fs-extra": "^9.1.0", + "fs-extra": "^9.0.1", "getos": "^3.2.1", - "is-ci": "^3.0.0", - "is-installed-globally": "~0.4.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.2", "lazy-ass": "^1.6.0", "listr": "^0.14.3", - "lodash": "^4.17.21", + "lodash": "^4.17.19", "log-symbols": "^4.0.0", "minimist": "^1.2.5", + "moment": "^2.29.1", "ospath": "^1.2.2", - "pretty-bytes": "^5.6.0", + "pretty-bytes": "^5.4.1", "ramda": "~0.27.1", "request-progress": "^3.0.0", - "supports-color": "^8.1.1", + "supports-color": "^7.2.0", "tmp": "~0.2.1", "untildify": "^4.0.0", "url": "^0.11.0", "yauzl": "^2.10.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "dashdash": { @@ -1175,12 +1165,12 @@ } }, "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", "dev": true, "requires": { - "ini": "2.0.0" + "ini": "1.3.7" } }, "globals": { @@ -1314,9 +1304,9 @@ "dev": true }, "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, "is-boolean-object": { @@ -1329,12 +1319,12 @@ } }, "is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "ci-info": "^3.1.1" + "ci-info": "^2.0.0" } }, "is-extglob": { @@ -1359,13 +1349,13 @@ } }, "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", "dev": true, "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" } }, "is-number-object": { @@ -1852,6 +1842,12 @@ "minimist": "^1.2.5" } }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", + "dev": true + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/package.json b/package.json index f5b7af0..1e1d910 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "cy:ci": "cypress run --env device=web --record --parallel --browser chrome --headless" }, "devDependencies": { - "cypress": "^7.0.0", + "cypress": "^6.9.1", "eslint": "^7.23.0" } }