mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
feat: merge login, register and intro page
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
76ef2511e7
commit
56643ffd85
39 changed files with 533 additions and 374 deletions
|
@ -8,7 +8,9 @@ import { HttpMethod } from '../../src/handler-utils/respond-to-matching-request'
|
|||
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
loadConfig(): Chainable<Window>
|
||||
loadConfig(additionalConfig?: Partial<typeof config>): Chainable<Window>,
|
||||
logIn: Chainable<Window>,
|
||||
logOut: Chainable<Window>
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,8 +86,17 @@ Cypress.Commands.add('loadConfig', (additionalConfig?: Partial<typeof config>) =
|
|||
return cy.request(HttpMethod.POST, '/api/private/config', { ...config, ...additionalConfig })
|
||||
})
|
||||
|
||||
Cypress.Commands.add('logIn', () => {
|
||||
return cy.setCookie('mock-session', '1', { path: '/' })
|
||||
})
|
||||
|
||||
Cypress.Commands.add('logOut', () => {
|
||||
return cy.clearCookie('mock-session')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.loadConfig()
|
||||
cy.logIn()
|
||||
|
||||
cy.intercept('GET', '/public/motd.md', {
|
||||
body: '404 Not Found!',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue