mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-23 14:11:47 +00:00
dccd58f0c1
With this commit we drop the subpath support which results in the constraint that HedgeDoc must always run on the root of a domain. This makes a lot of things in testing, rendering and security much easier. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
39 lines
1,008 B
TypeScript
39 lines
1,008 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
describe('Intro page', () => {
|
|
beforeEach(() => {
|
|
cy.intercept('/public/intro.md', 'test content')
|
|
cy.visitHome()
|
|
})
|
|
|
|
describe('customizable content', () => {
|
|
it('fetches and shows the correct intro page content', () => {
|
|
cy.getSimpleRendererBody().contains('test content')
|
|
})
|
|
|
|
it("won't show anything if no content was found", () => {
|
|
cy.intercept('/public/intro.md', {
|
|
statusCode: 404
|
|
})
|
|
cy.visitHome()
|
|
|
|
cy.getByCypressId('documentIframe').should('not.exist')
|
|
})
|
|
})
|
|
|
|
describe('sign in button', () => {
|
|
it('is hidden when logged in', () => {
|
|
cy.getByCypressId('sign-in-button').should('not.exist')
|
|
})
|
|
|
|
it('is visible when logged out', () => {
|
|
cy.logout()
|
|
cy.getByCypressId('sign-in-button').should('exist')
|
|
})
|
|
})
|
|
})
|