mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 07:15:07 +01:00
use global fixtures in e2e tests
This commit is contained in:
parent
ef48762da5
commit
bed03b301b
6 changed files with 51 additions and 103 deletions
|
|
@ -1,11 +1,9 @@
|
|||
describe('documents-list', () => {
|
||||
beforeEach(() => {
|
||||
// also uses global fixtures from cypress/support/e2e.ts
|
||||
|
||||
this.bulkEdits = {}
|
||||
|
||||
// mock API methods
|
||||
cy.intercept('http://localhost:8000/api/ui_settings/', {
|
||||
fixture: 'ui_settings/settings.json',
|
||||
})
|
||||
cy.fixture('documents/documents.json').then((documentsJson) => {
|
||||
// bulk edit
|
||||
cy.intercept(
|
||||
|
|
@ -56,22 +54,6 @@ describe('documents-list', () => {
|
|||
})
|
||||
})
|
||||
|
||||
cy.intercept('http://localhost:8000/api/documents/1/thumb/', {
|
||||
fixture: 'documents/lorem-ipsum.png',
|
||||
})
|
||||
|
||||
cy.intercept('http://localhost:8000/api/tags/*', {
|
||||
fixture: 'tags/tags.json',
|
||||
})
|
||||
|
||||
cy.intercept('http://localhost:8000/api/correspondents/*', {
|
||||
fixture: 'correspondents/correspondents.json',
|
||||
})
|
||||
|
||||
cy.intercept('http://localhost:8000/api/document_types/*', {
|
||||
fixture: 'document_types/doctypes.json',
|
||||
})
|
||||
|
||||
cy.viewport(1280, 1024)
|
||||
cy.visit('/documents')
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue