diff --git a/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js index 049eb8e72..707d5db7b 100644 --- a/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_the_author.js @@ -1,6 +1,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I click on the author', () => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('[data-test="avatarUserLink"]') .click() .url().should('include', '/profile/') diff --git a/cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js b/cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js index ce2e88a83..19a1db26f 100644 --- a/cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js +++ b/cypress/support/step_definitions/Post.Images/I_add_all_required_fields.js @@ -1,6 +1,7 @@ import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I add all required fields", () => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('input[name="title"]') .type('new post') .get(".editor .ProseMirror") diff --git a/cypress/support/step_definitions/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 index 478851f92..d9536d1dc 100644 --- a/cypress/support/step_definitions/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,3 +1,5 @@ +/* eslint-disable cypress/unsafe-to-chain-command */ +/* eslint-disable cypress/no-unnecessary-waiting */ import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should be able to {string} a teaser image", condition => { diff --git a/cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js b/cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js index 796820ba0..8c1c525d0 100644 --- a/cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js +++ b/cypress/support/step_definitions/Search/I_type_{string}_and_press_Enter.js @@ -1,6 +1,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I type {string} and press Enter", value => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get(".searchable-input .ds-select input") .focus() .type(value) diff --git a/cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js b/cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js index 3e2e67be8..3d1c6406f 100644 --- a/cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js +++ b/cypress/support/step_definitions/Search/I_type_{string}_and_press_escape.js @@ -1,6 +1,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I type {string} and press escape", value => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get(".searchable-input .ds-select input") .focus() .type(value) diff --git a/cypress/support/step_definitions/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 index 7d47c48aa..6c3aeda74 100644 --- a/cypress/support/step_definitions/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 @@ -7,6 +7,7 @@ Then("the search should contain the annoying user", () => { }) cy.get(".ds-select-dropdown .user-teaser .slug") .should("contain", '@annoying-user'); + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get(".searchable-input .ds-select input") .focus() .type("{esc}"); diff --git a/cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js b/cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js index af0c6639b..020bd6f00 100644 --- a/cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js +++ b/cypress/support/step_definitions/UserProfile.ChangePassword/I_fill_the_password_form_with.js @@ -2,6 +2,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I fill the password form with:", table => { table = table.rowsHash(); + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get("input[id=oldPassword]") .type(table["Your old password"]) .get("input[id=password]") diff --git a/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 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 index c5dd84bf0..5053d6d6c 100644 --- a/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 +++ 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 @@ -4,6 +4,7 @@ Then('I can see my new name {string} when I click on my profile picture in the t cy.get(".avatar-menu").then(($menu) => { if (!$menu.is(':visible')){ cy.scrollTo("top"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); } }) diff --git a/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js index f0f6ba4da..2f6af3b76 100644 --- a/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_have_the_following_self-description.js @@ -1,9 +1,11 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I have the following self-description:', text => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('textarea[id=about]') .clear() .type(text) + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('[type=submit]') .click() .not('[disabled]') diff --git a/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js index 00d5141f8..13d2312d2 100644 --- a/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js +++ b/cypress/support/step_definitions/UserProfile.NameDescriptionLocation/I_save_{string}_as_my_location.js @@ -5,6 +5,7 @@ When('I save {string} as my location', location => { cy.get('.ds-select-option') .contains(location) .click() + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('[type=submit]') .click() .not('[disabled]') diff --git a/cypress/support/step_definitions/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 index b94683a5b..b3a8c5760 100644 --- a/cypress/support/step_definitions/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,9 +1,11 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I save {string} as my new name', name => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('input[id=name]') .clear() .type(name) + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('[type=submit]') .click() .not('[disabled]') diff --git a/cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js index eab8ba0d6..75a380a7d 100644 --- a/cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_add_a_social_media_link.js @@ -1,6 +1,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I add a social media link', () => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('[data-test="add-save-button"]') .click() .get('#editSocialMedia') diff --git a/cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js index 72d83c9a3..fd7583c6d 100644 --- a/cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_can_cancel_editing.js @@ -1,6 +1,7 @@ import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then('I can cancel editing', () => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('button#cancel') .click() .get('input#editSocialMedia') diff --git a/cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js b/cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js index 3cec61688..6604cd730 100644 --- a/cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js +++ b/cypress/support/step_definitions/UserProfile.SocialMedia/I_edit_and_save_the_link.js @@ -1,6 +1,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When('I edit and save the link', () => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get('input#editSocialMedia') .clear() .type('https://freeradical.zone/tinkerbell') 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 index b1eb698de..0060ec750 100644 --- 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 @@ -1,6 +1,7 @@ import { Given } from "@badeball/cypress-cucumber-preprocessor"; Given('I have added a social media link', () => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.visit('/settings/my-social-media') .get('button') .contains('Add link') diff --git a/cypress/support/step_definitions/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 index d0daab843..c44200f25 100644 --- a/cypress/support/step_definitions/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,6 +1,7 @@ import { Given } from "@badeball/cypress-cucumber-preprocessor"; Given('I have added the social media link {string}', (link) => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.visit('/settings/my-social-media') .get('[data-test="add-save-button"]') .click() diff --git a/cypress/support/step_definitions/common/I_click_on_{string}.js b/cypress/support/step_definitions/common/I_click_on_{string}.js index 9d51f27f7..234890b6c 100644 --- a/cypress/support/step_definitions/common/I_click_on_{string}.js +++ b/cypress/support/step_definitions/common/I_click_on_{string}.js @@ -13,6 +13,7 @@ When("I click on {string}", element => { 'Moderation': 'a[href="/moderation"]', } + // eslint-disable-next-line cypress/no-unnecessary-waiting, cypress/unsafe-to-chain-command cy.get(elementSelectors[element]) .click() .wait(750); diff --git a/cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js b/cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js index 3c0b0d02e..f388d8e6a 100644 --- a/cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js +++ b/cypress/support/step_definitions/common/I_fill_in_my_credentials_{string}_{string}.js @@ -1,6 +1,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor"; When("I fill in my credentials {string} {string}", (email,password) => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get("input[name=email]") .trigger("focus") .type('{selectall}{backspace}') diff --git a/cypress/support/step_definitions/common/I_log_out.js b/cypress/support/step_definitions/common/I_log_out.js index c97506535..234ef8e2e 100644 --- a/cypress/support/step_definitions/common/I_log_out.js +++ b/cypress/support/step_definitions/common/I_log_out.js @@ -4,6 +4,7 @@ When("I log out", () => { cy.get(".avatar-menu").then(($menu) => { if (!$menu.is(':visible')){ cy.scrollTo("top"); + // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(500); } }) diff --git a/cypress/support/step_definitions/common/I_search_for_{string}.js b/cypress/support/step_definitions/common/I_search_for_{string}.js index f91959182..f603446ca 100644 --- a/cypress/support/step_definitions/common/I_search_for_{string}.js +++ b/cypress/support/step_definitions/common/I_search_for_{string}.js @@ -5,6 +5,7 @@ When("I search for {string}", value => { method: "POST", url: "http://localhost:3000/api", }).as("graphqlRequest"); + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.get(".searchable-input .ds-select input") .focus() .type(value);