fix cypress tests (#2628)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Scott Bishel 2022-03-24 11:24:18 -06:00 committed by GitHub
parent 66c2e7d352
commit 70ab1afecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -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
} }

View file

@ -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) {

View file

@ -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)
}) })