disable cypress linting rules in files initially

This commit is contained in:
mahula 2025-05-04 17:33:41 +02:00
parent 354f29e038
commit 63a6254c54
20 changed files with 23 additions and 0 deletions

View File

@ -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/')

View File

@ -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")

View File

@ -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 => {

View File

@ -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)

View File

@ -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)

View File

@ -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}");

View File

@ -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]")

View File

@ -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);
}
})

View File

@ -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]')

View File

@ -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]')

View File

@ -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]')

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -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()

View File

@ -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);

View File

@ -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}')

View File

@ -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);
}
})

View File

@ -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);