Skip to content

Commit c375219

Browse files
committed
Add additional tests for index file hosting
1 parent 8d900ff commit c375219

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: cypress/integration/routing/index-file.spec.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ context('routing.indexFile', () => {
77
cy.get('#main').should('contain', 'Bug Fixes');
88
})
99

10-
it('handles index file routing with fragments', () => {
10+
it('handles index file routing with root fragment', () => {
1111
cy.visit('http://localhost:3000/index.html#/');
1212

1313
cy.get('.sidebar-nav').contains('Changelog').click();
1414

1515
cy.get('#main').should('contain', 'Bug Fixes');
1616
})
1717

18+
it('handles index file routing with page fragment', () => {
19+
cy.visit('http://localhost:3000/index.html#/changelog');
20+
21+
cy.get('#main').should('contain', 'Bug Fixes');
22+
})
23+
1824
it('returns 404 for index file with leading fragment', () => {
1925
cy.visit('http://localhost:3000/#/index.html/');
2026

@@ -28,7 +34,6 @@ context('routing.indexFile', () => {
2834
}).then((resp) => expect(500).to.eq(resp.status))
2935
})
3036

31-
3237
it('does not serve shadowing index markdown file', () => {
3338
cy.request({
3439
url: 'http://localhost:3000/index.md',

0 commit comments

Comments
 (0)