mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 05:54:43 -04:00
Reorganize redux and hooks (1/4) (#985)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
bdf8110676
commit
1b7abf9f27
61 changed files with 898 additions and 986 deletions
|
@ -26,3 +26,4 @@ import './config'
|
|||
import './fill'
|
||||
import './getMarkdownRenderer'
|
||||
import './login'
|
||||
import './visit-test-editor'
|
||||
|
|
33
cypress/support/visit-test-editor.ts
Normal file
33
cypress/support/visit-test-editor.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
visitTestEditor (query?: string): Chainable<Cypress.AUTWindow>
|
||||
}
|
||||
}
|
||||
|
||||
export const testNoteId = 'test'
|
||||
|
||||
Cypress.Commands.add('visitTestEditor', (query?: string) => {
|
||||
return cy.visit(`/n/${testNoteId}${query ? `?${query}` : ''}`)
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.intercept(`/api/v2/notes/${testNoteId}-get`, {
|
||||
"id": "ABC123",
|
||||
"alias": "banner",
|
||||
"lastChange": {
|
||||
"userId": "test",
|
||||
"timestamp": 1600033920
|
||||
},
|
||||
"viewCount": 0,
|
||||
"createTime": 1600033920,
|
||||
"content": "",
|
||||
"authorship": [],
|
||||
"preVersionTwoNote": true
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue