mirror of
https://github.com/mattermost/focalboard.git
synced 2025-03-29 21:01:01 +02:00
Fix cypress test: wait for getUser
request when adding new view to the board. (#3344)
This commit is contained in:
parent
22aae37dd1
commit
bcd47eada1
@ -72,7 +72,6 @@ describe('Card URL Property', () => {
|
||||
cy.findByRole('button', {name: 'Edit'}).should('exist')
|
||||
cy.findByRole('button', {name: 'Copy'}).should('not.exist')
|
||||
|
||||
/*
|
||||
// Add gallery view
|
||||
addView('Gallery')
|
||||
showURLProperty()
|
||||
@ -82,7 +81,6 @@ describe('Card URL Property', () => {
|
||||
cy.findByRole('link', {name: changedURL}).realHover()
|
||||
cy.findByRole('button', {name: 'Edit'}).should('not.exist')
|
||||
cy.findByRole('button', {name: 'Copy'}).should('exist')
|
||||
*/
|
||||
|
||||
// Add calendar view
|
||||
addView('Calendar')
|
||||
@ -99,9 +97,13 @@ describe('Card URL Property', () => {
|
||||
|
||||
const addView = (type: ViewType) => {
|
||||
cy.log(`**Add ${type} view**`)
|
||||
// Intercept and wait for getUser request because it is the last one in the effects for BoardPage
|
||||
// After this last request the BoardPage component will not have additional rerenders
|
||||
cy.intercept('GET', '/api/v2/users/u*').as('getUser')
|
||||
cy.findByRole('button', {name: 'View menu'}).click()
|
||||
cy.findByText('Add view').realHover()
|
||||
cy.findByRole('button', {name: type}).click()
|
||||
cy.wait('@getUser')
|
||||
cy.findByRole('textbox', {name: `${type} view`}).should('exist')
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user