fix(frontend): make note details in redux optional

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-09-06 22:18:38 +02:00
parent 118f158ad1
commit 6698450461
50 changed files with 278 additions and 135 deletions

View file

@ -71,7 +71,7 @@ describe('Revision modal', () => {
cy.getByCypressId('sidebar.revision.modal').should('be.visible')
})
it('can download revisions', () => {
cy.intercept('GET', '/api/private/notes/mock-note/revisions/1', {
cy.intercept('GET', `/api/private/notes/${testNoteId}/revisions/1`, {
id: 1,
createdAt: defaultCreatedAt,
title: 'Features',
@ -86,7 +86,7 @@ describe('Revision modal', () => {
})
const downloadFolder = Cypress.config('downloadsFolder')
const fileName = `mock-note-${defaultCreatedAt.replace(/:/g, '_')}.md`
const fileName = `${testNoteId}-${defaultCreatedAt.replace(/:/g, '_')}.md`
const filePath = join(downloadFolder, fileName)
cy.getByCypressId('revision.modal.lists').contains(formattedDate).click()