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
|
|
|
import '../support/index'
|
|
|
|
|
|
|
|
describe('Links Intro', () => {
|
|
|
|
beforeEach(() => {
|
2022-01-30 20:46:43 +00:00
|
|
|
cy.visitHome()
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
it('History', () => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('navLinkHistory').click()
|
2021-11-19 17:04:04 +00:00
|
|
|
cy.url().should('include', '/history')
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('navLinkIntro').click()
|
2021-11-19 17:04:04 +00:00
|
|
|
cy.url().should('include', '/intro')
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
describe('Menu Buttons logged out', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.logout()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('New guest note', () => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('new-guest-note-button').click()
|
2021-11-19 17:04:04 +00:00
|
|
|
cy.url().should('include', '/new')
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('Menu Buttons logged in', () => {
|
|
|
|
it('New note', () => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('new-note-button').click()
|
2021-11-19 17:04:04 +00:00
|
|
|
cy.url().should('include', '/new')
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
describe('User Menu', () => {
|
|
|
|
beforeEach(() => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('user-dropdown').click()
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
it('Features', () => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('user-dropdown-features-button').click()
|
2021-11-19 17:04:04 +00:00
|
|
|
cy.url().should('include', '/features')
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
|
2021-03-09 22:00:14 +00:00
|
|
|
it('Profile', () => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('user-dropdown-profile-button').click()
|
2021-11-19 17:04:04 +00:00
|
|
|
cy.url().should('include', '/profile')
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|