2021-02-01 16:55:49 -05:00
|
|
|
/*
|
2023-03-25 07:36:26 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
2021-02-01 16:55:49 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
2023-04-05 05:10:44 -04:00
|
|
|
import type { Note } from '../../src/api/notes/types'
|
|
|
|
|
2021-02-01 16:55:49 -05:00
|
|
|
export const testNoteId = 'test'
|
|
|
|
|
|
|
|
beforeEach(() => {
|
2022-09-16 05:03:29 -04:00
|
|
|
cy.intercept(`api/private/notes/${testNoteId}`, {
|
2021-11-19 12:04:04 -05:00
|
|
|
content: '',
|
|
|
|
metadata: {
|
2022-04-15 17:03:15 -04:00
|
|
|
id: testNoteId,
|
2023-04-05 05:10:44 -04:00
|
|
|
aliases: [
|
|
|
|
{
|
|
|
|
name: 'mock-note',
|
|
|
|
primaryAlias: true,
|
|
|
|
noteId: testNoteId
|
|
|
|
}
|
|
|
|
],
|
|
|
|
primaryAddress: 'mock-note',
|
2022-04-15 17:03:15 -04:00
|
|
|
title: 'Mock Note',
|
|
|
|
description: 'Mocked note for testing',
|
|
|
|
tags: ['test', 'mock', 'cypress'],
|
2023-04-05 05:10:44 -04:00
|
|
|
updatedAt: '2021-04-24T09:27:51.000Z',
|
|
|
|
updateUsername: null,
|
2022-04-15 17:03:15 -04:00
|
|
|
viewCount: 0,
|
|
|
|
version: 2,
|
2023-04-05 05:10:44 -04:00
|
|
|
createdAt: '2021-04-24T09:27:51.000Z',
|
2022-04-15 17:03:15 -04:00
|
|
|
editedBy: [],
|
|
|
|
permissions: {
|
2023-03-25 07:36:26 -04:00
|
|
|
owner: 'mock',
|
2022-04-15 17:03:15 -04:00
|
|
|
sharedToUsers: [],
|
|
|
|
sharedToGroups: []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
editedByAtPosition: []
|
2023-04-05 05:10:44 -04:00
|
|
|
} as Note)
|
2021-02-01 16:55:49 -05:00
|
|
|
})
|