diff --git a/components/button/src/split-button/features/accepts_icon/index.js b/components/button/src/split-button/features/accepts_icon/index.js index d72b8ee807..9955d052db 100644 --- a/components/button/src/split-button/features/accepts_icon/index.js +++ b/components/button/src/split-button/features/accepts_icon/index.js @@ -6,9 +6,11 @@ Given('a SplitButton with an icon is rendered', () => { }) Then('the icon is visible on the left button only', () => { - cy.get('[data-test="dhis2-uicore-splitbutton-button"] :contains("Icon")') - .should('be.visible') + cy.get( + '[data-test="dhis2-uicore-splitbutton-button"] :contains("Icon")' + ).should('be.visible') - cy.get('[data-test="dhis2-uicore-splitbutton-toggle"] :contains("Icon")') - .should('not.exist') + cy.get( + '[data-test="dhis2-uicore-splitbutton-toggle"] :contains("Icon")' + ).should('not.exist') }) diff --git a/components/select/src/multi-select/features/allows_selecting/index.js b/components/select/src/multi-select/features/allows_selecting/index.js index 1a3d50a1a2..1459bcfbd4 100644 --- a/components/select/src/multi-select/features/allows_selecting/index.js +++ b/components/select/src/multi-select/features/allows_selecting/index.js @@ -20,7 +20,9 @@ When('an option is clicked', () => { }) When('the selected option is clicked', () => { - cy.get('[data-test="dhis2-uicore-multiselectoption"]:contains("option one")').click() + cy.get( + '[data-test="dhis2-uicore-multiselectoption"]:contains("option one")' + ).click() }) When('another option is clicked', () => { @@ -36,7 +38,9 @@ When('the disabled option is clicked', () => { }) When('the selected option is clicked again', () => { - cy.get('[data-test="dhis2-uicore-multiselectoption"]:contains("option one")').click() + cy.get( + '[data-test="dhis2-uicore-multiselectoption"]:contains("option one")' + ).click() }) Then('the clicked option is selected', () => { diff --git a/components/select/src/single-select/features/duplicate_option_values/index.js b/components/select/src/single-select/features/duplicate_option_values/index.js index 7e95ecfd93..9171195d6b 100644 --- a/components/select/src/single-select/features/duplicate_option_values/index.js +++ b/components/select/src/single-select/features/duplicate_option_values/index.js @@ -17,9 +17,11 @@ Then( } ) Then('both options are highlighted in the dropdown', () => { - cy.get('[data-test="dhis2-uicore-singleselectoption"]:contains("option one")') - .should('have.class', 'active') + cy.get( + '[data-test="dhis2-uicore-singleselectoption"]:contains("option one")' + ).should('have.class', 'active') - cy.get('[data-test="dhis2-uicore-singleselectoption"]:contains("option one a")') - .should('have.class', 'active') + cy.get( + '[data-test="dhis2-uicore-singleselectoption"]:contains("option one a")' + ).should('have.class', 'active') }) diff --git a/components/transfer/src/features/reorder-with-buttons/index.js b/components/transfer/src/features/reorder-with-buttons/index.js index 1f8426e212..b357059b4e 100644 --- a/components/transfer/src/features/reorder-with-buttons/index.js +++ b/components/transfer/src/features/reorder-with-buttons/index.js @@ -21,7 +21,7 @@ Given('the {int}. item is highlighted', (previousPisition) => { .invoke('attr', 'data-value') // For some reason, using `.as()` directly doesn't work. // Wrapping it inside a `.then` works though - .then(previousValue => cy.wrap(previousValue).as('previousValue')) + .then((previousValue) => cy.wrap(previousValue).as('previousValue')) cy.get('{transfer-pickedoptions} {transferoption}') .eq(index) @@ -55,7 +55,7 @@ Then('the highlighted item should be moved to the {int}. place', (next) => { const index = next - 1 cy.get('@previousValue') - .then(previousValue => cy.get(`[data-value="${previousValue}"]`)) + .then((previousValue) => cy.get(`[data-value="${previousValue}"]`)) .invoke('index') .should('equal', index) }) diff --git a/cypress/support/find.js b/cypress/support/find.js index 03eeb2f7b1..cc6b0e8dd9 100644 --- a/cypress/support/find.js +++ b/cypress/support/find.js @@ -16,9 +16,11 @@ import { parseSelectorWithDataTest } from './common/parseSelectorWithDataTest.js * cy.get('.foo').find('{node} input', 'custom-prefix') * cy.get('.foo').find('[data-test="custom-prefix-node"] input') */ -// eslint-disable-next-line max-params -Cypress.Commands.overwriteQuery('find', function (originalFn, selectors, options = {}) { - const { prefix, ...restOptions } = options - const selector = parseSelectorWithDataTest(selectors, prefix) - return originalFn.call(this, selector, restOptions) -}) +Cypress.Commands.overwriteQuery( + 'find', + function (originalFn, selectors, options = {}) { + const { prefix, ...restOptions } = options + const selector = parseSelectorWithDataTest(selectors, prefix) + return originalFn.call(this, selector, restOptions) + } +) diff --git a/cypress/support/get.js b/cypress/support/get.js index 72947b68f4..a67b705183 100644 --- a/cypress/support/get.js +++ b/cypress/support/get.js @@ -15,8 +15,11 @@ import { parseSelectorWithDataTest } from './common/parseSelectorWithDataTest.js * cy.get('{node} {node} input', 'custom-prefix') * cy.get('[data-test="custom-prefix-node"] [data-test="custom-prefix-node"] input') */ -Cypress.Commands.overwriteQuery('get', function (originalFn, selectors, options = {}) { - const { prefix, ...restOptions } = options - const selector = parseSelectorWithDataTest(selectors, prefix) - return originalFn.call(this, selector, restOptions) -}) +Cypress.Commands.overwriteQuery( + 'get', + function (originalFn, selectors, options = {}) { + const { prefix, ...restOptions } = options + const selector = parseSelectorWithDataTest(selectors, prefix) + return originalFn.call(this, selector, restOptions) + } +)