fix cypress tests (#2628)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
parent
66c2e7d352
commit
70ab1afecd
3 changed files with 4 additions and 7 deletions
|
@ -27,9 +27,7 @@ func New(store permissions.Store, logger *mlog.Logger) *Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Service) HasPermissionToTeam(userID, teamID string, permission *mmModel.Permission) bool {
|
func (s *Service) HasPermissionToTeam(userID, teamID string, permission *mmModel.Permission) bool {
|
||||||
if userID == "" || teamID == "" || permission == nil {
|
// Locally there is no team, so return true
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,8 @@ Cypress.Commands.add('apiChangePassword', (userId: string, oldPassword: string,
|
||||||
|
|
||||||
Cypress.Commands.add('uiCreateNewBoard', (title?: string) => {
|
Cypress.Commands.add('uiCreateNewBoard', (title?: string) => {
|
||||||
cy.log('**Create new empty board**')
|
cy.log('**Create new empty board**')
|
||||||
cy.findByText('+ Add board').click()
|
cy.uiCreateEmptyBoard()
|
||||||
cy.get('.empty-board').first().click({force: true})
|
|
||||||
cy.findByPlaceholderText('Untitled board').should('exist')
|
cy.findByPlaceholderText('Untitled board').should('exist')
|
||||||
cy.wait(10)
|
cy.wait(10)
|
||||||
if (title) {
|
if (title) {
|
||||||
|
|
|
@ -16,7 +16,6 @@ Cypress.Commands.add('uiCreateBoard', (item: string) => {
|
||||||
Cypress.Commands.add('uiCreateEmptyBoard', () => {
|
Cypress.Commands.add('uiCreateEmptyBoard', () => {
|
||||||
cy.log('Create new empty board')
|
cy.log('Create new empty board')
|
||||||
|
|
||||||
cy.contains('+ Add board').should('be.visible').click()
|
cy.contains('+ Add board').should('be.visible').click().wait(500)
|
||||||
|
|
||||||
return cy.contains('Create empty board').click({force: true}).wait(1000)
|
return cy.contains('Create empty board').click({force: true}).wait(1000)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue