Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
specs: add cypress test for fallbackLanguages
  • Loading branch information
palkan committed Jul 27, 2020
commit 190de35f62a4bbe2d76c543a53d159e91e1f7c58
3 changes: 2 additions & 1 deletion cypress/fixtures/tpl/docs.index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
alias: {
'.*?/awesome':
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog':
'/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)':
Expand All @@ -40,6 +40,7 @@
'/es/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
},
fallbackLanguages: ['es'],
auto2top: true,
coverpage: true,
executeScript: true,
Expand Down
9 changes: 9 additions & 0 deletions cypress/integration/routing/fallback.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
context('config.fallbackLanguages', () => {
it('fallbacks respecting aliases', () => {
cy.visit('http://localhost:3000/#/es/');

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

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