1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00
focalboard/webapp/cypress/integration/manageGroups.ts

55 lines
1.9 KiB
TypeScript
Raw Normal View History

2021-11-24 13:43:04 +02:00
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
describe('Manage groups', () => {
beforeEach(() => {
cy.apiInitServer()
cy.apiResetBoards()
2021-11-24 13:43:04 +02:00
localStorage.setItem('welcomePageViewed', 'true')
})
it('MM-T4284 Adding a group', () => {
// Visit a page and create new empty board
2021-11-24 13:43:04 +02:00
cy.visit('/')
cy.uiCreateEmptyBoard()
2021-11-24 13:43:04 +02:00
cy.contains('+ Add a group').click({force: true})
2021-11-24 14:24:14 +02:00
cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('exist')
2021-11-24 13:43:04 +02:00
2021-11-24 14:24:14 +02:00
cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').
2021-11-24 13:43:04 +02:00
clear().
type('Group 1').
blur()
2021-11-24 14:24:14 +02:00
cy.get('.KanbanColumnHeader .Editable[value=\'Group 1\']').should('exist')
2021-11-24 13:43:04 +02:00
})
it('MM-T4285 Adding group color', () => {
// Visit a page and create new empty board
cy.visit('/')
cy.uiCreateEmptyBoard()
cy.contains('+ Add a group').click({force: true})
cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('exist')
cy.get('.KanbanColumnHeader').last().within(() => {
cy.get('.icon-dots-horizontal').click({force: true})
cy.get('.menu-options').should('exist').within(() => {
cy.contains('Hide').should('exist')
cy.contains('Delete').should('exist')
// Some colours
cy.contains('Brown').should('exist')
cy.contains('Gray').should('exist')
cy.contains('Orange').should('exist')
// Click on green
cy.contains('Green').should('be.visible').click().wait(1000) // eslint-disable-line cypress/no-unnecessary-waiting
})
})
cy.get('.KanbanColumnHeader').last().within(() => {
cy.get('.Label.propColorGreen').should('exist')
})
})
2021-11-24 13:43:04 +02:00
})