2020-11-22 15:50:07 -05:00
|
|
|
/*
|
2021-01-06 15:37:59 -05:00
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2020-11-22 15:50:07 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2020-07-16 05:22:53 -04:00
|
|
|
import '../support/index'
|
|
|
|
|
|
|
|
describe('Links Intro', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.visit('/')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('History', () => {
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('navLinkHistory').click()
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.url().should('include', '/history')
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('navLinkIntro').click()
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.url().should('include', '/intro')
|
2020-07-16 05:22:53 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
describe('Menu Buttons logged out', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.logout()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('New guest note', () => {
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('new-guest-note-button').click()
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.url().should('include', '/new')
|
2020-07-16 05:22:53 -04:00
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('Menu Buttons logged in', () => {
|
|
|
|
it('New note', () => {
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('new-note-button').click()
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.url().should('include', '/new')
|
2020-07-16 05:22:53 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
describe('User Menu', () => {
|
|
|
|
beforeEach(() => {
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('user-dropdown').click()
|
2020-07-16 05:22:53 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
it('Features', () => {
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('user-dropdown-features-button').click()
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.url().should('include', '/features')
|
2020-07-16 05:22:53 -04:00
|
|
|
})
|
|
|
|
|
2021-03-09 17:00:14 -05:00
|
|
|
it('Profile', () => {
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('user-dropdown-profile-button').click()
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.url().should('include', '/profile')
|
2020-07-16 05:22:53 -04:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|