2020-11-22 20:50:07 +00:00
|
|
|
/*
|
2021-01-06 20:37:59 +00:00
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2020-11-22 20:50:07 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2020-07-16 09:22:53 +00:00
|
|
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
|
|
describe('Intro', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.visit('/')
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('Cover Button are hidden when logged in', () => {
|
|
|
|
it('Sign in Cover Button', () => {
|
|
|
|
cy.get('.cover-button.btn-success')
|
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Features Cover Button', () => {
|
|
|
|
cy.get('.cover-button.btn-primary')
|
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('Cover Button are shown when logged out', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.logout()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Sign in Cover Button', () => {
|
|
|
|
cy.get('.cover-button.btn-success')
|
|
|
|
.should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Features Cover Button', () => {
|
|
|
|
cy.get('.cover-button.btn-primary')
|
|
|
|
.should('exist')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
2020-12-16 22:07:09 +00:00
|
|
|
it('Version can be opened and closed', () => {
|
2020-11-28 10:51:40 +00:00
|
|
|
cy.get('#versionModal')
|
|
|
|
.should('not.exist')
|
|
|
|
cy.get('#version')
|
|
|
|
.click()
|
|
|
|
cy.get('#versionModal')
|
|
|
|
.should('be.visible')
|
|
|
|
cy.get('#versionModal .modal-footer .btn')
|
|
|
|
.contains('Close')
|
|
|
|
.click()
|
|
|
|
cy.get('#versionModal')
|
|
|
|
.should('not.exist')
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
})
|