mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
tests(permissions): add cypress tests for permission alert icon
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
6d69b294cb
commit
5ccc9059f0
7 changed files with 182 additions and 28 deletions
18
frontend/src/pages/api/private/users/mock.ts
Normal file
18
frontend/src/pages/api/private/users/mock.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import type { UserInfo } from '../../../../api/users/types'
|
||||
import { HttpMethod, respondToMatchingRequest } from '../../../../handler-utils/respond-to-matching-request'
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
const handler = (req: NextApiRequest, res: NextApiResponse): void => {
|
||||
respondToMatchingRequest<UserInfo>(HttpMethod.GET, req, res, {
|
||||
username: 'mock',
|
||||
displayName: 'Mock User',
|
||||
photoUrl: ''
|
||||
})
|
||||
}
|
||||
|
||||
export default handler
|
Loading…
Add table
Add a link
Reference in a new issue