From 402e879a256d379f63e37cc2c29f8f1ff64b860d Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Mon, 8 Apr 2024 20:01:41 +0200 Subject: [PATCH] chore: lint again --- .../view/view_dashboard/toggle_show_more_dashboards.js | 5 +---- .../view/view_errors/error_while_show_description.js | 10 +++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/cypress/integration/view/view_dashboard/toggle_show_more_dashboards.js b/cypress/integration/view/view_dashboard/toggle_show_more_dashboards.js index 2d78fceea..25579ee52 100644 --- a/cypress/integration/view/view_dashboard/toggle_show_more_dashboards.js +++ b/cypress/integration/view/view_dashboard/toggle_show_more_dashboards.js @@ -10,9 +10,6 @@ import { EXTENDED_TIMEOUT } from '../../../support/utils.js' const MIN_DASHBOARDS_BAR_HEIGHT = 71 const MAX_DASHBOARDS_BAR_HEIGHT = 431 -const RESP_CODE_200 = 200 -const RESP_CODE_201 = 201 - beforeEach(() => { cy.request({ method: 'PUT', @@ -21,7 +18,7 @@ beforeEach(() => { 'content-type': 'application/json', }, body: '1', - }).then((response) => expect(response.status).to.be.oneOf([RESP_CODE_201, RESP_CODE_200])) + }).then((response) => expect(response.status).to.be.oneOf([200, 201])) }) When('I toggle show more dashboards', () => { diff --git a/cypress/integration/view/view_errors/error_while_show_description.js b/cypress/integration/view/view_errors/error_while_show_description.js index c4aa937a9..367be68cd 100644 --- a/cypress/integration/view/view_errors/error_while_show_description.js +++ b/cypress/integration/view/view_errors/error_while_show_description.js @@ -3,10 +3,6 @@ import { getApiBaseUrl } from '../../../support/server/utils.js' // Error scenario -const RESP_CODE_200 = 200 -const RESP_CODE_201 = 201 -const RESP_CODE_FAIL = 409 - before(() => { //first ensure that the description is not currently shown cy.request({ @@ -16,12 +12,12 @@ before(() => { 'content-type': 'application/json', }, body: 'false', - }).then((response) => expect(response.status).to.be.oneOf([RESP_CODE_201, RESP_CODE_200])) + }).then((response) => expect(response.status).to.be.oneOf([200, 201])) }) When('clicking to show description fails', () => { cy.intercept('PUT', 'userDataStore/dashboard/showDescription', { - statusCode: RESP_CODE_FAIL, + statusCode: 409, }).as('showDescriptionFails') cy.get('button').contains('More').click() @@ -29,7 +25,7 @@ When('clicking to show description fails', () => { cy.wait('@showDescriptionFails') .its('response.statusCode') - .should('eq', RESP_CODE_FAIL) + .should('eq', 409) }) Then(