mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
test: run tests in ci
This commit is contained in:
20
src-ui/cypress/integration/documents-list.spec.ts
Normal file
20
src-ui/cypress/integration/documents-list.spec.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
describe('documents-list', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('http://localhost:8000/api/documents/*', {
|
||||
fixture: 'documents/documents.json',
|
||||
});
|
||||
cy.intercept('http://localhost:8000/api/documents/1/thumb/', {
|
||||
fixture: 'documents/lorem-ipsum.png',
|
||||
});
|
||||
|
||||
cy.visit('/documents');
|
||||
});
|
||||
|
||||
it('should show a list of documents rendered as cards with thumbnails', () => {
|
||||
cy.contains('One document');
|
||||
cy.contains('lorem-ipsum');
|
||||
cy.get('app-document-card-small:first-of-type img')
|
||||
.invoke('attr', 'src')
|
||||
.should('eq', 'http://localhost:8000/api/documents/1/thumb/');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user