mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-04 21:06:04 +01:00
Added test to cover display of file contents, as well as proper raw output.
This commit is contained in:
15
tests/cypress/integration/files.spec.js
Normal file
15
tests/cypress/integration/files.spec.js
Normal file
@@ -0,0 +1,15 @@
|
||||
describe('File page', () => {
|
||||
it('view file contents', () => {
|
||||
cy.visit('/git-bare-repo/blob/HEAD/mm/cma.c');
|
||||
|
||||
cy.get('.breadcrumb > .active').should('have.text', '\n cma.c\n ');
|
||||
cy.get('.ace_comment:nth(1)').should('have.text', ' * Contiguous Memory Allocator');
|
||||
});
|
||||
|
||||
it('view file raw', () => {
|
||||
cy.request('/git-bare-repo/raw/HEAD/mm/cma.c').then((resp) => {
|
||||
expect(resp.status).to.eq(200);
|
||||
expect(resp.body).to.include(' * Contiguous Memory Allocator');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user