Files
deck/cypress/e2e/boardFeatures.js
Julius Härtl 5958632534 test(cypress): Move to @nextcloud/cypress
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-30 15:42:33 +01:00

42 lines
994 B
JavaScript

import { randUser } from '../utils/index.js'
const user = randUser()
describe('Board', function() {
before(function() {
cy.createUser(user)
})
beforeEach(function() {
cy.login(user)
cy.visit('/apps/deck')
})
it('Can create a board', function() {
const board = 'TestBoard'
cy.intercept({
method: 'POST',
url: '/index.php/apps/deck/boards',
}).as('createBoardRequest')
// Click "Add board"
cy.openLeftSidebar()
cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry')
.eq(3).find('a').first().click({ force: true })
// Type the board title
cy.get('.board-create form input[type=text]')
.type(board, { force: true })
// Submit
cy.get('.board-create form input[type=submit]')
.first().click({ force: true })
cy.wait('@createBoardRequest').its('response.statusCode').should('equal', 200)
cy.get('.app-navigation__list .app-navigation-entry__children .app-navigation-entry')
.contains(board).should('be.visible')
})
})