tests: add cypress tests for deck dashboard, boards, lists, cards

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2022-04-14 10:30:50 +02:00
parent 23ae20efe7
commit e6c2d85197
5 changed files with 157 additions and 20 deletions

View File

@@ -0,0 +1,35 @@
import { randHash } from '../utils'
const randUser = randHash()
describe('Stack', function () {
const board = 'TestBoard'
const password = 'pass123'
const stack = 'List 1'
before(function () {
cy.nextcloudCreateUser(randUser, password)
cy.deckCreateBoard({ user: randUser, password }, board)
})
beforeEach(function() {
cy.logout()
cy.login(randUser, password)
})
it('Can create a stack', function () {
cy.get('.app-navigation button.app-navigation-toggle').click()
cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry')
.eq(1)
.find('.app-navigation-entry__children .app-navigation-entry a.app-navigation-entry-link')
.first().click({force: true})
cy.get('#stack-add button').first().click()
cy.get('#stack-add form input#new-stack-input-main')
.type(stack)
cy.get('#stack-add form input[type=submit]')
.first().click()
cy.get('.board .stack').eq(0).contains(stack).should('be.visible')
})
})