mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Adapt react-client to use the real backend API (#1545)
Co-authored-by: Philip Molares <philip.molares@udo.edu> Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
3399ed2023
commit
26f90505ff
227 changed files with 4726 additions and 2310 deletions
|
@ -4,14 +4,16 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { testNoteId } from '../support/visit-test-editor'
|
||||
|
||||
describe('Delete note', () => {
|
||||
beforeEach(() => {
|
||||
cy.visitTestNote()
|
||||
})
|
||||
|
||||
it('correctly deletes a note', () => {
|
||||
cy.intercept('DELETE', '/mock-backend/api/private/notes/mock_note_id', {
|
||||
statusCode: 200
|
||||
cy.intercept('DELETE', `/api/mock-backend/private/notes/${testNoteId}`, {
|
||||
statusCode: 204
|
||||
})
|
||||
cy.getByCypressId('sidebar.deleteNote.button').click()
|
||||
cy.getByCypressId('sidebar.deleteNote.modal').should('be.visible')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue