2021-11-24 12:43:04 +01:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
|
|
// See LICENSE.txt for license information.
|
|
|
|
|
|
|
|
describe('Manage groups', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.apiInitServer()
|
2021-12-15 17:57:58 +01:00
|
|
|
cy.apiResetBoards()
|
2022-02-28 12:28:16 +01:00
|
|
|
cy.apiGetMe().then((userID) => cy.apiSkipTour(userID))
|
2021-11-24 12:43:04 +01:00
|
|
|
localStorage.setItem('welcomePageViewed', 'true')
|
2022-04-06 16:22:47 +02:00
|
|
|
localStorage.setItem('language', 'en')
|
2021-11-24 12:43:04 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
it('MM-T4284 Adding a group', () => {
|
2022-01-07 19:58:28 +01:00
|
|
|
// Visit a page and create new empty board
|
2021-11-24 12:43:04 +01:00
|
|
|
cy.visit('/')
|
2022-02-02 09:38:57 +01:00
|
|
|
cy.uiCreateEmptyBoard()
|
2021-11-24 12:43:04 +01:00
|
|
|
|
|
|
|
cy.contains('+ Add a group').click({force: true})
|
2021-11-24 13:24:14 +01:00
|
|
|
cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('exist')
|
2021-11-24 12:43:04 +01:00
|
|
|
|
2021-11-24 13:24:14 +01:00
|
|
|
cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').
|
2021-11-24 12:43:04 +01:00
|
|
|
clear().
|
|
|
|
type('Group 1').
|
|
|
|
blur()
|
2021-11-24 13:24:14 +01:00
|
|
|
cy.get('.KanbanColumnHeader .Editable[value=\'Group 1\']').should('exist')
|
2021-11-24 12:43:04 +01:00
|
|
|
})
|
2021-12-07 22:33:45 +01:00
|
|
|
|
|
|
|
it('MM-T4285 Adding group color', () => {
|
2022-01-07 19:58:28 +01:00
|
|
|
// Visit a page and create new empty board
|
2021-12-07 22:33:45 +01:00
|
|
|
cy.visit('/')
|
2022-02-02 09:38:57 +01:00
|
|
|
cy.uiCreateEmptyBoard()
|
2021-12-07 22:33:45 +01:00
|
|
|
|
|
|
|
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
|
2022-01-07 19:58:28 +01:00
|
|
|
cy.contains('Green').should('be.visible').click().wait(1000) // eslint-disable-line cypress/no-unnecessary-waiting
|
2021-12-07 22:33:45 +01:00
|
|
|
})
|
2022-01-07 19:58:28 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
cy.get('.KanbanColumnHeader').last().within(() => {
|
2021-12-07 22:33:45 +01:00
|
|
|
cy.get('.Label.propColorGreen').should('exist')
|
|
|
|
})
|
|
|
|
})
|
2021-11-24 12:43:04 +01:00
|
|
|
})
|