]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix fixture organization
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Thu, 24 Mar 2022 04:32:42 +0000 (21:32 -0700)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Wed, 30 Mar 2022 03:02:19 +0000 (20:02 -0700)
[ci skip]

src-ui/.gitignore
src-ui/cypress/fixtures/correspondents/correspondents.json [moved from src-ui/cypress/fixtures/manage/correspondents.json with 100% similarity]
src-ui/cypress/fixtures/document_types/doctypes.json [moved from src-ui/cypress/fixtures/documents/doctypes.json with 100% similarity]
src-ui/cypress/fixtures/documents/correspondents.json [deleted file]
src-ui/cypress/fixtures/manage/tags.json [deleted file]
src-ui/cypress/fixtures/saved_views/savedviews.json [moved from src-ui/cypress/fixtures/settings/savedviews.json with 100% similarity]
src-ui/cypress/fixtures/tags/tags.json [moved from src-ui/cypress/fixtures/documents/tags.json with 100% similarity]
src-ui/cypress/integration/documents-list.spec.ts
src-ui/cypress/integration/manage.spec.ts
src-ui/cypress/integration/settings.spec.ts

index 963d2f8eeb64e37be992479dbb49209ba708366e..5f427c51c4c5ed411a0eef812e9db67add619abc 100644 (file)
@@ -45,4 +45,7 @@ testem.log
 # System Files
 .DS_Store
 Thumbs.db
+
+# Cypress
 cypress/videos/**/*
+cypress/screenshots/**/*
diff --git a/src-ui/cypress/fixtures/documents/correspondents.json b/src-ui/cypress/fixtures/documents/correspondents.json
deleted file mode 100644 (file)
index 3337a26..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{"count":4,"next":"http://localhost:8000/api/correspondents/?page=2","previous":null,"results":[{"id":1,"slug":"abc-test-correspondent","name":"ABC Test Correspondent","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":13,"slug":"corresp-10","name":"Corresp 10","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":14,"slug":"corresp-11","name":"Corresp 11","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":15,"slug":"corresp-12","name":"Corresp 12","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null}]}
diff --git a/src-ui/cypress/fixtures/manage/tags.json b/src-ui/cypress/fixtures/manage/tags.json
deleted file mode 100644 (file)
index e48049f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{"count":8,"next":null,"previous":null,"results":[{"id":4,"slug":"another-sample-tag","name":"Another Sample Tag","color":"#a6cee3","text_color":"#000000","match":"","matching_algorithm":6,"is_insensitive":true,"is_inbox_tag":false,"document_count":3},{"id":7,"slug":"newone","name":"NewOne","color":"#9e4ad1","text_color":"#ffffff","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":2},{"id":6,"slug":"partial-tag","name":"Partial Tag","color":"#72dba7","text_color":"#000000","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":1},{"id":2,"slug":"tag-2","name":"Tag 2","color":"#612db7","text_color":"#ffffff","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":3},{"id":3,"slug":"tag-3","name":"Tag 3","color":"#b2df8a","text_color":"#000000","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":4},{"id":5,"slug":"tagwithpartial","name":"TagWithPartial","color":"#3b2db4","text_color":"#ffffff","match":"","matching_algorithm":6,"is_insensitive":true,"is_inbox_tag":false,"document_count":2},{"id":8,"slug":"test-another","name":"Test Another","color":"#3ccea5","text_color":"#000000","match":"","matching_algorithm":4,"is_insensitive":true,"is_inbox_tag":false,"document_count":0},{"id":1,"slug":"test-tag","name":"Test Tag","color":"#fb9a99","text_color":"#000000","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":4}]}
index 87889b9e91e6701a410bc27dd6acfa7a007a3c12..5b923ed2f42ffee85b355c857205dc5e1df6c8a5 100644 (file)
@@ -58,15 +58,15 @@ describe('documents-list', () => {
     })
 
     cy.intercept('http://localhost:8000/api/tags/*', {
-      fixture: 'documents/tags.json',
+      fixture: 'tags/tags.json',
     })
 
     cy.intercept('http://localhost:8000/api/correspondents/*', {
-      fixture: 'documents/correspondents.json',
+      fixture: 'correspondents/correspondents.json',
     })
 
     cy.intercept('http://localhost:8000/api/document_types/*', {
-      fixture: 'documents/doctypes.json',
+      fixture: 'document_types/doctypes.json',
     })
 
     cy.visit('/documents')
index d0ed8240cb90ccb4afdf427aa6c5e81b2edf1236..68562a744116e459bd23d77405304bb139aebc48 100644 (file)
@@ -1,10 +1,10 @@
 describe('documents-list', () => {
   beforeEach(() => {
     cy.intercept('http://localhost:8000/api/correspondents/*', {
-      fixture: 'manage/correspondents.json',
+      fixture: 'correspondents/correspondents.json',
     })
     cy.intercept('http://localhost:8000/api/tags/*', {
-      fixture: 'manage/tags.json',
+      fixture: 'tags/tags.json',
     })
   })
 
index 5e0d2b8ffb1b0b9340390f0194f2faddc078cc75..88272ad4b5323fb279caab9ff5276a9696a6e28e 100644 (file)
@@ -3,7 +3,7 @@ describe('settings', () => {
     this.modifiedViews = []
 
     // mock API methods
-    cy.fixture('settings/savedviews.json').then((savedViewsJson) => {
+    cy.fixture('saved_views/savedviews.json').then((savedViewsJson) => {
       // saved views PATCH
       cy.intercept(
         'PATCH',