mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
fix: Move content into to frontend directory
Doing this BEFORE the merge prevents a lot of merge conflicts. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
4e18ce38f3
commit
762a0a850e
1051 changed files with 0 additions and 35 deletions
38
frontend/cypress/support/visit.ts
Normal file
38
frontend/cypress/support/visit.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { testNoteId } from './visit-test-editor'
|
||||
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
visitTestNote(pageMode?: PAGE_MODE, query?: string): Chainable<Cypress.AUTWindow>
|
||||
|
||||
visitHome(): Chainable<Cypress.AUTWindow>
|
||||
|
||||
visitHistory(): Chainable<Cypress.AUTWindow>
|
||||
}
|
||||
}
|
||||
|
||||
Cypress.Commands.add('visitHome', () => {
|
||||
return cy.visit('/', { retryOnNetworkFailure: true, retryOnStatusCodeFailure: true })
|
||||
})
|
||||
|
||||
Cypress.Commands.add('visitHistory', () => {
|
||||
return cy.visit(`/history`, { retryOnNetworkFailure: true, retryOnStatusCodeFailure: true })
|
||||
})
|
||||
|
||||
export enum PAGE_MODE {
|
||||
EDITOR = 'n',
|
||||
PRESENTATION = 'p',
|
||||
DOCUMENT_READ_ONLY = 's'
|
||||
}
|
||||
|
||||
Cypress.Commands.add('visitTestNote', (pageMode: PAGE_MODE = PAGE_MODE.EDITOR, query?: string) => {
|
||||
return cy.visit(`/${pageMode}/${testNoteId}${query ? `?${query}` : ''}`, {
|
||||
retryOnNetworkFailure: true,
|
||||
retryOnStatusCodeFailure: true
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue