Skip to content

Commit

Permalink
Add additional tests for index file hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
rgladwell committed Oct 8, 2020
1 parent 6070ce1 commit d7cae0e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cypress/integration/routing/index-file.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ context('routing.indexFile', () => {
cy.get('#main').should('contain', 'Bug Fixes');
})

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

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

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

it('handles index file routing with page fragment', () => {
cy.visit('http://localhost:3000/index.html#/changelog');

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

it('returns 404 for index file with leading fragment', () => {
cy.visit('http://localhost:3000/#/index.html/');

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


it('does not serve shadowing index markdown file', () => {
cy.request({
url: 'http://localhost:3000/index.md',
Expand Down

0 comments on commit d7cae0e

Please sign in to comment.