mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
fix: correct test note in cypress environment
Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
c0d4d233da
commit
6786e6d6d3
2 changed files with 15 additions and 7 deletions
|
@ -3,6 +3,8 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
import type { Note } from '../../src/api/notes/types'
|
||||||
|
|
||||||
export const testNoteId = 'test'
|
export const testNoteId = 'test'
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -10,16 +12,22 @@ beforeEach(() => {
|
||||||
content: '',
|
content: '',
|
||||||
metadata: {
|
metadata: {
|
||||||
id: testNoteId,
|
id: testNoteId,
|
||||||
alias: ['mock-note'],
|
aliases: [
|
||||||
primaryAlias: 'mock-note',
|
{
|
||||||
|
name: 'mock-note',
|
||||||
|
primaryAlias: true,
|
||||||
|
noteId: testNoteId
|
||||||
|
}
|
||||||
|
],
|
||||||
|
primaryAddress: 'mock-note',
|
||||||
title: 'Mock Note',
|
title: 'Mock Note',
|
||||||
description: 'Mocked note for testing',
|
description: 'Mocked note for testing',
|
||||||
tags: ['test', 'mock', 'cypress'],
|
tags: ['test', 'mock', 'cypress'],
|
||||||
updateTime: '2021-04-24T09:27:51.000Z',
|
updatedAt: '2021-04-24T09:27:51.000Z',
|
||||||
updateUser: null,
|
updateUsername: null,
|
||||||
viewCount: 0,
|
viewCount: 0,
|
||||||
version: 2,
|
version: 2,
|
||||||
createTime: '2021-04-24T09:27:51.000Z',
|
createdAt: '2021-04-24T09:27:51.000Z',
|
||||||
editedBy: [],
|
editedBy: [],
|
||||||
permissions: {
|
permissions: {
|
||||||
owner: 'mock',
|
owner: 'mock',
|
||||||
|
@ -28,5 +36,5 @@ beforeEach(() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editedByAtPosition: []
|
editedByAtPosition: []
|
||||||
})
|
} as Note)
|
||||||
})
|
})
|
||||||
|
|
|
@ -47,7 +47,7 @@ const handler = (req: NextApiRequest, res: NextApiResponse): void => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editedByAtPosition: []
|
editedByAtPosition: []
|
||||||
})
|
} as Note)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default handler
|
export default handler
|
||||||
|
|
Loading…
Reference in a new issue