Skip to content

Commit

Permalink
Fix and burn flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
wlsf82 committed Nov 24, 2023
1 parent d20930b commit 18bdb94
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions cypress/e2e/gui/project/issueBoard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,31 @@ describe('Issue board', () => {
cy.sessionLogin()
})

it.skip('shows an open issue on the issue board, closes it, and shows it closed', () => {
cy.api_createIssue().as('issue')
cy.api_getAllProjects()
.then(function ({ body }) {
const { title, iid } = this.issue.body
const { name: projectName } = body[0]
Cypress._.times(10, () => {
it('shows an open issue on the issue board, closes it, and shows it closed', () => {
cy.api_createIssue().as('issue')
cy.api_getAllProjects()
.then(function ({ body }) {
const { title, iid } = this.issue.body
const { name: projectName } = body[0]

cy.visit(`${Cypress.env('user_name')}/${projectName}/-/boards`)
cy.intercept('PUT', `${Cypress.env('user_name')}/${projectName}/issues/**`)
.as('closeIssueRequest')

cy.contains('[data-board-type="backlog"] [data-qa-selector="board_card"]', title)
.should('be.visible')
cy.visit(`${Cypress.env('user_name')}/${projectName}/-/boards`)

cy.visit(`${Cypress.env('user_name')}/${projectName}/issues/${iid}`)
cy.get('.d-none.btn-close').click()
cy.contains('[data-board-type="backlog"] [data-qa-selector="board_card"]', title)
.should('be.visible')

cy.visit(`${Cypress.env('user_name')}/${projectName}/-/boards`)
cy.visit(`${Cypress.env('user_name')}/${projectName}/issues/${iid}`)
cy.get('.d-none.btn-close').click()
cy.wait('@closeIssueRequest')

cy.contains('[data-board-type="closed"] [data-qa-selector="board_card"]', title)
.should('be.visible')
})
cy.visit(`${Cypress.env('user_name')}/${projectName}/-/boards`)

cy.contains('[data-board-type="closed"] [data-qa-selector="board_card"]', title)
.should('be.visible')
})
})
})
})

0 comments on commit 18bdb94

Please sign in to comment.