Skip to content

Commit

Permalink
chore: lint again
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Apr 8, 2024
1 parent 4691488 commit 402e879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -16,20 +12,20 @@ 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()
cy.contains('Show description').click()

cy.wait('@showDescriptionFails')
.its('response.statusCode')
.should('eq', RESP_CODE_FAIL)
.should('eq', 409)
})

Then(
Expand Down

0 comments on commit 402e879

Please sign in to comment.