diff --git a/backend/.dockerignore b/backend/.dockerignore index d694f0d21..a0883bf4d 100644 --- a/backend/.dockerignore +++ b/backend/.dockerignore @@ -12,7 +12,6 @@ docker-compose*.yml ./*.log node_modules/ -scripts/ build/ maintenance-worker/ diff --git a/backend/Dockerfile b/backend/Dockerfile index fc15aca63..fc6c1f4b3 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -74,7 +74,7 @@ FROM code as build # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive # yarn build -RUN yarn run build +RUN /bin/sh -c "yarn run build" ################################################################################## # TEST ########################################################################### diff --git a/backend/package.json b/backend/package.json index 9e0e3b72e..eb8119a8f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -11,7 +11,7 @@ "__migrate": "migrate --compiler 'js:@babel/register' --migrations-dir ./src/db/migrations", "prod:migrate": "migrate --migrations-dir ./build/db/migrations --store ./build/db/migrate/store.js", "start": "node build/", - "build": "tsc && mkdir -p build/middleware/helpers/email/templates/ && cp -r src/middleware/helpers/email/templates/*.html build/middleware/helpers/email/templates/ && mkdir -p build/middleware/helpers/email/templates/en/ && cp -r src/middleware/helpers/email/templates/en/*.html build/middleware/helpers/email/templates/en/ && mkdir -p build/middleware/helpers/email/templates/de/ && cp -r src/middleware/helpers/email/templates/de/*.html build/middleware/helpers/email/templates/de/ && mkdir -p build/schema/types/ && cp -r src/schema/types/*.gql build/schema/types/ && mkdir -p build/schema/types/enum/ && cp -r src/schema/types/enum/*.gql build/schema/types/enum/ && mkdir -p build/schema/types/scalar/ && cp -r src/schema/types/scalar/*.gql build/schema/types/scalar/ && mkdir -p build/schema/types/type/ && cp -r src/schema/types/type/*.gql build/schema/types/type/", + "build": "tsc && ./scripts/build.copy.files.sh", "dev": "nodemon --exec ts-node src/ -e js,ts,gql", "dev:debug": "nodemon --exec babel-node --inspect=0.0.0.0:9229 src/ -e js,gql", "lint": "eslint src --config .eslintrc.js", @@ -72,7 +72,7 @@ "metascraper-logo": "^5.33.5", "metascraper-publisher": "^5.33.5", "metascraper-soundcloud": "^5.34.4", - "metascraper-title": "^5.33.5", + "metascraper-title": "^5.34.7", "metascraper-url": "^5.34.2", "metascraper-video": "^5.33.5", "metascraper-youtube": "^5.33.5", diff --git a/backend/scripts/build.copy.files.sh b/backend/scripts/build.copy.files.sh new file mode 100755 index 000000000..85022ba9b --- /dev/null +++ b/backend/scripts/build.copy.files.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# html files +mkdir -p build/middleware/helpers/email/templates/ +cp -r src/middleware/helpers/email/templates/*.html build/middleware/helpers/email/templates/ + +mkdir -p build/middleware/helpers/email/templates/en/ +cp -r src/middleware/helpers/email/templates/en/*.html build/middleware/helpers/email/templates/en/ + +mkdir -p build/middleware/helpers/email/templates/de/ +cp -r src/middleware/helpers/email/templates/de/*.html build/middleware/helpers/email/templates/de/ + +# gql files +mkdir -p build/schema/types/ +cp -r src/schema/types/*.gql build/schema/types/ + +mkdir -p build/schema/types/enum/ +cp -r src/schema/types/enum/*.gql build/schema/types/enum/ + +mkdir -p build/schema/types/scalar/ +cp -r src/schema/types/scalar/*.gql build/schema/types/scalar/ + +mkdir -p build/schema/types/type/ +cp -r src/schema/types/type/*.gql build/schema/types/type/ \ No newline at end of file diff --git a/backend/src/models/index.js b/backend/src/models/index.js index d476e5f9b..347c3a029 100644 --- a/backend/src/models/index.js +++ b/backend/src/models/index.js @@ -1,20 +1,37 @@ // NOTE: We cannot use `fs` here to clean up the code. Cypress breaks on any npm // module that is not browser-compatible. Node's `fs` module is server-side only export default { - Image: require('./Image.js').default, - Badge: require('./Badge.js').default, - User: require('./User.js').default, - Group: require('./Group.js').default, - EmailAddress: require('./EmailAddress.js').default, - UnverifiedEmailAddress: require('./UnverifiedEmailAddress.js').default, - SocialMedia: require('./SocialMedia.js').default, - Post: require('./Post.js').default, - Comment: require('./Comment.js').default, - Category: require('./Category.js').default, - Tag: require('./Tag.js').default, - Location: require('./Location.js').default, - Donations: require('./Donations.js').default, - Report: require('./Report.js').default, - Migration: require('./Migration.js').default, - InviteCode: require('./InviteCode.js').default, + Image: typeof Cypress !== 'undefined' ? require('./Image.js') : require('./Image.js').default, + Badge: typeof Cypress !== 'undefined' ? require('./Badge.js') : require('./Badge.js').default, + User: typeof Cypress !== 'undefined' ? require('./User.js') : require('./User.js').default, + Group: typeof Cypress !== 'undefined' ? require('./Group.js') : require('./Group.js').default, + EmailAddress: + typeof Cypress !== 'undefined' + ? require('./EmailAddress.js') + : require('./EmailAddress.js').default, + UnverifiedEmailAddress: + typeof Cypress !== 'undefined' + ? require('./UnverifiedEmailAddress.js') + : require('./UnverifiedEmailAddress.js').default, + SocialMedia: + typeof Cypress !== 'undefined' + ? require('./SocialMedia.js') + : require('./SocialMedia.js').default, + Post: typeof Cypress !== 'undefined' ? require('./Post.js') : require('./Post.js').default, + Comment: + typeof Cypress !== 'undefined' ? require('./Comment.js') : require('./Comment.js').default, + Category: + typeof Cypress !== 'undefined' ? require('./Category.js') : require('./Category.js').default, + Tag: typeof Cypress !== 'undefined' ? require('./Tag.js') : require('./Tag.js').default, + Location: + typeof Cypress !== 'undefined' ? require('./Location.js') : require('./Location.js').default, + Donations: + typeof Cypress !== 'undefined' ? require('./Donations.js') : require('./Donations.js').default, + Report: typeof Cypress !== 'undefined' ? require('./Report.js') : require('./Report.js').default, + Migration: + typeof Cypress !== 'undefined' ? require('./Migration.js') : require('./Migration.js').default, + InviteCode: + typeof Cypress !== 'undefined' + ? require('./InviteCode.js') + : require('./InviteCode.js').default, } diff --git a/backend/src/schema/resolvers/filter-posts.spec.js b/backend/src/schema/resolvers/filter-posts.spec.js index 0b96e001f..41fbd0ea7 100644 --- a/backend/src/schema/resolvers/filter-posts.spec.js +++ b/backend/src/schema/resolvers/filter-posts.spec.js @@ -158,7 +158,7 @@ describe('Filter Posts', () => { }) describe('order events by event start descending', () => { - it('finds the events orderd accordingly', async () => { + it('finds the events ordered accordingly', async () => { const { data: { Post: result }, } = await query({ @@ -180,7 +180,7 @@ describe('Filter Posts', () => { }) describe('order events by event start ascending', () => { - it('finds the events orderd accordingly', async () => { + it('finds the events ordered accordingly', async () => { const { data: { Post: result }, } = await query({ diff --git a/backend/yarn.lock b/backend/yarn.lock index b55842174..9cba61b21 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -1511,10 +1511,10 @@ url-regex "~4.1.1" video-extensions "~1.1.0" -"@metascraper/helpers@^5.33.5", "@metascraper/helpers@^5.34.2", "@metascraper/helpers@^5.34.4": - version "5.34.4" - resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.34.4.tgz#59faf01466938b26aa8df147f97c7f9f4d739d28" - integrity sha512-OZdXkfxJXH5dW+aoptLJzxN56Xj+ABzbqZ9NDuKn908zW4tvLBPD6go3qdd3GXXQZH7TxvWpETn9i1AxzoyKmQ== +"@metascraper/helpers@^5.33.5", "@metascraper/helpers@^5.34.2", "@metascraper/helpers@^5.34.4", "@metascraper/helpers@^5.34.7": + version "5.34.7" + resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.34.7.tgz#749a288813e9f61938bb64d34bfb4e2c26689cbe" + integrity sha512-h3Kg9xFoVlr3rqxbhpR+o7nzYuThXtiDuk+kiaIWozAguUWT6xvwb3iHKuCdKC9/29PXeJ+UqM9WxBamxbzGmg== dependencies: audio-extensions "0.0.0" chrono-node "~2.6.2" @@ -1527,13 +1527,13 @@ is-uri "~1.2.4" iso-639-3 "~2.2.0" isostring "0.0.1" - jsdom "~22.0.0" + jsdom "~22.1.0" lodash "~4.17.21" memoize-one "~6.0.0" microsoft-capitalize "~1.0.5" mime "~3.0.0" normalize-url "~6.1.0" - re2 "~1.18.0" + re2 "~1.18.3" smartquotes "~2.3.2" tldts "~6.0.1" url-regex-safe "~3.0.0" @@ -5918,10 +5918,10 @@ insane@2.6.1: assignment "2.0.0" he "0.5.0" -install-artifact-from-github@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.3.2.tgz#1a16d9508e40330523a3017ae0d4713ccc64de82" - integrity sha512-yCFcLvqk0yQdxx0uJz4t9Z3adDMLAYrcGYv546uRXCSvxE+GqNYhhz/KmrGcUKGI/gVLR9n/e/zM9jX/+ASMJQ== +install-artifact-from-github@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.3.3.tgz#57d89bacfa0f47d7307fe41b6247cda9f9a8079c" + integrity sha512-x79SL0d8WOi1ZjXSTUqqs0GPQZ92YArJAN9O46wgU9wdH2U9ecyyhB9YGDbPe2OLV4ptmt6AZYRQZ2GydQZosQ== invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" @@ -6807,10 +6807,10 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -jsdom@~22.0.0: - version "22.0.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-22.0.0.tgz#3295c6992c70089c4b8f5cf060489fddf7ee9816" - integrity sha512-p5ZTEb5h+O+iU02t0GfEjAnkdYPrQSkfuTSMkMYyIoMvUNEHsbG0bHHbfXIcfTqD2UfvjQX7mmgiFsyRwGscVw== +jsdom@~22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-22.1.0.tgz#0fca6d1a37fbeb7f4aac93d1090d782c56b611c8" + integrity sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw== dependencies: abab "^2.0.6" cssstyle "^3.0.0" @@ -7385,12 +7385,12 @@ metascraper-soundcloud@^5.34.4: dependencies: "@metascraper/helpers" "^5.34.4" -metascraper-title@^5.33.5: - version "5.33.5" - resolved "https://registry.yarnpkg.com/metascraper-title/-/metascraper-title-5.33.5.tgz#2efd6aae03211175fa2e27b4d827cade4c3e35f4" - integrity sha512-Vavt/2Yt4BZP+++xsV2ZnUqqQ4WHxRImZq6fZD6Eh8R8nt43kuQdgKrBKTD3Ybk6/qvlCTQ9XY57m/KTIiAMnA== +metascraper-title@^5.34.7: + version "5.34.7" + resolved "https://registry.yarnpkg.com/metascraper-title/-/metascraper-title-5.34.7.tgz#d53afa05eb4d5f2d7b8ec772ddfc335733f86a21" + integrity sha512-k+eDC12Y1m5n/RE3GhqmWRtNSKH9rDXvAzJ6k2T9+9PyaGeaSN9dWLnc3rK9TYmdFP02kTKhCAV8WerHw/7IqA== dependencies: - "@metascraper/helpers" "^5.33.5" + "@metascraper/helpers" "^5.34.7" metascraper-url@^5.34.2: version "5.34.2" @@ -7854,7 +7854,7 @@ node-fetch@^2.1.2, node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@~2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-gyp@^9.3.0: +node-gyp@^9.3.1: version "9.3.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.3.1.tgz#1e19f5f290afcc9c46973d68700cbd21a96192e4" integrity sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg== @@ -8711,14 +8711,14 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -re2@~1.18.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/re2/-/re2-1.18.0.tgz#6d6f47c5aaa436eb7a7d68b260f8cf25d7948619" - integrity sha512-MoCYZlJ9YUgksND9asyNF2/x532daXU/ARp1UeJbQ5flMY6ryKNEhrWt85aw3YluzOJlC3vXpGgK2a1jb0b4GA== +re2@~1.18.3: + version "1.18.3" + resolved "https://registry.yarnpkg.com/re2/-/re2-1.18.3.tgz#64120f3990351e6d71207b095a92ebc41f123c7f" + integrity sha512-QAUSIl5znNR/GOXLIUWWao0pPQ2VZU/t9u+0j17x7lXXypPsil8iuYBsSuMDZ3TGx439332tYdh0d9Nt8XGbHg== dependencies: - install-artifact-from-github "^1.3.1" + install-artifact-from-github "^1.3.3" nan "^2.17.0" - node-gyp "^9.3.0" + node-gyp "^9.3.1" reachable-url@~1.7.1: version "1.7.1" diff --git a/cypress/cypress.config.js b/cypress/cypress.config.js new file mode 100644 index 000000000..2d2cefc47 --- /dev/null +++ b/cypress/cypress.config.js @@ -0,0 +1,53 @@ +const dotenv = require('dotenv') +const { defineConfig } = require("cypress"); +const browserify = require("@badeball/cypress-cucumber-preprocessor/browserify"); +const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor"); + +// Test persistent(between commands) store +const testStore = {} + +async function setupNodeEvents(on, config) { + await addCucumberPreprocessorPlugin(on, config); + + on("file:preprocessor", browserify.default(config)); + + on("task", { + pushValue({ name, value }) { + testStore[name] = value + return true + }, + getValue(name) { + console.log("getValue",name,testStore) + return testStore[name] + }, + }); + + on("after:run", (results) => { + if (results) { + console.log(results.status); + } + }); + + return config; +} + +// Import backend .env (smart)? +const { parsed } = dotenv.config({ path: '../backend/.env' }) + +module.exports = defineConfig({ + e2e: { + projectId: "qa7fe2", + defaultCommandTimeout: 10000, + chromeWebSecurity: false, + baseUrl: "http://localhost:3000", + specPattern: "cypress/e2e/**/*.feature", + supportFile: "cypress/support/e2e.js", + retries: { + runMode: 2, + openMode: 0, + }, + video: false, + setupNodeEvents, + }, + env: parsed +}); \ No newline at end of file diff --git a/cypress/cypress.json b/cypress/cypress.json deleted file mode 100644 index de323f736..000000000 --- a/cypress/cypress.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "projectId": "qa7fe2", - "defaultCommandTimeout": 10000, - "ignoreTestFiles": "*.js", - "chromeWebSecurity": false, - "baseUrl": "http://localhost:3000", - "video":false, - "retries": { - "runMode": 2, - "openMode": 0 - } -} diff --git a/cypress/integration/Admin.DonationInfo.feature b/cypress/e2e/Admin.DonationInfo.feature similarity index 100% rename from cypress/integration/Admin.DonationInfo.feature rename to cypress/e2e/Admin.DonationInfo.feature diff --git a/cypress/integration/Admin.PinPost.feature b/cypress/e2e/Admin.PinPost.feature similarity index 100% rename from cypress/integration/Admin.PinPost.feature rename to cypress/e2e/Admin.PinPost.feature diff --git a/cypress/integration/Admin.TagOverview.feature b/cypress/e2e/Admin.TagOverview.feature similarity index 100% rename from cypress/integration/Admin.TagOverview.feature rename to cypress/e2e/Admin.TagOverview.feature diff --git a/cypress/integration/Internationalization.feature b/cypress/e2e/Internationalization.feature similarity index 100% rename from cypress/integration/Internationalization.feature rename to cypress/e2e/Internationalization.feature diff --git a/cypress/integration/Moderation.HidePost.feature b/cypress/e2e/Moderation.HidePost.feature similarity index 100% rename from cypress/integration/Moderation.HidePost.feature rename to cypress/e2e/Moderation.HidePost.feature diff --git a/cypress/integration/Moderation.ReportContent.feature b/cypress/e2e/Moderation.ReportContent.feature similarity index 100% rename from cypress/integration/Moderation.ReportContent.feature rename to cypress/e2e/Moderation.ReportContent.feature diff --git a/cypress/integration/Notification.Mention.feature b/cypress/e2e/Notification.Mention.feature similarity index 100% rename from cypress/integration/Notification.Mention.feature rename to cypress/e2e/Notification.Mention.feature diff --git a/cypress/integration/PersistentLinks.feature b/cypress/e2e/PersistentLinks.feature similarity index 100% rename from cypress/integration/PersistentLinks.feature rename to cypress/e2e/PersistentLinks.feature diff --git a/cypress/integration/Post.Comment.feature b/cypress/e2e/Post.Comment.feature similarity index 100% rename from cypress/integration/Post.Comment.feature rename to cypress/e2e/Post.Comment.feature diff --git a/cypress/integration/Post.Create.feature b/cypress/e2e/Post.Create.feature similarity index 100% rename from cypress/integration/Post.Create.feature rename to cypress/e2e/Post.Create.feature diff --git a/cypress/integration/Post.Images.feature b/cypress/e2e/Post.Images.feature similarity index 100% rename from cypress/integration/Post.Images.feature rename to cypress/e2e/Post.Images.feature diff --git a/cypress/integration/Post.feature b/cypress/e2e/Post.feature similarity index 100% rename from cypress/integration/Post.feature rename to cypress/e2e/Post.feature diff --git a/cypress/integration/Search.feature.broken b/cypress/e2e/Search.feature.broken similarity index 100% rename from cypress/integration/Search.feature.broken rename to cypress/e2e/Search.feature.broken diff --git a/cypress/integration/User.Authentication.feature b/cypress/e2e/User.Authentication.feature similarity index 95% rename from cypress/integration/User.Authentication.feature rename to cypress/e2e/User.Authentication.feature index db7680bd4..878ecad4a 100644 --- a/cypress/integration/User.Authentication.feature +++ b/cypress/e2e/User.Authentication.feature @@ -22,5 +22,6 @@ Feature: User authentication Scenario: Log out Given I am logged in as "peter-pan" - When I log out + When I navigate to page "/" + And I log out Then I am on page "login" diff --git a/cypress/integration/User.Block.feature.broken b/cypress/e2e/User.Block.feature.broken similarity index 100% rename from cypress/integration/User.Block.feature.broken rename to cypress/e2e/User.Block.feature.broken diff --git a/cypress/integration/User.Mute.feature.broken b/cypress/e2e/User.Mute.feature.broken similarity index 100% rename from cypress/integration/User.Mute.feature.broken rename to cypress/e2e/User.Mute.feature.broken diff --git a/cypress/integration/User.SettingNotifications.feature b/cypress/e2e/User.SettingNotifications.feature similarity index 100% rename from cypress/integration/User.SettingNotifications.feature rename to cypress/e2e/User.SettingNotifications.feature diff --git a/cypress/integration/UserProfile.Avatar.feature b/cypress/e2e/UserProfile.Avatar.feature similarity index 100% rename from cypress/integration/UserProfile.Avatar.feature rename to cypress/e2e/UserProfile.Avatar.feature diff --git a/cypress/integration/UserProfile.ChangePassword.feature b/cypress/e2e/UserProfile.ChangePassword.feature similarity index 100% rename from cypress/integration/UserProfile.ChangePassword.feature rename to cypress/e2e/UserProfile.ChangePassword.feature diff --git a/cypress/integration/UserProfile.NameDescriptionLocation.feature b/cypress/e2e/UserProfile.NameDescriptionLocation.feature similarity index 100% rename from cypress/integration/UserProfile.NameDescriptionLocation.feature rename to cypress/e2e/UserProfile.NameDescriptionLocation.feature diff --git a/cypress/integration/UserProfile.SocialMedia.feature b/cypress/e2e/UserProfile.SocialMedia.feature similarity index 100% rename from cypress/integration/UserProfile.SocialMedia.feature rename to cypress/e2e/UserProfile.SocialMedia.feature diff --git a/cypress/integration/User.SettingNotifications/I_click_save.js b/cypress/integration/User.SettingNotifications/I_click_save.js deleted file mode 100644 index 32d702f1e..000000000 --- a/cypress/integration/User.SettingNotifications/I_click_save.js +++ /dev/null @@ -1,5 +0,0 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; - -Then("I click save", () => { - cy.get(".save-button").click() -}) \ No newline at end of file diff --git a/cypress/integration/User.SettingNotifications/I_click_the_checkbox_show_donations_progress_bar_and_save.js b/cypress/integration/User.SettingNotifications/I_click_the_checkbox_show_donations_progress_bar_and_save.js deleted file mode 100644 index b4289dd5e..000000000 --- a/cypress/integration/User.SettingNotifications/I_click_the_checkbox_show_donations_progress_bar_and_save.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; - -Then("I click the checkbox show donations progress bar and save", () => { - cy.get("#showDonations").click() - cy.get(".donations-info-button").click() -}) \ No newline at end of file diff --git a/cypress/integration/UserProfile.ChangePassword/I_submit_the_form.js b/cypress/integration/UserProfile.ChangePassword/I_submit_the_form.js deleted file mode 100644 index 18349cff8..000000000 --- a/cypress/integration/UserProfile.ChangePassword/I_submit_the_form.js +++ /dev/null @@ -1,5 +0,0 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; - -When("I submit the form", () => { - cy.get("form").submit(); -}); \ No newline at end of file diff --git a/cypress/integration/common/I_navigate_to_page_{string}.js b/cypress/integration/common/I_navigate_to_page_{string}.js deleted file mode 100644 index aa929c80a..000000000 --- a/cypress/integration/common/I_navigate_to_page_{string}.js +++ /dev/null @@ -1,5 +0,0 @@ -import { Given } from "cypress-cucumber-preprocessor/steps"; - -Given("I navigate to page {string}", page => { - cy.visit(page); -}); \ No newline at end of file diff --git a/cypress/integration/common/I_refresh_the_page.js b/cypress/integration/common/I_refresh_the_page.js deleted file mode 100644 index 1ac655cb4..000000000 --- a/cypress/integration/common/I_refresh_the_page.js +++ /dev/null @@ -1,6 +0,0 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; - -When('I refresh the page', () => { - cy.visit('/') - .reload(); -}); \ No newline at end of file diff --git a/cypress/integration/common/I_wait_for_{int}_milliseconds.js b/cypress/integration/common/I_wait_for_{int}_milliseconds.js deleted file mode 100644 index bc8ef906a..000000000 --- a/cypress/integration/common/I_wait_for_{int}_milliseconds.js +++ /dev/null @@ -1,5 +0,0 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; - -When("I wait for {int} milliseconds", time => { - cy.wait(time) -}); \ No newline at end of file diff --git a/cypress/parallel-features.sh b/cypress/parallel-features.sh index c7d4d4878..24f5bfa9f 100755 --- a/cypress/parallel-features.sh +++ b/cypress/parallel-features.sh @@ -8,10 +8,10 @@ CUR_JOB=$(expr $1 - 1) MAX_JOBS=$2 # Features -FEATURE_LIST=( $(find cypress/integration/ -maxdepth 1 -name "*.feature") ) +FEATURE_LIST=( $(find cypress/e2e/ -maxdepth 1 -name "*.feature") ) # Calculation -MAX_FEATURES=$(find cypress/integration/ -maxdepth 1 -name "*.feature" -print | wc -l) +MAX_FEATURES=$(find cypress/e2e/ -maxdepth 1 -name "*.feature" -print | wc -l) # adds overhead features to the first jobs if [[ $CUR_JOB -lt $(expr ${MAX_FEATURES} % ${MAX_JOBS}) ]] then diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js deleted file mode 100644 index 4e6b440ef..000000000 --- a/cypress/plugins/index.js +++ /dev/null @@ -1,41 +0,0 @@ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - - -const cucumber = require('cypress-cucumber-preprocessor').default -const dotenv = require('dotenv') - -// Import backend .env (smart)? -const { parsed } = dotenv.config({ path: require.resolve('../../backend/.env') }) - -// Test persistent(between commands) store -const testStore = {} - -module.exports = (on, config) => { - config.env.NEO4J_URI = parsed.NEO4J_URI - config.env.NEO4J_USERNAME = parsed.NEO4J_USERNAME - config.env.NEO4J_PASSWORD = parsed.NEO4J_PASSWORD - config.env.JWT_SECRET = parsed.JWT_SECRET - on('file:preprocessor', cucumber()) - on('task', { - pushValue({ name, value }) { - testStore[name] = value - return true - }, - getValue(name) { - console.log("getValue",name,testStore) - return testStore[name] - }, - }) - return config -} \ No newline at end of file diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 7d3738a3d..67d9aadd8 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -15,7 +15,7 @@ /* globals Cypress cy */ import "cypress-file-upload"; import { GraphQLClient, request } from 'graphql-request' -import config from '../../backend/src/config' +import CONFIG from '../../backend/src/config' const authenticatedHeaders = (variables) => { const mutation = ` @@ -24,7 +24,7 @@ const authenticatedHeaders = (variables) => { } ` return new Cypress.Promise((resolve, reject) => { - request(config.GRAPHQL_URI, mutation, variables).then((response) => { + request(CONFIG.GRAPHQL_URI, mutation, variables).then((response) => { resolve({ authorization: `Bearer ${response.login}` }) }) }) @@ -40,7 +40,7 @@ Cypress.Commands.add( ({email, password}) => { return new Cypress.Promise((resolve, reject) => { authenticatedHeaders({ email, password }).then((headers) => { - resolve(new GraphQLClient(config.GRAPHQL_URI, { headers })) + resolve(new GraphQLClient(CONFIG.GRAPHQL_URI, { headers })) }) }) }) diff --git a/cypress/support/index.js b/cypress/support/e2e.js similarity index 100% rename from cypress/support/index.js rename to cypress/support/e2e.js diff --git a/cypress/support/factories.js b/cypress/support/factories.js index 2ca46c483..b08d83526 100644 --- a/cypress/support/factories.js +++ b/cypress/support/factories.js @@ -1,13 +1,7 @@ import Factory from '../../backend/src/db/factories' import { getNeode } from '../../backend/src/db/neo4j' - -const neo4jConfigs = { - uri: Cypress.env('NEO4J_URI'), - username: Cypress.env('NEO4J_USERNAME'), - password: Cypress.env('NEO4J_PASSWORD') -} -const neodeInstance = getNeode(neo4jConfigs) +const neodeInstance = getNeode() beforeEach(() => cy.then(() => neodeInstance.cypher('MATCH (everything) DETACH DELETE everything;'))) @@ -16,7 +10,7 @@ Cypress.Commands.add('neode', () => { }) Cypress.Commands.add( - 'first', + 'firstOf', { prevSubject: true }, (neode, model, properties) => { return neode.first(model, properties) diff --git a/cypress/integration/Admin.DonationInfo/the_donation_info_contains_goal_{string}_and_progress_{string}.js b/cypress/support/step_definitions/Admin.DonationInfo/the_donation_info_contains_goal_{string}_and_progress_{string}.js similarity index 75% rename from cypress/integration/Admin.DonationInfo/the_donation_info_contains_goal_{string}_and_progress_{string}.js rename to cypress/support/step_definitions/Admin.DonationInfo/the_donation_info_contains_goal_{string}_and_progress_{string}.js index cd2473800..454aea44b 100644 --- a/cypress/integration/Admin.DonationInfo/the_donation_info_contains_goal_{string}_and_progress_{string}.js +++ b/cypress/support/step_definitions/Admin.DonationInfo/the_donation_info_contains_goal_{string}_and_progress_{string}.js @@ -1,8 +1,8 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("the donation info contains goal {string} and progress {string}", (goal, progress) => { cy.get('.top-info-bar') .should('contain', goal) cy.get('.top-info-bar') .should('contain', progress) -}); \ No newline at end of file +}); diff --git a/cypress/integration/Admin.DonationInfo/the_donation_info_is_{string}.js b/cypress/support/step_definitions/Admin.DonationInfo/the_donation_info_is_{string}.js similarity index 68% rename from cypress/integration/Admin.DonationInfo/the_donation_info_is_{string}.js rename to cypress/support/step_definitions/Admin.DonationInfo/the_donation_info_is_{string}.js index d259e6520..da231f23a 100644 --- a/cypress/integration/Admin.DonationInfo/the_donation_info_is_{string}.js +++ b/cypress/support/step_definitions/Admin.DonationInfo/the_donation_info_is_{string}.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the donation info is {string}", (visibility) => { cy.get('.top-info-bar') .should(visibility === 'visible' ? 'exist' : 'not.exist') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Admin.PinPost/I_open_the_content_menu_of_post_{string}.js b/cypress/support/step_definitions/Admin.PinPost/I_open_the_content_menu_of_post_{string}.js similarity index 69% rename from cypress/integration/Admin.PinPost/I_open_the_content_menu_of_post_{string}.js rename to cypress/support/step_definitions/Admin.PinPost/I_open_the_content_menu_of_post_{string}.js index a7be22495..2b8d00dc9 100644 --- a/cypress/integration/Admin.PinPost/I_open_the_content_menu_of_post_{string}.js +++ b/cypress/support/step_definitions/Admin.PinPost/I_open_the_content_menu_of_post_{string}.js @@ -1,7 +1,7 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I open the content menu of post {string}", (title) => { cy.contains('.post-teaser', title) .find('.content-menu .base-button') .click() -}) \ No newline at end of file +}) diff --git a/cypress/integration/Admin.PinPost/the_post_with_title_{string}_has_a_ribbon_for_pinned_posts.js b/cypress/support/step_definitions/Admin.PinPost/the_post_with_title_{string}_has_a_ribbon_for_pinned_posts.js similarity index 76% rename from cypress/integration/Admin.PinPost/the_post_with_title_{string}_has_a_ribbon_for_pinned_posts.js rename to cypress/support/step_definitions/Admin.PinPost/the_post_with_title_{string}_has_a_ribbon_for_pinned_posts.js index 1db51d2b0..3e9f43bc3 100644 --- a/cypress/integration/Admin.PinPost/the_post_with_title_{string}_has_a_ribbon_for_pinned_posts.js +++ b/cypress/support/step_definitions/Admin.PinPost/the_post_with_title_{string}_has_a_ribbon_for_pinned_posts.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the post with title {string} has a ribbon for pinned posts", (title) => { cy.get(".post-teaser").contains(title) @@ -6,4 +6,4 @@ Then("the post with title {string} has a ribbon for pinned posts", (title) => { .parent() .find(".ribbon.--pinned") .should("contain", "Announcement") -}) \ No newline at end of file +}) diff --git a/cypress/integration/Admin.PinPost/there_is_no_button_to_pin_a_post.js b/cypress/support/step_definitions/Admin.PinPost/there_is_no_button_to_pin_a_post.js similarity index 72% rename from cypress/integration/Admin.PinPost/there_is_no_button_to_pin_a_post.js rename to cypress/support/step_definitions/Admin.PinPost/there_is_no_button_to_pin_a_post.js index 859b9faf1..70535b920 100644 --- a/cypress/integration/Admin.PinPost/there_is_no_button_to_pin_a_post.js +++ b/cypress/support/step_definitions/Admin.PinPost/there_is_no_button_to_pin_a_post.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("there is no button to pin a post", () => { cy.get("a.ds-menu-item-link") .should('contain', "Report Post") // sanity check .should('not.contain', "Pin post") -}) \ No newline at end of file +}) diff --git a/cypress/integration/Internationalization/I_see_a_button_with_the_label_{string}.js b/cypress/support/step_definitions/Internationalization/I_see_a_button_with_the_label_{string}.js similarity index 57% rename from cypress/integration/Internationalization/I_see_a_button_with_the_label_{string}.js rename to cypress/support/step_definitions/Internationalization/I_see_a_button_with_the_label_{string}.js index a67f9d7df..73a4a5e50 100644 --- a/cypress/integration/Internationalization/I_see_a_button_with_the_label_{string}.js +++ b/cypress/support/step_definitions/Internationalization/I_see_a_button_with_the_label_{string}.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I see a button with the label {string}", label => { cy.contains("button", label); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Internationalization/I_select_{string}_in_the_language_menu.js b/cypress/support/step_definitions/Internationalization/I_select_{string}_in_the_language_menu.js similarity index 71% rename from cypress/integration/Internationalization/I_select_{string}_in_the_language_menu.js rename to cypress/support/step_definitions/Internationalization/I_select_{string}_in_the_language_menu.js index b850a7573..ba89fd3f5 100644 --- a/cypress/integration/Internationalization/I_select_{string}_in_the_language_menu.js +++ b/cypress/support/step_definitions/Internationalization/I_select_{string}_in_the_language_menu.js @@ -1,8 +1,8 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I select {string} in the language menu", language => { cy.get(".locale-menu") .click(); cy.contains(".locale-menu-popover a", language) .click(); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Internationalization/the_whole_user_interface_appears_in_{string}.js b/cypress/support/step_definitions/Internationalization/the_whole_user_interface_appears_in_{string}.js similarity index 66% rename from cypress/integration/Internationalization/the_whole_user_interface_appears_in_{string}.js rename to cypress/support/step_definitions/Internationalization/the_whole_user_interface_appears_in_{string}.js index 4d80b8a0d..d5a8ac95c 100644 --- a/cypress/integration/Internationalization/the_whole_user_interface_appears_in_{string}.js +++ b/cypress/support/step_definitions/Internationalization/the_whole_user_interface_appears_in_{string}.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; -import locales from '../../../webapp/locales' +import { Then } from "@badeball/cypress-cucumber-preprocessor"; +import locales from '../../../../webapp/locales' Then("the whole user interface appears in {string}", language => { const { code } = locales.find((entry) => entry.name === language); cy.get(`html[lang=${code}]`); cy.getCookie("locale").should("have.property", "value", code); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Moderation.HidePost/I_should_see_only_{int}_posts_on_the_newsfeed.js b/cypress/support/step_definitions/Moderation.HidePost/I_should_see_only_{int}_posts_on_the_newsfeed.js similarity index 65% rename from cypress/integration/Moderation.HidePost/I_should_see_only_{int}_posts_on_the_newsfeed.js rename to cypress/support/step_definitions/Moderation.HidePost/I_should_see_only_{int}_posts_on_the_newsfeed.js index 611365bb0..26221ae66 100644 --- a/cypress/integration/Moderation.HidePost/I_should_see_only_{int}_posts_on_the_newsfeed.js +++ b/cypress/support/step_definitions/Moderation.HidePost/I_should_see_only_{int}_posts_on_the_newsfeed.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see only {int} posts on the newsfeed", posts => { cy.get(".post-teaser") .should("have.length", posts); }); - \ No newline at end of file + diff --git a/cypress/integration/Moderation.HidePost/the_page_{string}_returns_a_404_error_with_a_message.js b/cypress/support/step_definitions/Moderation.HidePost/the_page_{string}_returns_a_404_error_with_a_message.js similarity index 81% rename from cypress/integration/Moderation.HidePost/the_page_{string}_returns_a_404_error_with_a_message.js rename to cypress/support/step_definitions/Moderation.HidePost/the_page_{string}_returns_a_404_error_with_a_message.js index 6d9cfb2ef..538e8a64d 100644 --- a/cypress/integration/Moderation.HidePost/the_page_{string}_returns_a_404_error_with_a_message.js +++ b/cypress/support/step_definitions/Moderation.HidePost/the_page_{string}_returns_a_404_error_with_a_message.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the page {string} returns a 404 error with a message:", (route, message) => { cy.request({ @@ -11,4 +11,4 @@ Then("the page {string} returns a 404 error with a message:", (route, message) = failOnStatusCode: false }); cy.get(".error-message").should("contain", message); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Moderation.ReportContent/I_can_t_see_the_moderation_menu_item.js b/cypress/support/step_definitions/Moderation.ReportContent/I_can_t_see_the_moderation_menu_item.js similarity index 81% rename from cypress/integration/Moderation.ReportContent/I_can_t_see_the_moderation_menu_item.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_can_t_see_the_moderation_menu_item.js index 96706281a..fcb1cb686 100644 --- a/cypress/integration/Moderation.ReportContent/I_can_t_see_the_moderation_menu_item.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_can_t_see_the_moderation_menu_item.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then(`I can't see the moderation menu item`, () => { cy.get('.avatar-menu-popover') @@ -8,4 +8,4 @@ Then(`I can't see the moderation menu item`, () => { cy.get('.avatar-menu-popover') .find('a[href="/moderation"]', 'Moderation') .should('not.exist') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/I_can_visit_the_post_page.js b/cypress/support/step_definitions/Moderation.ReportContent/I_can_visit_the_post_page.js similarity index 74% rename from cypress/integration/Moderation.ReportContent/I_can_visit_the_post_page.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_can_visit_the_post_page.js index 8ca69da50..ce846c39a 100644 --- a/cypress/integration/Moderation.ReportContent/I_can_visit_the_post_page.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_can_visit_the_post_page.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I can visit the post page', () => { cy.contains('Fake news').click() cy.location('pathname').should('contain', '/post') .get('.base-card .title').should('contain', 'Fake news') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js similarity index 74% rename from cypress/integration/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js index 30682b009..8588e156a 100644 --- a/cypress/integration/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js @@ -1,11 +1,11 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I click on "Report Post" from the content menu of the post', () => { cy.contains('.base-card', 'The Truth about the Holocaust') .find('.content-menu .base-button') - .click({force: true}) + .click() cy.get('.popover .ds-menu-item-link') .contains('Report Post') .click() -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/I_click_on_the_author.js b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js similarity index 66% rename from cypress/integration/Moderation.ReportContent/I_click_on_the_author.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js index fad21e1a6..049eb8e72 100644 --- a/cypress/integration/Moderation.ReportContent/I_click_on_the_author.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js @@ -1,7 +1,7 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I click on the author', () => { cy.get('[data-test="avatarUserLink"]') .click() .url().should('include', '/profile/') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/I_click_on_the_avatar_menu_in_the_top_right_corner.js b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_avatar_menu_in_the_top_right_corner.js similarity index 60% rename from cypress/integration/Moderation.ReportContent/I_click_on_the_avatar_menu_in_the_top_right_corner.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_avatar_menu_in_the_top_right_corner.js index 27830b239..b23ba1912 100644 --- a/cypress/integration/Moderation.ReportContent/I_click_on_the_avatar_menu_in_the_top_right_corner.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_avatar_menu_in_the_top_right_corner.js @@ -1,5 +1,5 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I click on the avatar menu in the top right corner", () => { cy.get(".avatar-menu").click(); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Moderation.ReportContent/I_confirm_the_reporting_dialog.js b/cypress/support/step_definitions/Moderation.ReportContent/I_confirm_the_reporting_dialog.js similarity index 83% rename from cypress/integration/Moderation.ReportContent/I_confirm_the_reporting_dialog.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_confirm_the_reporting_dialog.js index 4009fa4e8..970c61c00 100644 --- a/cypress/integration/Moderation.ReportContent/I_confirm_the_reporting_dialog.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_confirm_the_reporting_dialog.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When(/^I confirm the reporting dialog .*:$/, message => { cy.contains(message) // wait for element to become visible @@ -13,4 +13,4 @@ When(/^I confirm the reporting dialog .*:$/, message => { .contains('Report') .click() }) -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/I_see_all_the_reported_posts_including_from_the_user_who_muted_me.js b/cypress/support/step_definitions/Moderation.ReportContent/I_see_all_the_reported_posts_including_from_the_user_who_muted_me.js similarity index 70% rename from cypress/integration/Moderation.ReportContent/I_see_all_the_reported_posts_including_from_the_user_who_muted_me.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_see_all_the_reported_posts_including_from_the_user_who_muted_me.js index 522cd6c78..8989ecf68 100644 --- a/cypress/integration/Moderation.ReportContent/I_see_all_the_reported_posts_including_from_the_user_who_muted_me.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_see_all_the_reported_posts_including_from_the_user_who_muted_me.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I see all the reported posts including from the user who muted me', () => { cy.get('table tbody').within(() => { cy.contains('tr', 'Fake news') }) -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/I_see_all_the_reported_posts_including_the_one_from_above.js b/cypress/support/step_definitions/Moderation.ReportContent/I_see_all_the_reported_posts_including_the_one_from_above.js similarity index 72% rename from cypress/integration/Moderation.ReportContent/I_see_all_the_reported_posts_including_the_one_from_above.js rename to cypress/support/step_definitions/Moderation.ReportContent/I_see_all_the_reported_posts_including_the_one_from_above.js index 66c9baf61..849f7f1a9 100644 --- a/cypress/integration/Moderation.ReportContent/I_see_all_the_reported_posts_including_the_one_from_above.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_see_all_the_reported_posts_including_the_one_from_above.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I see all the reported posts including the one from above', () => { cy.get('table tbody').within(() => { cy.contains('tr', 'The Truth about the Holocaust') }) -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/each_list_item_links_to_the_post_page.js b/cypress/support/step_definitions/Moderation.ReportContent/each_list_item_links_to_the_post_page.js similarity index 70% rename from cypress/integration/Moderation.ReportContent/each_list_item_links_to_the_post_page.js rename to cypress/support/step_definitions/Moderation.ReportContent/each_list_item_links_to_the_post_page.js index 9ce69d6de..e174113fc 100644 --- a/cypress/integration/Moderation.ReportContent/each_list_item_links_to_the_post_page.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/each_list_item_links_to_the_post_page.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('each list item links to the post page', () => { cy.contains('The Truth about the Holocaust').click(); cy.location('pathname').should('contain', '/post') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Moderation.ReportContent/somebody_reported_the_following_posts.js b/cypress/support/step_definitions/Moderation.ReportContent/somebody_reported_the_following_posts.js similarity index 91% rename from cypress/integration/Moderation.ReportContent/somebody_reported_the_following_posts.js rename to cypress/support/step_definitions/Moderation.ReportContent/somebody_reported_the_following_posts.js index 3ca39e6e6..8add75ba5 100644 --- a/cypress/integration/Moderation.ReportContent/somebody_reported_the_following_posts.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/somebody_reported_the_following_posts.js @@ -1,4 +1,4 @@ -import { Given } from "cypress-cucumber-preprocessor/steps"; +import { Given } from "@badeball/cypress-cucumber-preprocessor"; Given('somebody reported the following posts:', table => { table.hashes().forEach(({ submitterEmail, resourceId, reasonCategory, reasonDescription }) => { diff --git a/cypress/integration/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js b/cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js similarity index 65% rename from cypress/integration/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js rename to cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js index 8d475ee43..8d61afd61 100644 --- a/cypress/integration/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js @@ -1,13 +1,15 @@ +import { Given } from "@badeball/cypress-cucumber-preprocessor"; + Given("there is an annoying user who has muted me", () => { cy.neode() - .first("User", { + .firstOf("User", { role: 'moderator' }) .then(mutedUser => { cy.neode() - .first("User", { + .firstOf("User", { id: 'user' }) .relateTo(mutedUser, "muted"); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Notification.Mention/I_start_to_write_a_new_post_with_the_title_{string}_beginning_with.js b/cypress/support/step_definitions/Notification.Mention/I_start_to_write_a_new_post_with_the_title_{string}_beginning_with.js similarity index 73% rename from cypress/integration/Notification.Mention/I_start_to_write_a_new_post_with_the_title_{string}_beginning_with.js rename to cypress/support/step_definitions/Notification.Mention/I_start_to_write_a_new_post_with_the_title_{string}_beginning_with.js index fde5042c1..b8e705c82 100644 --- a/cypress/integration/Notification.Mention/I_start_to_write_a_new_post_with_the_title_{string}_beginning_with.js +++ b/cypress/support/step_definitions/Notification.Mention/I_start_to_write_a_new_post_with_the_title_{string}_beginning_with.js @@ -1,8 +1,8 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I start to write a new post with the title {string} beginning with:", (title, intro) => { cy.get('input[name="title"]') .type(title); cy.get(".ProseMirror") .type(intro); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Notification.Mention/mention_{string}_in_the_text.js b/cypress/support/step_definitions/Notification.Mention/mention_{string}_in_the_text.js similarity index 70% rename from cypress/integration/Notification.Mention/mention_{string}_in_the_text.js rename to cypress/support/step_definitions/Notification.Mention/mention_{string}_in_the_text.js index fa8a29d4a..e1bd19da0 100644 --- a/cypress/integration/Notification.Mention/mention_{string}_in_the_text.js +++ b/cypress/support/step_definitions/Notification.Mention/mention_{string}_in_the_text.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("mention {string} in the text", mention => { cy.get(".ProseMirror") @@ -6,4 +6,4 @@ When("mention {string} in the text", mention => { cy.get(".suggestion-list__item") .contains(mention) .click(); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Notification.Mention/open_the_notification_menu_and_click_on_the_first_item.js b/cypress/support/step_definitions/Notification.Mention/open_the_notification_menu_and_click_on_the_first_item.js similarity index 79% rename from cypress/integration/Notification.Mention/open_the_notification_menu_and_click_on_the_first_item.js rename to cypress/support/step_definitions/Notification.Mention/open_the_notification_menu_and_click_on_the_first_item.js index 0d3917f38..0143d1ac5 100644 --- a/cypress/integration/Notification.Mention/open_the_notification_menu_and_click_on_the_first_item.js +++ b/cypress/support/step_definitions/Notification.Mention/open_the_notification_menu_and_click_on_the_first_item.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("open the notification menu and click on the first item", () => { cy.get(".notifications-menu") @@ -7,4 +7,4 @@ When("open the notification menu and click on the first item", () => { cy.get(".notification .link") .first() .click({force: true}); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Notification.Mention/see_{int}_unread_notifications_in_the_top_menu.js b/cypress/support/step_definitions/Notification.Mention/see_{int}_unread_notifications_in_the_top_menu.js similarity index 65% rename from cypress/integration/Notification.Mention/see_{int}_unread_notifications_in_the_top_menu.js rename to cypress/support/step_definitions/Notification.Mention/see_{int}_unread_notifications_in_the_top_menu.js index 124b61873..ae1644cef 100644 --- a/cypress/integration/Notification.Mention/see_{int}_unread_notifications_in_the_top_menu.js +++ b/cypress/support/step_definitions/Notification.Mention/see_{int}_unread_notifications_in_the_top_menu.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("see {int} unread notifications in the top menu", count => { cy.get(".notifications-menu") .should("contain", count); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Notification.Mention/the_notification_menu_button_links_to_the_all_notifications_page.js b/cypress/support/step_definitions/Notification.Mention/the_notification_menu_button_links_to_the_all_notifications_page.js similarity index 74% rename from cypress/integration/Notification.Mention/the_notification_menu_button_links_to_the_all_notifications_page.js rename to cypress/support/step_definitions/Notification.Mention/the_notification_menu_button_links_to_the_all_notifications_page.js index e40827a16..a7204978e 100644 --- a/cypress/integration/Notification.Mention/the_notification_menu_button_links_to_the_all_notifications_page.js +++ b/cypress/support/step_definitions/Notification.Mention/the_notification_menu_button_links_to_the_all_notifications_page.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the notification menu button links to the all notifications page", () => { cy.get(".notifications-menu") .click(); cy.location("pathname") .should("contain", "/notifications"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Notification.Mention/the_unread_counter_is_removed.js b/cypress/support/step_definitions/Notification.Mention/the_unread_counter_is_removed.js similarity index 63% rename from cypress/integration/Notification.Mention/the_unread_counter_is_removed.js rename to cypress/support/step_definitions/Notification.Mention/the_unread_counter_is_removed.js index 3859103e8..6c7ff96f0 100644 --- a/cypress/integration/Notification.Mention/the_unread_counter_is_removed.js +++ b/cypress/support/step_definitions/Notification.Mention/the_unread_counter_is_removed.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the unread counter is removed", () => { cy.get('.notifications-menu .counter-icon') .should('not.exist'); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/I_comment_the_following.js b/cypress/support/step_definitions/Post.Comment/I_comment_the_following.js similarity index 75% rename from cypress/integration/Post.Comment/I_comment_the_following.js rename to cypress/support/step_definitions/Post.Comment/I_comment_the_following.js index 0f5a5049c..5a64ded50 100644 --- a/cypress/integration/Post.Comment/I_comment_the_following.js +++ b/cypress/support/step_definitions/Post.Comment/I_comment_the_following.js @@ -1,7 +1,7 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I comment the following:", async text => { const comment = text.replace("\n", " ") cy.task('pushValue', { name: 'lastComment', value: comment }) cy.get(".editor .ProseMirror").type(comment); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/I_should_see_an_abbreviated_version_of_my_comment.js b/cypress/support/step_definitions/Post.Comment/I_should_see_an_abbreviated_version_of_my_comment.js similarity index 66% rename from cypress/integration/Post.Comment/I_should_see_an_abbreviated_version_of_my_comment.js rename to cypress/support/step_definitions/Post.Comment/I_should_see_an_abbreviated_version_of_my_comment.js index d0b7940f0..67dc9bef8 100644 --- a/cypress/integration/Post.Comment/I_should_see_an_abbreviated_version_of_my_comment.js +++ b/cypress/support/step_definitions/Post.Comment/I_should_see_an_abbreviated_version_of_my_comment.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see an abbreviated version of my comment", () => { cy.get("article.comment-card") .should("contain", "show more") -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/I_should_see_my_comment.js b/cypress/support/step_definitions/Post.Comment/I_should_see_my_comment.js similarity index 85% rename from cypress/integration/Post.Comment/I_should_see_my_comment.js rename to cypress/support/step_definitions/Post.Comment/I_should_see_my_comment.js index 8d439b112..7b30ee82d 100644 --- a/cypress/integration/Post.Comment/I_should_see_my_comment.js +++ b/cypress/support/step_definitions/Post.Comment/I_should_see_my_comment.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see my comment", () => { cy.get("article.comment-card p") @@ -10,4 +10,4 @@ Then("I should see my comment", () => { .and("contain", 'https://') // some url .get(".user-teaser > .info > .text") .should("contain", "today at"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/I_should_see_the_entirety_of_my_comment.js b/cypress/support/step_definitions/Post.Comment/I_should_see_the_entirety_of_my_comment.js similarity index 65% rename from cypress/integration/Post.Comment/I_should_see_the_entirety_of_my_comment.js rename to cypress/support/step_definitions/Post.Comment/I_should_see_the_entirety_of_my_comment.js index a903fa4d0..9ea48fa05 100644 --- a/cypress/integration/Post.Comment/I_should_see_the_entirety_of_my_comment.js +++ b/cypress/support/step_definitions/Post.Comment/I_should_see_the_entirety_of_my_comment.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see the entirety of my comment", () => { cy.get("article.comment-card") .should("not.contain", "show more") -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/I_type_in_a_comment_with_{int}_characters.js b/cypress/support/step_definitions/Post.Comment/I_type_in_a_comment_with_{int}_characters.js similarity index 71% rename from cypress/integration/Post.Comment/I_type_in_a_comment_with_{int}_characters.js rename to cypress/support/step_definitions/Post.Comment/I_type_in_a_comment_with_{int}_characters.js index 1522c0e64..ef39bdbf4 100644 --- a/cypress/integration/Post.Comment/I_type_in_a_comment_with_{int}_characters.js +++ b/cypress/support/step_definitions/Post.Comment/I_type_in_a_comment_with_{int}_characters.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I type in a comment with {int} characters", size => { var c=""; @@ -6,4 +6,4 @@ When("I type in a comment with {int} characters", size => { c += "c" } cy.get(".editor .ProseMirror").type(c); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/it_should_create_a_mention_in_the_CommentForm.js b/cypress/support/step_definitions/Post.Comment/it_should_create_a_mention_in_the_CommentForm.js similarity index 70% rename from cypress/integration/Post.Comment/it_should_create_a_mention_in_the_CommentForm.js rename to cypress/support/step_definitions/Post.Comment/it_should_create_a_mention_in_the_CommentForm.js index 3468badad..0e52e0f7a 100644 --- a/cypress/integration/Post.Comment/it_should_create_a_mention_in_the_CommentForm.js +++ b/cypress/support/step_definitions/Post.Comment/it_should_create_a_mention_in_the_CommentForm.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("it should create a mention in the CommentForm", () => { cy.get(".ProseMirror a") .should('have.class', 'mention') .should('contain', '@peter-pan') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Post.Comment/my_comment_should_be_successfully_created.js b/cypress/support/step_definitions/Post.Comment/my_comment_should_be_successfully_created.js similarity index 64% rename from cypress/integration/Post.Comment/my_comment_should_be_successfully_created.js rename to cypress/support/step_definitions/Post.Comment/my_comment_should_be_successfully_created.js index 766106ddf..acb94f216 100644 --- a/cypress/integration/Post.Comment/my_comment_should_be_successfully_created.js +++ b/cypress/support/step_definitions/Post.Comment/my_comment_should_be_successfully_created.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("my comment should be successfully created", () => { cy.get(".iziToast-message").contains("Comment submitted!"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Comment/the_editor_should_be_cleared.js b/cypress/support/step_definitions/Post.Comment/the_editor_should_be_cleared.js similarity index 61% rename from cypress/integration/Post.Comment/the_editor_should_be_cleared.js rename to cypress/support/step_definitions/Post.Comment/the_editor_should_be_cleared.js index 579fc2ca9..f6e47313a 100644 --- a/cypress/integration/Post.Comment/the_editor_should_be_cleared.js +++ b/cypress/support/step_definitions/Post.Comment/the_editor_should_be_cleared.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the editor should be cleared", () => { cy.get(".ProseMirror p").should("have.class", "is-empty"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Create/I_choose_{string}_as_the_title.js b/cypress/support/step_definitions/Post.Create/I_choose_{string}_as_the_title.js similarity index 77% rename from cypress/integration/Post.Create/I_choose_{string}_as_the_title.js rename to cypress/support/step_definitions/Post.Create/I_choose_{string}_as_the_title.js index 9fbf8e58f..a5a292a0c 100644 --- a/cypress/integration/Post.Create/I_choose_{string}_as_the_title.js +++ b/cypress/support/step_definitions/Post.Create/I_choose_{string}_as_the_title.js @@ -1,8 +1,8 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I choose {string} as the title", async title => { const lastPost = {} lastPost.title = title.replace("\n", " "); cy.task('pushValue', { name: 'lastPost', value: lastPost }) cy.get('input[name="title"]').type(lastPost.title); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Create/the_post_was_saved_successfully.js b/cypress/support/step_definitions/Post.Create/the_post_was_saved_successfully.js similarity index 78% rename from cypress/integration/Post.Create/the_post_was_saved_successfully.js rename to cypress/support/step_definitions/Post.Create/the_post_was_saved_successfully.js index eec2f819b..987e477d4 100644 --- a/cypress/integration/Post.Create/the_post_was_saved_successfully.js +++ b/cypress/support/step_definitions/Post.Create/the_post_was_saved_successfully.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the post was saved successfully", async () => { cy.task('getValue', 'lastPost').then(lastPost => { cy.get(".base-card > .title").should("contain", lastPost.title); cy.get(".content").should("contain", lastPost.content); }) -}); \ No newline at end of file +}); diff --git a/cypress/integration/Post.Images/I_add_all_required_fields.js b/cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js similarity index 69% rename from cypress/integration/Post.Images/I_add_all_required_fields.js rename to cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js index 52a95ab52..ce2e88a83 100644 --- a/cypress/integration/Post.Images/I_add_all_required_fields.js +++ b/cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I add all required fields", () => { cy.get('input[name="title"]') .type('new post') .get(".editor .ProseMirror") .type('new post content') - }) \ No newline at end of file + }) diff --git a/cypress/integration/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js b/cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js similarity index 93% rename from cypress/integration/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js rename to cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js index ce5b54f25..019cc956a 100644 --- a/cypress/integration/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js +++ b/cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should be able to {string} a teaser image", condition => { // cy.reload() @@ -27,4 +27,4 @@ Then("I should be able to {string} a teaser image", condition => { break; } -}) \ No newline at end of file +}) diff --git a/cypress/integration/Post.Images/my_post_has_a_teaser_image.js b/cypress/support/step_definitions/Post.Images/my_post_has_a_teaser_image.js similarity index 66% rename from cypress/integration/Post.Images/my_post_has_a_teaser_image.js rename to cypress/support/step_definitions/Post.Images/my_post_has_a_teaser_image.js index 66ff3c31d..b9ce4b3c7 100644 --- a/cypress/integration/Post.Images/my_post_has_a_teaser_image.js +++ b/cypress/support/step_definitions/Post.Images/my_post_has_a_teaser_image.js @@ -1,7 +1,7 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('my post has a teaser image', () => { cy.get('.contribution-form .image') .should('exist') .and('have.attr', 'src') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Post.Images/the_first_image_should_not_be_displayed_anymore.js b/cypress/support/step_definitions/Post.Images/the_first_image_should_not_be_displayed_anymore.js similarity index 74% rename from cypress/integration/Post.Images/the_first_image_should_not_be_displayed_anymore.js rename to cypress/support/step_definitions/Post.Images/the_first_image_should_not_be_displayed_anymore.js index 867c97fdf..6388f4458 100644 --- a/cypress/integration/Post.Images/the_first_image_should_not_be_displayed_anymore.js +++ b/cypress/support/step_definitions/Post.Images/the_first_image_should_not_be_displayed_anymore.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the first image should not be displayed anymore", () => { cy.get(".hero-image") @@ -6,4 +6,4 @@ Then("the first image should not be displayed anymore", () => { .get('.hero-image > .image') .should('have.length', 1) .and('have.attr', 'src') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Post.Images/the_post_was_saved_successfully_with_the_{string}_teaser_image.js b/cypress/support/step_definitions/Post.Images/the_post_was_saved_successfully_with_the_{string}_teaser_image.js similarity index 87% rename from cypress/integration/Post.Images/the_post_was_saved_successfully_with_the_{string}_teaser_image.js rename to cypress/support/step_definitions/Post.Images/the_post_was_saved_successfully_with_the_{string}_teaser_image.js index ece83d878..c0571068e 100644 --- a/cypress/integration/Post.Images/the_post_was_saved_successfully_with_the_{string}_teaser_image.js +++ b/cypress/support/step_definitions/Post.Images/the_post_was_saved_successfully_with_the_{string}_teaser_image.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the post was saved successfully with the {string} teaser image", condition => { cy.get(".base-card > .title") @@ -8,4 +8,4 @@ Then("the post was saved successfully with the {string} teaser image", condition .get('.post-page img') .should("have.attr", "src") .and("contains", condition === 'updated' ? 'humanconnection' : 'onourjourney') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Post.Images/the_{string}_post_was_saved_successfully_without_a_teaser_image.js b/cypress/support/step_definitions/Post.Images/the_{string}_post_was_saved_successfully_without_a_teaser_image.js similarity index 86% rename from cypress/integration/Post.Images/the_{string}_post_was_saved_successfully_without_a_teaser_image.js rename to cypress/support/step_definitions/Post.Images/the_{string}_post_was_saved_successfully_without_a_teaser_image.js index abafcf0cc..40245df2b 100644 --- a/cypress/integration/Post.Images/the_{string}_post_was_saved_successfully_without_a_teaser_image.js +++ b/cypress/support/step_definitions/Post.Images/the_{string}_post_was_saved_successfully_without_a_teaser_image.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('the {string} post was saved successfully without a teaser image', condition => { cy.get(".base-card > .title") @@ -9,4 +9,4 @@ Then('the {string} post was saved successfully without a teaser image', conditio .should('exist') .get('.hero-image > .image') .should('not.exist') -}) \ No newline at end of file +}) diff --git a/cypress/integration/Post/the_post_shows_up_on_the_newsfeed_at_position_{int}.js b/cypress/support/step_definitions/Post/the_post_shows_up_on_the_newsfeed_at_position_{int}.js similarity index 79% rename from cypress/integration/Post/the_post_shows_up_on_the_newsfeed_at_position_{int}.js rename to cypress/support/step_definitions/Post/the_post_shows_up_on_the_newsfeed_at_position_{int}.js index 3b42ea58e..f10896a33 100644 --- a/cypress/integration/Post/the_post_shows_up_on_the_newsfeed_at_position_{int}.js +++ b/cypress/support/step_definitions/Post/the_post_shows_up_on_the_newsfeed_at_position_{int}.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the post shows up on the newsfeed at position {int}", index => { const selector = `.post-teaser:nth-child(${index}) > .base-card`; cy.get(selector).should("contain", 'previously created post'); cy.get(selector).should("contain", 'with some content'); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_select_a_post_entry.js b/cypress/support/step_definitions/Search/I_select_a_post_entry.js similarity index 63% rename from cypress/integration/Search/I_select_a_post_entry.js rename to cypress/support/step_definitions/Search/I_select_a_post_entry.js index 25611f91e..26e673499 100644 --- a/cypress/integration/Search/I_select_a_post_entry.js +++ b/cypress/support/step_definitions/Search/I_select_a_post_entry.js @@ -1,7 +1,7 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I select a post entry", () => { cy.get(".searchable-input .search-post") .first() .trigger("click"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_select_a_user_entry.js b/cypress/support/step_definitions/Search/I_select_a_user_entry.js similarity index 63% rename from cypress/integration/Search/I_select_a_user_entry.js rename to cypress/support/step_definitions/Search/I_select_a_user_entry.js index b7222b2fb..3d186ffd8 100644 --- a/cypress/integration/Search/I_select_a_user_entry.js +++ b/cypress/support/step_definitions/Search/I_select_a_user_entry.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I select a user entry", () => { cy.get(".searchable-input .user-teaser") .first() .trigger("click"); -}) \ No newline at end of file +}) diff --git a/cypress/integration/Search/I_should_have_one_item_in_the_select_dropdown.js b/cypress/support/step_definitions/Search/I_should_have_one_item_in_the_select_dropdown.js similarity index 71% rename from cypress/integration/Search/I_should_have_one_item_in_the_select_dropdown.js rename to cypress/support/step_definitions/Search/I_should_have_one_item_in_the_select_dropdown.js index 7e5188ab6..148bb8195 100644 --- a/cypress/integration/Search/I_should_have_one_item_in_the_select_dropdown.js +++ b/cypress/support/step_definitions/Search/I_should_have_one_item_in_the_select_dropdown.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should have one item in the select dropdown", () => { cy.get(".searchable-input .ds-select-dropdown").should($li => { expect($li).to.have.length(1); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_should_not_see_posts_without_the_searched-for_term_in_the_select_dropdown.js b/cypress/support/step_definitions/Search/I_should_not_see_posts_without_the_searched-for_term_in_the_select_dropdown.js similarity index 72% rename from cypress/integration/Search/I_should_not_see_posts_without_the_searched-for_term_in_the_select_dropdown.js rename to cypress/support/step_definitions/Search/I_should_not_see_posts_without_the_searched-for_term_in_the_select_dropdown.js index a76ed6a5d..d2a2bc1df 100644 --- a/cypress/integration/Search/I_should_not_see_posts_without_the_searched-for_term_in_the_select_dropdown.js +++ b/cypress/support/step_definitions/Search/I_should_not_see_posts_without_the_searched-for_term_in_the_select_dropdown.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should not see posts without the searched-for term in the select dropdown", () => { cy.get(".ds-select-dropdown") .should("not.contain","No searched for content"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_should_see_posts_with_the_searched-for_term_in_the_select_dropdown.js b/cypress/support/step_definitions/Search/I_should_see_posts_with_the_searched-for_term_in_the_select_dropdown.js similarity index 73% rename from cypress/integration/Search/I_should_see_posts_with_the_searched-for_term_in_the_select_dropdown.js rename to cypress/support/step_definitions/Search/I_should_see_posts_with_the_searched-for_term_in_the_select_dropdown.js index ce755abb0..41c132dea 100644 --- a/cypress/integration/Search/I_should_see_posts_with_the_searched-for_term_in_the_select_dropdown.js +++ b/cypress/support/step_definitions/Search/I_should_see_posts_with_the_searched-for_term_in_the_select_dropdown.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see posts with the searched-for term in the select dropdown", () => { cy.get(".ds-select-dropdown") .should("contain","101 Essays that will change the way you think"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_should_see_the_following_posts_on_the_search_results_page.js b/cypress/support/step_definitions/Search/I_should_see_the_following_posts_on_the_search_results_page.js similarity index 73% rename from cypress/integration/Search/I_should_see_the_following_posts_on_the_search_results_page.js rename to cypress/support/step_definitions/Search/I_should_see_the_following_posts_on_the_search_results_page.js index f703a04f5..3e5da72f7 100644 --- a/cypress/integration/Search/I_should_see_the_following_posts_on_the_search_results_page.js +++ b/cypress/support/step_definitions/Search/I_should_see_the_following_posts_on_the_search_results_page.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see the following posts on the search results page:", table => { table.hashes().forEach(({ title }) => { cy.get(".post-teaser") .should("contain",title) }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_should_see_the_following_users_in_the_select_dropdown.js b/cypress/support/step_definitions/Search/I_should_see_the_following_users_in_the_select_dropdown.js similarity index 77% rename from cypress/integration/Search/I_should_see_the_following_users_in_the_select_dropdown.js rename to cypress/support/step_definitions/Search/I_should_see_the_following_users_in_the_select_dropdown.js index 3e5e14043..830e19a8d 100644 --- a/cypress/integration/Search/I_should_see_the_following_users_in_the_select_dropdown.js +++ b/cypress/support/step_definitions/Search/I_should_see_the_following_users_in_the_select_dropdown.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see the following users in the select dropdown:", table => { cy.get(".search-heading").should("contain", "Users"); table.hashes().forEach(({ slug }) => { cy.get(".ds-select-dropdown").should("contain", slug); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_type_{string}_and_press_Enter.js b/cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js similarity index 71% rename from cypress/integration/Search/I_type_{string}_and_press_Enter.js rename to cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js index 1a0fc6d42..796820ba0 100644 --- a/cypress/integration/Search/I_type_{string}_and_press_Enter.js +++ b/cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js @@ -1,8 +1,8 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I type {string} and press Enter", value => { cy.get(".searchable-input .ds-select input") .focus() .type(value) .type("{enter}", { force: true }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/I_type_{string}_and_press_escape.js b/cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js similarity index 68% rename from cypress/integration/Search/I_type_{string}_and_press_escape.js rename to cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js index a3cde6cda..3e2e67be8 100644 --- a/cypress/integration/Search/I_type_{string}_and_press_escape.js +++ b/cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js @@ -1,8 +1,8 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I type {string} and press escape", value => { cy.get(".searchable-input .ds-select input") .focus() .type(value) .type("{esc}"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/the_search_field_should_clear.js b/cypress/support/step_definitions/Search/the_search_field_should_clear.js similarity index 64% rename from cypress/integration/Search/the_search_field_should_clear.js rename to cypress/support/step_definitions/Search/the_search_field_should_clear.js index f571cdbd4..10f73959f 100644 --- a/cypress/integration/Search/the_search_field_should_clear.js +++ b/cypress/support/step_definitions/Search/the_search_field_should_clear.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the search field should clear", () => { cy.get(".searchable-input .ds-select input") .should("have.text", ""); -}); \ No newline at end of file +}); diff --git a/cypress/integration/Search/the_search_parameter_equals_{string}.js b/cypress/support/step_definitions/Search/the_search_parameter_equals_{string}.js similarity index 61% rename from cypress/integration/Search/the_search_parameter_equals_{string}.js rename to cypress/support/step_definitions/Search/the_search_parameter_equals_{string}.js index b8473584c..0f433cf1f 100644 --- a/cypress/integration/Search/the_search_parameter_equals_{string}.js +++ b/cypress/support/step_definitions/Search/the_search_parameter_equals_{string}.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the search parameter equals {string}", search => { cy.location("search") .should("eq", search); -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.Authentication/I_am_logged_in_with_username_{string}.js b/cypress/support/step_definitions/User.Authentication/I_am_logged_in_with_username_{string}.js similarity index 74% rename from cypress/integration/User.Authentication/I_am_logged_in_with_username_{string}.js rename to cypress/support/step_definitions/User.Authentication/I_am_logged_in_with_username_{string}.js index 4383282bd..d4af04ff6 100644 --- a/cypress/integration/User.Authentication/I_am_logged_in_with_username_{string}.js +++ b/cypress/support/step_definitions/User.Authentication/I_am_logged_in_with_username_{string}.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I am logged in with username {string}", name => { cy.get(".avatar-menu").click(); cy.get(".avatar-menu-popover").contains(name); cy.get(".avatar-menu").click(); // Close menu again -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.Block/I_block_the_user_{string}.js b/cypress/support/step_definitions/User.Block/I_block_the_user_{string}.js similarity index 50% rename from cypress/integration/User.Block/I_block_the_user_{string}.js rename to cypress/support/step_definitions/User.Block/I_block_the_user_{string}.js index cde1d96b9..be82f00d9 100644 --- a/cypress/integration/User.Block/I_block_the_user_{string}.js +++ b/cypress/support/step_definitions/User.Block/I_block_the_user_{string}.js @@ -1,11 +1,11 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I block the user {string}", name => { cy.neode() - .first("User", { name }) + .firstOf("User", { name }) .then(blockedUser => { cy.neode() - .first("User", {id: "id-of-peter-pan"}) + .firstOf("User", {id: "id-of-peter-pan"}) .relateTo(blockedUser, "blocked"); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.Block/I_should_not_see_{string}_button.js b/cypress/support/step_definitions/User.Block/I_should_not_see_{string}_button.js similarity index 64% rename from cypress/integration/User.Block/I_should_not_see_{string}_button.js rename to cypress/support/step_definitions/User.Block/I_should_not_see_{string}_button.js index 5bf0b7a68..791a5aaaf 100644 --- a/cypress/integration/User.Block/I_should_not_see_{string}_button.js +++ b/cypress/support/step_definitions/User.Block/I_should_not_see_{string}_button.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I should not see {string} button', button => { cy.get('.base-card .action-buttons') .should('have.length', 1) -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Block/I_should_see_no_users_in_my_blocked_users_list.js b/cypress/support/step_definitions/User.Block/I_should_see_no_users_in_my_blocked_users_list.js similarity index 69% rename from cypress/integration/User.Block/I_should_see_no_users_in_my_blocked_users_list.js rename to cypress/support/step_definitions/User.Block/I_should_see_no_users_in_my_blocked_users_list.js index 11161ef2f..3e4813fbc 100644 --- a/cypress/integration/User.Block/I_should_see_no_users_in_my_blocked_users_list.js +++ b/cypress/support/step_definitions/User.Block/I_should_see_no_users_in_my_blocked_users_list.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see no users in my blocked users list", () => { cy.get('.ds-placeholder') .should('contain', "So far, you have not blocked anybody.") -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Block/I_should_see_the_{string}_button.js b/cypress/support/step_definitions/User.Block/I_should_see_the_{string}_button.js similarity index 67% rename from cypress/integration/User.Block/I_should_see_the_{string}_button.js rename to cypress/support/step_definitions/User.Block/I_should_see_the_{string}_button.js index 373800870..7e6b7eacb 100644 --- a/cypress/integration/User.Block/I_should_see_the_{string}_button.js +++ b/cypress/support/step_definitions/User.Block/I_should_see_the_{string}_button.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I should see the {string} button', button => { cy.get('.base-card .action-buttons .base-button') .should('contain', button) -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Block/I_{string}_see_{string}_from_the_content_menu_in_the_user_info_box.js b/cypress/support/step_definitions/User.Block/I_{string}_see_{string}_from_the_content_menu_in_the_user_info_box.js similarity index 79% rename from cypress/integration/User.Block/I_{string}_see_{string}_from_the_content_menu_in_the_user_info_box.js rename to cypress/support/step_definitions/User.Block/I_{string}_see_{string}_from_the_content_menu_in_the_user_info_box.js index 0f44b5192..bcfd9bd7a 100644 --- a/cypress/integration/User.Block/I_{string}_see_{string}_from_the_content_menu_in_the_user_info_box.js +++ b/cypress/support/step_definitions/User.Block/I_{string}_see_{string}_from_the_content_menu_in_the_user_info_box.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I {string} see {string} from the content menu in the user info box", (condition, link) => { cy.get(".user-content-menu .base-button").click() cy.get(".popover .ds-menu-item-link") .should(condition === 'should' ? 'contain' : 'not.contain', link) -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Block/a_user_has_blocked_me.js b/cypress/support/step_definitions/User.Block/a_user_has_blocked_me.js similarity index 65% rename from cypress/integration/User.Block/a_user_has_blocked_me.js rename to cypress/support/step_definitions/User.Block/a_user_has_blocked_me.js index d1703407f..13b247ccf 100644 --- a/cypress/integration/User.Block/a_user_has_blocked_me.js +++ b/cypress/support/step_definitions/User.Block/a_user_has_blocked_me.js @@ -1,15 +1,15 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("a user has blocked me", () => { cy.neode() - .first("User", { + .firstOf("User", { name: "Peter Pan" }) .then(blockedUser => { cy.neode() - .first("User", { + .firstOf("User", { name: 'Harassing User' }) .relateTo(blockedUser, "blocked"); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.Block/they_should_not_see_the_comment_form.js b/cypress/support/step_definitions/User.Block/they_should_not_see_the_comment_form.js similarity index 65% rename from cypress/integration/User.Block/they_should_not_see_the_comment_form.js rename to cypress/support/step_definitions/User.Block/they_should_not_see_the_comment_form.js index 962934994..34aa86aaf 100644 --- a/cypress/integration/User.Block/they_should_not_see_the_comment_form.js +++ b/cypress/support/step_definitions/User.Block/they_should_not_see_the_comment_form.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("they should not see the comment form", () => { cy.get(".base-card").children().should('not.have.class', 'comment-form') -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Block/they_should_see_a_text_explaining_why_commenting_is_not_possible.js b/cypress/support/step_definitions/User.Block/they_should_see_a_text_explaining_why_commenting_is_not_possible.js similarity index 73% rename from cypress/integration/User.Block/they_should_see_a_text_explaining_why_commenting_is_not_possible.js rename to cypress/support/step_definitions/User.Block/they_should_see_a_text_explaining_why_commenting_is_not_possible.js index d95f3229c..64f0f0fd1 100644 --- a/cypress/integration/User.Block/they_should_see_a_text_explaining_why_commenting_is_not_possible.js +++ b/cypress/support/step_definitions/User.Block/they_should_see_a_text_explaining_why_commenting_is_not_possible.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("they should see a text explaining why commenting is not possible", () => { cy.get('.ds-placeholder').should('contain', "Commenting is not possible at this time on this post.") -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Mute/I_mute_the_user_{string}.js b/cypress/support/step_definitions/User.Mute/I_mute_the_user_{string}.js similarity index 59% rename from cypress/integration/User.Mute/I_mute_the_user_{string}.js rename to cypress/support/step_definitions/User.Mute/I_mute_the_user_{string}.js index e0ed382cb..7b52ca373 100644 --- a/cypress/integration/User.Mute/I_mute_the_user_{string}.js +++ b/cypress/support/step_definitions/User.Mute/I_mute_the_user_{string}.js @@ -1,13 +1,13 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I mute the user {string}", name => { cy.neode() - .first("User", { name }) + .firstOf("User", { name }) .then(mutedUser => { cy.neode() - .first("User", { + .firstOf("User", { name: "Peter Pan" }) .relateTo(mutedUser, "muted"); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.Mute/the_list_of_posts_of_this_user_is_empty.js b/cypress/support/step_definitions/User.Mute/the_list_of_posts_of_this_user_is_empty.js similarity index 69% rename from cypress/integration/User.Mute/the_list_of_posts_of_this_user_is_empty.js rename to cypress/support/step_definitions/User.Mute/the_list_of_posts_of_this_user_is_empty.js index 038ca2168..66ac3bdb8 100644 --- a/cypress/integration/User.Mute/the_list_of_posts_of_this_user_is_empty.js +++ b/cypress/support/step_definitions/User.Mute/the_list_of_posts_of_this_user_is_empty.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the list of posts of this user is empty", () => { cy.get(".base-card").not(".post-link"); cy.get(".main-container").find(".ds-space.hc-empty"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.Mute/the_search_should_contain_the_annoying_user.js b/cypress/support/step_definitions/User.Mute/the_search_should_contain_the_annoying_user.js similarity index 83% rename from cypress/integration/User.Mute/the_search_should_contain_the_annoying_user.js rename to cypress/support/step_definitions/User.Mute/the_search_should_contain_the_annoying_user.js index d29eafc2f..7d47c48aa 100644 --- a/cypress/integration/User.Mute/the_search_should_contain_the_annoying_user.js +++ b/cypress/support/step_definitions/User.Mute/the_search_should_contain_the_annoying_user.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the search should contain the annoying user", () => { cy.get(".searchable-input .ds-select-dropdown") @@ -10,4 +10,4 @@ Then("the search should contain the annoying user", () => { cy.get(".searchable-input .ds-select input") .focus() .type("{esc}"); -}) \ No newline at end of file +}) diff --git a/cypress/integration/User.Mute/the_search_should_not_contain_posts_by_the_annoying_user.js b/cypress/support/step_definitions/User.Mute/the_search_should_not_contain_posts_by_the_annoying_user.js similarity index 81% rename from cypress/integration/User.Mute/the_search_should_not_contain_posts_by_the_annoying_user.js rename to cypress/support/step_definitions/User.Mute/the_search_should_not_contain_posts_by_the_annoying_user.js index a2f0a01d7..1dad99678 100644 --- a/cypress/integration/User.Mute/the_search_should_not_contain_posts_by_the_annoying_user.js +++ b/cypress/support/step_definitions/User.Mute/the_search_should_not_contain_posts_by_the_annoying_user.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the search should not contain posts by the annoying user", () => { cy.get(".searchable-input .ds-select-dropdown").should($li => { @@ -7,4 +7,4 @@ Then("the search should not contain posts by the annoying user", () => { cy.get(".ds-select-dropdown") .should("not.have.class", '.search-post') .should("not.contain", 'Spam') -}); \ No newline at end of file +}); diff --git a/cypress/integration/User.SettingNotifications/I_click_on_element_with_ID_{string}.js b/cypress/support/step_definitions/User.SettingNotifications/I_click_on_element_with_ID_{string}.js similarity index 57% rename from cypress/integration/User.SettingNotifications/I_click_on_element_with_ID_{string}.js rename to cypress/support/step_definitions/User.SettingNotifications/I_click_on_element_with_ID_{string}.js index 251c38941..7bdb20e5d 100644 --- a/cypress/integration/User.SettingNotifications/I_click_on_element_with_ID_{string}.js +++ b/cypress/support/step_definitions/User.SettingNotifications/I_click_on_element_with_ID_{string}.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I click on element with ID {string}", (id) => { cy.get('#' + id).click() diff --git a/cypress/support/step_definitions/User.SettingNotifications/I_click_save.js b/cypress/support/step_definitions/User.SettingNotifications/I_click_save.js new file mode 100644 index 000000000..9412d7912 --- /dev/null +++ b/cypress/support/step_definitions/User.SettingNotifications/I_click_save.js @@ -0,0 +1,5 @@ +import { Then } from "@badeball/cypress-cucumber-preprocessor"; + +Then("I click save", () => { + cy.get(".save-button").click() +}) diff --git a/cypress/integration/UserProfile.Avatar/I_cannot_upload_a_picture.js b/cypress/support/step_definitions/UserProfile.Avatar/I_cannot_upload_a_picture.js similarity index 71% rename from cypress/integration/UserProfile.Avatar/I_cannot_upload_a_picture.js rename to cypress/support/step_definitions/UserProfile.Avatar/I_cannot_upload_a_picture.js index 8b501f3f5..9e44b55ba 100644 --- a/cypress/integration/UserProfile.Avatar/I_cannot_upload_a_picture.js +++ b/cypress/support/step_definitions/UserProfile.Avatar/I_cannot_upload_a_picture.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I cannot upload a picture", () => { cy.get(".base-card") .children() .should("not.have.id", "customdropzone") .should("have.class", "profile-avatar"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js b/cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js similarity index 88% rename from cypress/integration/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js rename to cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js index 366fd8292..27be5a99d 100644 --- a/cypress/integration/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js +++ b/cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should be able to change my profile picture", () => { const avatarUpload = "onourjourney.png"; @@ -14,4 +14,4 @@ Then("I should be able to change my profile picture", () => { .and("contains", "onourjourney"); cy.contains(".iziToast-message", "Upload successful") .should("have.length",1); -}); \ No newline at end of file +}); diff --git a/cypress/integration/UserProfile.ChangePassword/I_can_login_successfully.js b/cypress/support/step_definitions/UserProfile.ChangePassword/I_can_login_successfully.js similarity index 66% rename from cypress/integration/UserProfile.ChangePassword/I_can_login_successfully.js rename to cypress/support/step_definitions/UserProfile.ChangePassword/I_can_login_successfully.js index d1a62cc4d..1349b5eb9 100644 --- a/cypress/integration/UserProfile.ChangePassword/I_can_login_successfully.js +++ b/cypress/support/step_definitions/UserProfile.ChangePassword/I_can_login_successfully.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I can login successfully", () => { // cy.reload(); cy.get(".iziToast-wrapper") .should("contain", "You are logged in!"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/UserProfile.ChangePassword/I_cannot_login_anymore.js b/cypress/support/step_definitions/UserProfile.ChangePassword/I_cannot_login_anymore.js similarity index 69% rename from cypress/integration/UserProfile.ChangePassword/I_cannot_login_anymore.js rename to cypress/support/step_definitions/UserProfile.ChangePassword/I_cannot_login_anymore.js index ff381d891..f6159c79b 100644 --- a/cypress/integration/UserProfile.ChangePassword/I_cannot_login_anymore.js +++ b/cypress/support/step_definitions/UserProfile.ChangePassword/I_cannot_login_anymore.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I cannot login anymore", password => { //cy.reload(); cy.get(".iziToast-wrapper") .should("contain", "Incorrect email address or password."); -}); \ No newline at end of file +}); diff --git a/cypress/integration/UserProfile.ChangePassword/I_cannot_submit_the_form.js b/cypress/support/step_definitions/UserProfile.ChangePassword/I_cannot_submit_the_form.js similarity index 60% rename from cypress/integration/UserProfile.ChangePassword/I_cannot_submit_the_form.js rename to cypress/support/step_definitions/UserProfile.ChangePassword/I_cannot_submit_the_form.js index 657d38bd8..02a2c7d83 100644 --- a/cypress/integration/UserProfile.ChangePassword/I_cannot_submit_the_form.js +++ b/cypress/support/step_definitions/UserProfile.ChangePassword/I_cannot_submit_the_form.js @@ -1,6 +1,6 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I cannot submit the form", () => { cy.get("button[type=submit]") .should('be.disabled'); -}); \ No newline at end of file +}); diff --git a/cypress/integration/UserProfile.ChangePassword/I_fill_the_password_form_with.js b/cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js similarity index 81% rename from cypress/integration/UserProfile.ChangePassword/I_fill_the_password_form_with.js rename to cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js index 69345ecc6..af0c6639b 100644 --- a/cypress/integration/UserProfile.ChangePassword/I_fill_the_password_form_with.js +++ b/cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I fill the password form with:", table => { table = table.rowsHash(); @@ -8,4 +8,4 @@ When("I fill the password form with:", table => { .type(table["Your new password"]) .get("input[id=passwordConfirmation]") .type(table["Confirm new password"]); -}); \ No newline at end of file +}); diff --git a/cypress/support/step_definitions/UserProfile.ChangePassword/I_submit_the_form.js b/cypress/support/step_definitions/UserProfile.ChangePassword/I_submit_the_form.js new file mode 100644 index 000000000..8b17f6de1 --- /dev/null +++ b/cypress/support/step_definitions/UserProfile.ChangePassword/I_submit_the_form.js @@ -0,0 +1,5 @@ +import { When } from "@badeball/cypress-cucumber-preprocessor"; + +When("I submit the form", () => { + cy.get("form").submit(); +}); diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js similarity index 85% rename from cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js rename to cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js index ca6b4798b..c5dd84bf0 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_can_see_my_new_name_{string}_when_I_click_on_my_profile_picture_in_the_top_right.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I can see my new name {string} when I click on my profile picture in the top right', name => { cy.get(".avatar-menu").then(($menu) => { diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js similarity index 80% rename from cypress/integration/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js rename to cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js index a1bc1c524..f0f6ba4da 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I have the following self-description:', text => { cy.get('textarea[id=about]') @@ -9,4 +9,4 @@ When('I have the following self-description:', text => { .not('[disabled]') cy.get('.iziToast-message') .should('contain', 'Your data was successfully updated') - }) \ No newline at end of file + }) diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js similarity index 82% rename from cypress/integration/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js rename to cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js index de5143b9f..00d5141f8 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I save {string} as my location', location => { cy.get('input[id=city]').type(location) @@ -10,4 +10,4 @@ When('I save {string} as my location', location => { .not('[disabled]') cy.get('.iziToast-message') .should('contain', 'Your data was successfully updated') - }) \ No newline at end of file + }) diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_new_name.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_new_name.js similarity index 79% rename from cypress/integration/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_new_name.js rename to cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_new_name.js index 22e26cbc5..b94683a5b 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_new_name.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_new_name.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I save {string} as my new name', name => { cy.get('input[id=name]') @@ -9,4 +9,4 @@ When('I save {string} as my new name', name => { .not('[disabled]') cy.get('.iziToast-message') .should('contain', 'Your data was successfully updated') -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/they_can_see_the_following_text_in_the_info_box_below_my_avatar.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/they_can_see_the_following_text_in_the_info_box_below_my_avatar.js similarity index 60% rename from cypress/integration/UserProfile.NameDescriptionLocation/they_can_see_the_following_text_in_the_info_box_below_my_avatar.js rename to cypress/support/step_definitions/UserProfile.NameDescriptionLocation/they_can_see_the_following_text_in_the_info_box_below_my_avatar.js index 6d375a406..d416c8d10 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/they_can_see_the_following_text_in_the_info_box_below_my_avatar.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/they_can_see_the_following_text_in_the_info_box_below_my_avatar.js @@ -1,5 +1,5 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('they can see the following text in the info box below my avatar:', text => { cy.contains(text) -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.NameDescriptionLocation/they_can_see_{string}_in_the_info_box_below_my_avatar.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/they_can_see_{string}_in_the_info_box_below_my_avatar.js similarity index 60% rename from cypress/integration/UserProfile.NameDescriptionLocation/they_can_see_{string}_in_the_info_box_below_my_avatar.js rename to cypress/support/step_definitions/UserProfile.NameDescriptionLocation/they_can_see_{string}_in_the_info_box_below_my_avatar.js index ea328f441..ea8cf2158 100644 --- a/cypress/integration/UserProfile.NameDescriptionLocation/they_can_see_{string}_in_the_info_box_below_my_avatar.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/they_can_see_{string}_in_the_info_box_below_my_avatar.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('they can see {string} in the info box below my avatar', location => { cy.contains(location) -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.SocialMedia/I_add_a_social_media_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js similarity index 77% rename from cypress/integration/UserProfile.SocialMedia/I_add_a_social_media_link.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js index 07c80b30c..eab8ba0d6 100644 --- a/cypress/integration/UserProfile.SocialMedia/I_add_a_social_media_link.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I add a social media link', () => { cy.get('[data-test="add-save-button"]') @@ -7,4 +7,4 @@ When('I add a social media link', () => { .type('https://freeradical.zone/peter-pan') .get('[data-test="add-save-button"]') .click() -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.SocialMedia/I_can_cancel_editing.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js similarity index 67% rename from cypress/integration/UserProfile.SocialMedia/I_can_cancel_editing.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js index 03d60c44a..72d83c9a3 100644 --- a/cypress/integration/UserProfile.SocialMedia/I_can_cancel_editing.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I can cancel editing', () => { cy.get('button#cancel') .click() .get('input#editSocialMedia') .should('have.length', 0) -}) \ No newline at end of file +}) diff --git a/cypress/support/step_definitions/UserProfile.SocialMedia/I_delete_a_social_media_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_delete_a_social_media_link.js new file mode 100644 index 000000000..1f0f3e22e --- /dev/null +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_delete_a_social_media_link.js @@ -0,0 +1,6 @@ +import { When } from "@badeball/cypress-cucumber-preprocessor"; + +When('I delete a social media link', () => { + cy.get(".base-button[title='Delete']") + .click() +}) diff --git a/cypress/integration/UserProfile.SocialMedia/I_delete_the_social_media_link_{string}.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_delete_the_social_media_link_{string}.js similarity index 72% rename from cypress/integration/UserProfile.SocialMedia/I_delete_the_social_media_link_{string}.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/I_delete_the_social_media_link_{string}.js index 6b65e361b..3acba4756 100644 --- a/cypress/integration/UserProfile.SocialMedia/I_delete_the_social_media_link_{string}.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_delete_the_social_media_link_{string}.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I delete the social media link {string}', (link) => { cy.get('[data-test="delete-button"]') @@ -8,5 +8,5 @@ When('I delete the social media link {string}', (link) => { cy.get('[data-test="confirm-button"]') .click() cy.get('.ds-list-item-content > a') - .contains(link).should('not.exist') -}) \ No newline at end of file + .should('not.exist') +}) diff --git a/cypress/integration/UserProfile.SocialMedia/I_edit_and_save_the_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js similarity index 74% rename from cypress/integration/UserProfile.SocialMedia/I_edit_and_save_the_link.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js index 54712920d..3cec61688 100644 --- a/cypress/integration/UserProfile.SocialMedia/I_edit_and_save_the_link.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I edit and save the link', () => { cy.get('input#editSocialMedia') @@ -6,4 +6,4 @@ When('I edit and save the link', () => { .type('https://freeradical.zone/tinkerbell') .get('[data-test="add-save-button"]') .click() -}) \ No newline at end of file +}) diff --git a/cypress/support/step_definitions/UserProfile.SocialMedia/I_have_added_a_social_media_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_have_added_a_social_media_link.js new file mode 100644 index 000000000..b1eb698de --- /dev/null +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_have_added_a_social_media_link.js @@ -0,0 +1,13 @@ +import { Given } from "@badeball/cypress-cucumber-preprocessor"; + +Given('I have added a social media link', () => { + cy.visit('/settings/my-social-media') + .get('button') + .contains('Add link') + .click() + .get('#editSocialMedia') + .type('https://freeradical.zone/peter-pan') + .get('button') + .contains('Save') + .click() +}) diff --git a/cypress/integration/UserProfile.SocialMedia/I_have_added_the_social_media_link_{string}.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_have_added_the_social_media_link_{string}.js similarity index 82% rename from cypress/integration/UserProfile.SocialMedia/I_have_added_the_social_media_link_{string}.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/I_have_added_the_social_media_link_{string}.js index 78a0191d2..d0daab843 100644 --- a/cypress/integration/UserProfile.SocialMedia/I_have_added_the_social_media_link_{string}.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_have_added_the_social_media_link_{string}.js @@ -1,4 +1,4 @@ -import { Given } from "cypress-cucumber-preprocessor/steps"; +import { Given } from "@badeball/cypress-cucumber-preprocessor"; Given('I have added the social media link {string}', (link) => { cy.visit('/settings/my-social-media') @@ -10,4 +10,4 @@ Given('I have added the social media link {string}', (link) => { .click() cy.get('.ds-list-item-content > a') .contains(link) -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.SocialMedia/I_start_editing_a_social_media_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_start_editing_a_social_media_link.js similarity index 60% rename from cypress/integration/UserProfile.SocialMedia/I_start_editing_a_social_media_link.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/I_start_editing_a_social_media_link.js index e3e5c2a22..11ee84084 100644 --- a/cypress/integration/UserProfile.SocialMedia/I_start_editing_a_social_media_link.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_start_editing_a_social_media_link.js @@ -1,6 +1,6 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I start editing a social media link', () => { cy.get('[data-test="edit-button"]') .click() -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.SocialMedia/the_new_social_media_link_shows_up_on_the_page.js b/cypress/support/step_definitions/UserProfile.SocialMedia/the_new_social_media_link_shows_up_on_the_page.js similarity index 69% rename from cypress/integration/UserProfile.SocialMedia/the_new_social_media_link_shows_up_on_the_page.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/the_new_social_media_link_shows_up_on_the_page.js index e72546f2a..fd1bf9350 100644 --- a/cypress/integration/UserProfile.SocialMedia/the_new_social_media_link_shows_up_on_the_page.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/the_new_social_media_link_shows_up_on_the_page.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('the new social media link shows up on the page', () => { cy.get('a[href="https://freeradical.zone/peter-pan"]') .should('have.length', 1) -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.SocialMedia/the_new_url_is_displayed.js b/cypress/support/step_definitions/UserProfile.SocialMedia/the_new_url_is_displayed.js similarity index 65% rename from cypress/integration/UserProfile.SocialMedia/the_new_url_is_displayed.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/the_new_url_is_displayed.js index c25e6f0bb..c9c7dd906 100644 --- a/cypress/integration/UserProfile.SocialMedia/the_new_url_is_displayed.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/the_new_url_is_displayed.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('the new url is displayed', () => { cy.get("a[href='https://freeradical.zone/tinkerbell']") .should('have.length', 1) -}) \ No newline at end of file +}) diff --git a/cypress/integration/UserProfile.SocialMedia/the_old_url_is_not_displayed.js b/cypress/support/step_definitions/UserProfile.SocialMedia/the_old_url_is_not_displayed.js similarity index 66% rename from cypress/integration/UserProfile.SocialMedia/the_old_url_is_not_displayed.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/the_old_url_is_not_displayed.js index b3e804124..c0941f600 100644 --- a/cypress/integration/UserProfile.SocialMedia/the_old_url_is_not_displayed.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/the_old_url_is_not_displayed.js @@ -1,7 +1,7 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('the old url is not displayed', () => { cy.get("a[href='https://freeradical.zone/peter-pan']") .should('have.length', 0) }) - \ No newline at end of file + diff --git a/cypress/integration/UserProfile.SocialMedia/they_should_be_able_to_see_my_social_media_links.js b/cypress/support/step_definitions/UserProfile.SocialMedia/they_should_be_able_to_see_my_social_media_links.js similarity index 77% rename from cypress/integration/UserProfile.SocialMedia/they_should_be_able_to_see_my_social_media_links.js rename to cypress/support/step_definitions/UserProfile.SocialMedia/they_should_be_able_to_see_my_social_media_links.js index 89db2bd77..3b1692b59 100644 --- a/cypress/integration/UserProfile.SocialMedia/they_should_be_able_to_see_my_social_media_links.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/they_should_be_able_to_see_my_social_media_links.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('they should be able to see my social media links', () => { cy.get('[data-test="social-media-list-headline"]') .contains('Peter Pan') .get('a[href="https://freeradical.zone/peter-pan"]') .should('have.length', 1) -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/I_am_logged_in_as_{string}.js b/cypress/support/step_definitions/common/I_am_logged_in_as_{string}.js similarity index 71% rename from cypress/integration/common/I_am_logged_in_as_{string}.js rename to cypress/support/step_definitions/common/I_am_logged_in_as_{string}.js index 96d1c28ab..dfbfd519c 100644 --- a/cypress/integration/common/I_am_logged_in_as_{string}.js +++ b/cypress/support/step_definitions/common/I_am_logged_in_as_{string}.js @@ -1,9 +1,9 @@ -import { Given } from "cypress-cucumber-preprocessor/steps"; -import encode from '../../../backend/src/jwt/encode' +import { Given } from "@badeball/cypress-cucumber-preprocessor"; +import encode from '../../../../backend/src/jwt/encode' Given("I am logged in as {string}", slug => { cy.neode() - .first("User", { slug }) + .firstOf("User", { slug }) .then(user => { return new Cypress.Promise((resolve, reject) => { if(!user) { @@ -15,4 +15,4 @@ Given("I am logged in as {string}", slug => { .then(user => { cy.setCookie('ocelot-social-token', encode(user)) }) -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_am_on_page_{string}.js b/cypress/support/step_definitions/common/I_am_on_page_{string}.js similarity index 61% rename from cypress/integration/common/I_am_on_page_{string}.js rename to cypress/support/step_definitions/common/I_am_on_page_{string}.js index 5ef1b9852..44b10c4c4 100644 --- a/cypress/integration/common/I_am_on_page_{string}.js +++ b/cypress/support/step_definitions/common/I_am_on_page_{string}.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I am on page {string}", page => { cy.location("pathname") .should("match", new RegExp(page)); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_can_see_the_following_table.js b/cypress/support/step_definitions/common/I_can_see_the_following_table.js similarity index 84% rename from cypress/integration/common/I_can_see_the_following_table.js rename to cypress/support/step_definitions/common/I_can_see_the_following_table.js index 9ebe1208c..f62e1a99a 100644 --- a/cypress/integration/common/I_can_see_the_following_table.js +++ b/cypress/support/step_definitions/common/I_can_see_the_following_table.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I can see the following table:', table => { const headers = table.raw()[0] @@ -13,4 +13,4 @@ Then('I can see the following table:', table => { .eq(i) .should('contain', expected) }) -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/I_choose_the_following_text_as_content.js b/cypress/support/step_definitions/common/I_choose_the_following_text_as_content.js similarity index 81% rename from cypress/integration/common/I_choose_the_following_text_as_content.js rename to cypress/support/step_definitions/common/I_choose_the_following_text_as_content.js index 62b5426d5..0cb974004 100644 --- a/cypress/integration/common/I_choose_the_following_text_as_content.js +++ b/cypress/support/step_definitions/common/I_choose_the_following_text_as_content.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I choose the following text as content:", async text => { cy.task('getValue', 'lastPost').then(lastPost => { @@ -6,4 +6,4 @@ When("I choose the following text as content:", async text => { cy.task('pushValue', { name: 'lastPost', value: lastPost }) cy.get(".editor .ProseMirror").type(lastPost.content); }) -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_click_on_{string}.js b/cypress/support/step_definitions/common/I_click_on_{string}.js similarity index 88% rename from cypress/integration/common/I_click_on_{string}.js rename to cypress/support/step_definitions/common/I_click_on_{string}.js index 5f43eb912..9d51f27f7 100644 --- a/cypress/integration/common/I_click_on_{string}.js +++ b/cypress/support/step_definitions/common/I_click_on_{string}.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I click on {string}", element => { const elementSelectors = { @@ -16,4 +16,4 @@ When("I click on {string}", element => { cy.get(elementSelectors[element]) .click() .wait(750); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_click_on_{string}_from_the_content_menu_in_the_user_info_box.js b/cypress/support/step_definitions/common/I_click_on_{string}_from_the_content_menu_in_the_user_info_box.js similarity index 79% rename from cypress/integration/common/I_click_on_{string}_from_the_content_menu_in_the_user_info_box.js rename to cypress/support/step_definitions/common/I_click_on_{string}_from_the_content_menu_in_the_user_info_box.js index f1a859bfe..66373037e 100644 --- a/cypress/integration/common/I_click_on_{string}_from_the_content_menu_in_the_user_info_box.js +++ b/cypress/support/step_definitions/common/I_click_on_{string}_from_the_content_menu_in_the_user_info_box.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I click on {string} from the content menu in the user info box", button => { @@ -9,4 +9,4 @@ When("I click on {string} from the content menu in the user info box", force: true }); } -); \ No newline at end of file +); diff --git a/cypress/integration/Admin.DonationInfo/I_click_the_checkbox_show_donations_progress_bar_and_save.js b/cypress/support/step_definitions/common/I_click_the_checkbox_show_donations_progress_bar_and_save.js similarity index 69% rename from cypress/integration/Admin.DonationInfo/I_click_the_checkbox_show_donations_progress_bar_and_save.js rename to cypress/support/step_definitions/common/I_click_the_checkbox_show_donations_progress_bar_and_save.js index b4289dd5e..1806af807 100644 --- a/cypress/integration/Admin.DonationInfo/I_click_the_checkbox_show_donations_progress_bar_and_save.js +++ b/cypress/support/step_definitions/common/I_click_the_checkbox_show_donations_progress_bar_and_save.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I click the checkbox show donations progress bar and save", () => { cy.get("#showDonations").click() cy.get(".donations-info-button").click() -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/I_fill_in_my_credentials_{string}_{string}.js b/cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js similarity index 81% rename from cypress/integration/common/I_fill_in_my_credentials_{string}_{string}.js rename to cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js index e2227f454..3c0b0d02e 100644 --- a/cypress/integration/common/I_fill_in_my_credentials_{string}_{string}.js +++ b/cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I fill in my credentials {string} {string}", (email,password) => { cy.get("input[name=email]") @@ -9,4 +9,4 @@ When("I fill in my credentials {string} {string}", (email,password) => { .trigger("focus") .type('{selectall}{backspace}') .type(password); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_follow_the_user_{string}.js b/cypress/support/step_definitions/common/I_follow_the_user_{string}.js similarity index 60% rename from cypress/integration/common/I_follow_the_user_{string}.js rename to cypress/support/step_definitions/common/I_follow_the_user_{string}.js index 56d50a5ae..3698daee8 100644 --- a/cypress/integration/common/I_follow_the_user_{string}.js +++ b/cypress/support/step_definitions/common/I_follow_the_user_{string}.js @@ -1,11 +1,13 @@ +import { Given } from "@badeball/cypress-cucumber-preprocessor"; + Given("I follow the user {string}", name => { cy.neode() - .first("User", {name}) + .firstOf("User", {name}) .then(followed => { cy.neode() - .first("User", { + .firstOf("User", { name: "Peter Pan" }) .relateTo(followed, "following"); }); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_get_removed_from_his_follower_collection.js b/cypress/support/step_definitions/common/I_get_removed_from_his_follower_collection.js similarity index 73% rename from cypress/integration/common/I_get_removed_from_his_follower_collection.js rename to cypress/support/step_definitions/common/I_get_removed_from_his_follower_collection.js index b32ca5961..7721efda0 100644 --- a/cypress/integration/common/I_get_removed_from_his_follower_collection.js +++ b/cypress/support/step_definitions/common/I_get_removed_from_his_follower_collection.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I get removed from his follower collection", () => { cy.get(".base-card") .not(".post-link"); cy.get(".main-container") .contains(".base-card","is not followed by anyone"); - }); \ No newline at end of file + }); diff --git a/cypress/integration/common/I_log_out.js b/cypress/support/step_definitions/common/I_log_out.js similarity index 81% rename from cypress/integration/common/I_log_out.js rename to cypress/support/step_definitions/common/I_log_out.js index 60185bc45..c97506535 100644 --- a/cypress/integration/common/I_log_out.js +++ b/cypress/support/step_definitions/common/I_log_out.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I log out", () => { cy.get(".avatar-menu").then(($menu) => { diff --git a/cypress/integration/common/I_navigate_to_my_{string}_settings_page.js b/cypress/support/step_definitions/common/I_navigate_to_my_{string}_settings_page.js similarity index 79% rename from cypress/integration/common/I_navigate_to_my_{string}_settings_page.js rename to cypress/support/step_definitions/common/I_navigate_to_my_{string}_settings_page.js index 4d369eab2..91a3b58d9 100644 --- a/cypress/integration/common/I_navigate_to_my_{string}_settings_page.js +++ b/cypress/support/step_definitions/common/I_navigate_to_my_{string}_settings_page.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I navigate to my {string} settings page", settingsPage => { cy.get(".avatar-menu-trigger").click(); @@ -7,4 +7,4 @@ When("I navigate to my {string} settings page", settingsPage => { .contains("Settings") .click(); cy.contains(".ds-menu-item-link", settingsPage).click(); -}); \ No newline at end of file +}); diff --git a/cypress/support/step_definitions/common/I_navigate_to_page_{string}.js b/cypress/support/step_definitions/common/I_navigate_to_page_{string}.js new file mode 100644 index 000000000..72cf90b6a --- /dev/null +++ b/cypress/support/step_definitions/common/I_navigate_to_page_{string}.js @@ -0,0 +1,5 @@ +import { Given } from "@badeball/cypress-cucumber-preprocessor"; + +Given("I navigate to page {string}", page => { + cy.visit(page); +}); diff --git a/cypress/support/step_definitions/common/I_refresh_the_page.js b/cypress/support/step_definitions/common/I_refresh_the_page.js new file mode 100644 index 000000000..47e493fe4 --- /dev/null +++ b/cypress/support/step_definitions/common/I_refresh_the_page.js @@ -0,0 +1,6 @@ +import { When } from "@badeball/cypress-cucumber-preprocessor"; + +When('I refresh the page', () => { + cy.visit('/') + .reload(); +}); diff --git a/cypress/integration/common/I_search_for_{string}.js b/cypress/support/step_definitions/common/I_search_for_{string}.js similarity index 78% rename from cypress/integration/common/I_search_for_{string}.js rename to cypress/support/step_definitions/common/I_search_for_{string}.js index eaad481f7..f91959182 100644 --- a/cypress/integration/common/I_search_for_{string}.js +++ b/cypress/support/step_definitions/common/I_search_for_{string}.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I search for {string}", value => { cy.intercept({ @@ -9,4 +9,4 @@ When("I search for {string}", value => { .focus() .type(value); cy.wait("@graphqlRequest"); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_see_a_toaster_with_status_{string}.js b/cypress/support/step_definitions/common/I_see_a_toaster_with_status_{string}.js similarity index 73% rename from cypress/integration/common/I_see_a_toaster_with_status_{string}.js rename to cypress/support/step_definitions/common/I_see_a_toaster_with_status_{string}.js index aa07d787c..c7bd91e29 100644 --- a/cypress/integration/common/I_see_a_toaster_with_status_{string}.js +++ b/cypress/support/step_definitions/common/I_see_a_toaster_with_status_{string}.js @@ -1,4 +1,4 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I see a toaster with status {string}", (status) => { switch (status) { @@ -6,4 +6,4 @@ Then("I see a toaster with status {string}", (status) => { cy.get(".iziToast.iziToast-color-green").should("be.visible"); break; } -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/I_see_a_toaster_with_{string}.js b/cypress/support/step_definitions/common/I_see_a_toaster_with_{string}.js similarity index 61% rename from cypress/integration/common/I_see_a_toaster_with_{string}.js rename to cypress/support/step_definitions/common/I_see_a_toaster_with_{string}.js index 1cf7da285..e1496b8de 100644 --- a/cypress/integration/common/I_see_a_toaster_with_{string}.js +++ b/cypress/support/step_definitions/common/I_see_a_toaster_with_{string}.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I see a toaster with {string}", (title) => { cy.get(".iziToast-message").should("contain", title); -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/I_see_a_{string}_message.js b/cypress/support/step_definitions/common/I_see_a_{string}_message.js similarity index 54% rename from cypress/integration/common/I_see_a_{string}_message.js rename to cypress/support/step_definitions/common/I_see_a_{string}_message.js index 6cc2cbf6b..cc8deca5f 100644 --- a/cypress/integration/common/I_see_a_{string}_message.js +++ b/cypress/support/step_definitions/common/I_see_a_{string}_message.js @@ -1,5 +1,5 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I see a {string} message:", (_type, message) => { cy.contains(message); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/I_should_see_the_following_posts_in_the_select_dropdown.js b/cypress/support/step_definitions/common/I_should_see_the_following_posts_in_the_select_dropdown.js similarity index 73% rename from cypress/integration/common/I_should_see_the_following_posts_in_the_select_dropdown.js rename to cypress/support/step_definitions/common/I_should_see_the_following_posts_in_the_select_dropdown.js index 420c3376a..88e18a280 100644 --- a/cypress/integration/common/I_should_see_the_following_posts_in_the_select_dropdown.js +++ b/cypress/support/step_definitions/common/I_should_see_the_following_posts_in_the_select_dropdown.js @@ -1,8 +1,8 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should see the following posts in the select dropdown:", table => { table.hashes().forEach(({ title }) => { cy.get(".ds-select-dropdown") .should("contain", title); }); -}); \ No newline at end of file +}); diff --git a/cypress/support/step_definitions/common/I_wait_for_{int}_milliseconds.js b/cypress/support/step_definitions/common/I_wait_for_{int}_milliseconds.js new file mode 100644 index 000000000..2ed462340 --- /dev/null +++ b/cypress/support/step_definitions/common/I_wait_for_{int}_milliseconds.js @@ -0,0 +1,5 @@ +import { When } from "@badeball/cypress-cucumber-preprocessor"; + +When("I wait for {int} milliseconds", time => { + cy.wait(time) +}); diff --git a/cypress/integration/common/the_checkbox_with_ID_{string}_should_{string}.js b/cypress/support/step_definitions/common/the_checkbox_with_ID_{string}_should_{string}.js similarity index 62% rename from cypress/integration/common/the_checkbox_with_ID_{string}_should_{string}.js rename to cypress/support/step_definitions/common/the_checkbox_with_ID_{string}_should_{string}.js index ad3f7f3cc..603524804 100644 --- a/cypress/integration/common/the_checkbox_with_ID_{string}_should_{string}.js +++ b/cypress/support/step_definitions/common/the_checkbox_with_ID_{string}_should_{string}.js @@ -1,4 +1,4 @@ -import { When } from "cypress-cucumber-preprocessor/steps"; +import { When } from "@badeball/cypress-cucumber-preprocessor"; When("the checkbox with ID {string} should {string}", (id, value) => { cy.get('#' + id).should(value) diff --git a/cypress/integration/common/the_first_post_on_the_newsfeed_has_the_title.js b/cypress/support/step_definitions/common/the_first_post_on_the_newsfeed_has_the_title.js similarity index 65% rename from cypress/integration/common/the_first_post_on_the_newsfeed_has_the_title.js rename to cypress/support/step_definitions/common/the_first_post_on_the_newsfeed_has_the_title.js index afe370e90..ba98a7a8e 100644 --- a/cypress/integration/common/the_first_post_on_the_newsfeed_has_the_title.js +++ b/cypress/support/step_definitions/common/the_first_post_on_the_newsfeed_has_the_title.js @@ -1,6 +1,6 @@ -import { Then } from "cypress-cucumber-preprocessor/steps"; +import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("the first post on the newsfeed has the title:", title => { cy.get(".post-teaser:first") .should("contain", title); -}); \ No newline at end of file +}); diff --git a/cypress/integration/common/the_following_{string}_are_in_the_database.js b/cypress/support/step_definitions/common/the_following_{string}_are_in_the_database.js similarity index 93% rename from cypress/integration/common/the_following_{string}_are_in_the_database.js rename to cypress/support/step_definitions/common/the_following_{string}_are_in_the_database.js index e03a705f4..8e41afa2a 100644 --- a/cypress/integration/common/the_following_{string}_are_in_the_database.js +++ b/cypress/support/step_definitions/common/the_following_{string}_are_in_the_database.js @@ -1,4 +1,4 @@ -import { Given } from "cypress-cucumber-preprocessor/steps"; +import { Given } from "@badeball/cypress-cucumber-preprocessor"; Given("the following {string} are in the database:", (table,data) => { switch(table){ @@ -37,4 +37,4 @@ Given("the following {string} are in the database:", (table,data) => { }); break } -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/{string}_wrote_a_post_{string}.js b/cypress/support/step_definitions/common/{string}_wrote_a_post_{string}.js similarity index 68% rename from cypress/integration/common/{string}_wrote_a_post_{string}.js rename to cypress/support/step_definitions/common/{string}_wrote_a_post_{string}.js index 42ac98028..0da055951 100644 --- a/cypress/integration/common/{string}_wrote_a_post_{string}.js +++ b/cypress/support/step_definitions/common/{string}_wrote_a_post_{string}.js @@ -1,4 +1,4 @@ -import { Given } from "cypress-cucumber-preprocessor/steps"; +import { Given } from "@badeball/cypress-cucumber-preprocessor"; Given('{string} wrote a post {string}', (author, title) => { cy.factory() @@ -7,4 +7,4 @@ Given('{string} wrote a post {string}', (author, title) => { }, { authorId: author, }); -}); \ No newline at end of file +}); diff --git a/deployment/scripts/cluster.reseed.sh b/deployment/scripts/cluster.reseed.sh index 9aba0a353..4d544bfe8 100755 --- a/deployment/scripts/cluster.reseed.sh +++ b/deployment/scripts/cluster.reseed.sh @@ -15,4 +15,4 @@ echo "Using CONFIGURATION=${CONFIGURATION}" KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml} # clean & seed -kubectl --kubeconfig=${KUBECONFIG} -n default exec -it $(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js" \ No newline at end of file +kubectl --kubeconfig=${KUBECONFIG} -n default exec -it $(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await build/db/clean.js && node --experimental-repl-await build/db/seed.js" \ No newline at end of file diff --git a/deployment/src/kubernetes/README.md b/deployment/src/kubernetes/README.md index 0f7ecd20f..1c0c8e2d8 100644 --- a/deployment/src/kubernetes/README.md +++ b/deployment/src/kubernetes/README.md @@ -293,7 +293,7 @@ $ kubectl -n default rollout status deployment/ocelot-neo4j --timeout=240s $ kubectl config get-contexts # reset and seed Neo4j database via backend for staging -$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js" +$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await build/db/clean.js && node --experimental-repl-await build/db/seed.js" ``` diff --git a/package.json b/package.json index bc2cdfd62..5d27e155a 100644 --- a/package.json +++ b/package.json @@ -15,23 +15,24 @@ "scripts": { "db:seed": "cd backend && yarn run db:seed", "db:reset": "cd backend && yarn run db:reset", - "cypress:run": "cypress run --browser electron --config-file ./cypress/cypress.json", - "cypress:open": "cypress open --browser electron --config-file ./cypress/cypress.json", + "cypress:run": "cypress run --browser electron --config-file ./cypress/cypress.config.js", + "cypress:open": "cypress open --browser electron --config-file ./cypress/cypress.config.js", "cucumber:setup": "cd backend && yarn run dev", "cucumber": "wait-on tcp:4000 && cucumber-js --require-module @babel/register --exit", "release": "yarn version --no-git-tag-version --no-commit-hooks --no-commit && auto-changelog --latest-version $(node -p -e \"require('./package.json').version\") && cd backend && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp/maintenance/source && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../../../package.json').version\")" }, "devDependencies": { "@babel/core": "^7.21.8", - "@babel/preset-env": "^7.21.5", + "@babel/preset-env": "^7.22.4", "@babel/register": "^7.12.10", + "@badeball/cypress-cucumber-preprocessor": "^15.1.4", + "@cypress/browserify-preprocessor": "^3.0.2", "@faker-js/faker": "7.6.0", "auto-changelog": "^2.3.0", "bcryptjs": "^2.4.3", "cross-env": "^7.0.3", "cucumber": "^6.0.5", - "cypress": "^7.0.1", - "cypress-cucumber-preprocessor": "^2.2.1", + "cypress": "^12.6.0", "cypress-file-upload": "^3.5.3", "date-fns": "^2.30.0", "dotenv": "^8.2.0", diff --git a/webapp/assets/_new/styles/tokens.scss b/webapp/assets/_new/styles/tokens.scss index 863e0e0b7..22e0214ff 100644 --- a/webapp/assets/_new/styles/tokens.scss +++ b/webapp/assets/_new/styles/tokens.scss @@ -90,6 +90,9 @@ $background-color-primary-inverse: rgb(241, 253, 244); $background-color-secondary: rgb(0, 142, 230); $background-color-secondary-active: rgb(10, 161, 255); $background-color-secondary-inverse: rgb(240, 249, 255); +$background-color-third: rgb(126, 82, 204); +$background-color-third-active: rgb(160, 103, 255); +$background-color-third-inverse: rgb(239, 230, 255); $background-color-success: rgb(23, 181, 63); $background-color-success-active: rgb(26, 203, 71); $background-color-success-inverse: rgb(241, 253, 244); @@ -395,3 +398,12 @@ $color-toast-orange: $color-warning; $color-toast-yellow: $color-yellow; $color-toast-blue: $color-secondary; $color-toast-green: $color-success; + +/** + * @tokens Ribbon Color + */ + +$color-ribbon-event: $background-color-third; +$color-ribbon-event-active: $background-color-third-active; +$color-ribbon-article: $background-color-secondary; +$color-ribbon-article-active: $background-color-secondary-active; \ No newline at end of file diff --git a/webapp/components/FilterMenu/CategoriesFilter.vue b/webapp/components/FilterMenu/CategoriesFilter.vue index 8b96245fd..347994c9a 100644 --- a/webapp/components/FilterMenu/CategoriesFilter.vue +++ b/webapp/components/FilterMenu/CategoriesFilter.vue @@ -12,12 +12,12 @@