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
|
@ -24,7 +24,7 @@ describe('History', () => {
|
|||
describe('is as given when not empty', () => {
|
||||
beforeEach(() => {
|
||||
cy.clearLocalStorage('history')
|
||||
cy.intercept('GET', '/mock-backend/api/private/me/history', {
|
||||
cy.intercept('GET', '/api/mock-backend/private/me/history', {
|
||||
body: [
|
||||
{
|
||||
identifier: 'cypress',
|
||||
|
@ -51,7 +51,7 @@ describe('History', () => {
|
|||
describe('is untitled when not empty', () => {
|
||||
beforeEach(() => {
|
||||
cy.clearLocalStorage('history')
|
||||
cy.intercept('GET', '/mock-backend/api/private/me/history', {
|
||||
cy.intercept('GET', '/api/mock-backend/private/me/history', {
|
||||
body: [
|
||||
{
|
||||
identifier: 'cypress-no-title',
|
||||
|
@ -84,7 +84,7 @@ describe('History', () => {
|
|||
|
||||
describe('working', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('PUT', '/mock-backend/api/private/me/history/features', (req) => {
|
||||
cy.intercept('PUT', '/api/mock-backend/private/me/history/features', (req) => {
|
||||
req.reply(200, req.body)
|
||||
})
|
||||
})
|
||||
|
@ -106,7 +106,7 @@ describe('History', () => {
|
|||
|
||||
describe('failing', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('PUT', '/mock-backend/api/private/me/history/features', {
|
||||
cy.intercept('PUT', '/api/mock-backend/private/me/history/features', {
|
||||
statusCode: 401
|
||||
})
|
||||
})
|
||||
|
@ -128,7 +128,7 @@ describe('History', () => {
|
|||
describe('Import', () => {
|
||||
beforeEach(() => {
|
||||
cy.clearLocalStorage('history')
|
||||
cy.intercept('GET', '/mock-backend/api/private/me/history', {
|
||||
cy.intercept('GET', '/api/mock-backend/private/me/history', {
|
||||
body: []
|
||||
})
|
||||
cy.visitHistory()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue