cypress group tests are now ts

This commit is contained in:
venarius 2021-11-24 12:43:04 +01:00
parent bec6122af0
commit 354716be34
3 changed files with 26 additions and 31 deletions

View File

@ -3,7 +3,8 @@
"baseUrl": "http://localhost:8088",
"testFiles": [
"**/login*.ts",
"**/create*.ts"
"**/create*.ts",
"**/manage*.ts"
],
"env": {
"username": "test-user",

View File

@ -1,30 +0,0 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
/* eslint-disable max-nested-callbacks */
/// <reference types="Cypress" />
describe('Manage groups', () => {
beforeEach(() => {
localStorage.setItem('focalboardSessionId', 'TESTTOKEN');
localStorage.setItem('language', 'en');
cy.expect(localStorage.getItem('focalboardSessionId')).to.eq('TESTTOKEN');
localStorage.setItem('welcomePageViewed', 'true');
});
it('MM-T4284 Adding a group', () => {
cy.visit('/');
cy.contains('+ Add board').click({force: true});
cy.contains('Empty board').click({force: true});
cy.contains('+ Add a group').click({force: true});
cy.get(`.KanbanColumnHeader .Editable[value='New group']`).should('exist');
cy.get(`.KanbanColumnHeader .Editable[value='New group']`).
clear().
type('Group 1').
blur();
cy.get(`.KanbanColumnHeader .Editable[value='Group 1']`).should('exist');
});
});

View File

@ -0,0 +1,24 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
describe('Manage groups', () => {
beforeEach(() => {
cy.apiInitServer()
localStorage.setItem('welcomePageViewed', 'true')
})
it('MM-T4284 Adding a group', () => {
cy.visit('/')
cy.contains('+ Add board').click({force: true})
cy.contains('Empty board').click({force: true})
cy.contains('+ Add a group').click({force: true})
cy.get(`.KanbanColumnHeader .Editable[value='New group']`).should('exist')
cy.get(`.KanbanColumnHeader .Editable[value='New group']`).
clear().
type('Group 1').
blur()
cy.get(`.KanbanColumnHeader .Editable[value='Group 1']`).should('exist')
})
})