mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Frontend testing for new comment UI features
This commit is contained in:
		| @@ -104,4 +104,19 @@ describe('document-detail', () => { | |||||||
|     cy.get('app-document-comments').find('form button').click().wait(1500) |     cy.get('app-document-comments').find('form button').click().wait(1500) | ||||||
|     cy.get('app-document-comments').find('.card').its('length').should('eq', 4) |     cy.get('app-document-comments').find('.card').its('length').should('eq', 4) | ||||||
|   }) |   }) | ||||||
|  |  | ||||||
|  |   it('should support navigation to comments tab by url', () => { | ||||||
|  |     cy.visit('/documents/1/comments') | ||||||
|  |     cy.get('app-document-comments').should('exist') | ||||||
|  |   }) | ||||||
|  |  | ||||||
|  |   it('should dynamically update comment counts', () => { | ||||||
|  |     cy.visit('/documents/1/comments') | ||||||
|  |     cy.get('app-document-comments').within(() => cy.contains('Delete').click()) | ||||||
|  |     cy.get('ul.nav') | ||||||
|  |       .find('li') | ||||||
|  |       .contains('Comments') | ||||||
|  |       .find('.badge') | ||||||
|  |       .contains('2') | ||||||
|  |   }) | ||||||
| }) | }) | ||||||
|   | |||||||
| @@ -21,7 +21,8 @@ | |||||||
|             "original_file_name": "2022-03-22 no latin title.pdf", |             "original_file_name": "2022-03-22 no latin title.pdf", | ||||||
|             "archived_file_name": "2022-03-22 no latin title.pdf", |             "archived_file_name": "2022-03-22 no latin title.pdf", | ||||||
|             "owner": null, |             "owner": null, | ||||||
|             "permissions": [] |             "permissions": [], | ||||||
|  |             "n_comments": 3 | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "id": 2, |             "id": 2, | ||||||
| @@ -39,7 +40,8 @@ | |||||||
|             "original_file_name": "2022-03-23 lorem ipsum dolor sit amet.pdf", |             "original_file_name": "2022-03-23 lorem ipsum dolor sit amet.pdf", | ||||||
|             "archived_file_name": "2022-03-23 llorem ipsum dolor sit amet.pdf", |             "archived_file_name": "2022-03-23 llorem ipsum dolor sit amet.pdf", | ||||||
|             "owner": null, |             "owner": null, | ||||||
|             "permissions": [] |             "permissions": [], | ||||||
|  |             "n_comments": 0 | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "id": 3, |             "id": 3, | ||||||
| @@ -59,7 +61,8 @@ | |||||||
|             "original_file_name": "2022-03-24 dolor.pdf", |             "original_file_name": "2022-03-24 dolor.pdf", | ||||||
|             "archived_file_name": "2022-03-24 dolor.pdf", |             "archived_file_name": "2022-03-24 dolor.pdf", | ||||||
|             "owner": null, |             "owner": null, | ||||||
|             "permissions": [] |             "permissions": [], | ||||||
|  |             "n_comments": 0 | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "id": 4, |             "id": 4, | ||||||
| @@ -79,7 +82,8 @@ | |||||||
|             "original_file_name": "2022-06-01 sit amet.pdf", |             "original_file_name": "2022-06-01 sit amet.pdf", | ||||||
|             "archived_file_name": "2022-06-01 sit amet.pdf", |             "archived_file_name": "2022-06-01 sit amet.pdf", | ||||||
|             "owner": null, |             "owner": null, | ||||||
|             "permissions": [] |             "permissions": [], | ||||||
|  |             "n_comments": 0 | ||||||
|         } |         } | ||||||
|     ] |     ] | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon