Added test to cover display of file contents, as well as proper raw output.

This commit is contained in:
Klaus Silveira
2025-09-09 08:45:44 -04:00
parent 954c07baca
commit e7e17a1ea7

View 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');
});
});
});