Skip to content

Commit 190de35

Browse files
committed
specs: add cypress test for fallbackLanguages
1 parent f87d9a5 commit 190de35

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: cypress/fixtures/tpl/docs.index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
alias: {
2929
'.*?/awesome':
3030
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
31-
'.*?/changelog':
31+
'/changelog':
3232
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
3333
'/.*/_navbar.md': '/_navbar.md',
3434
'/zh-cn/(.*)':
@@ -40,6 +40,7 @@
4040
'/es/(.*)':
4141
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
4242
},
43+
fallbackLanguages: ['es'],
4344
auto2top: true,
4445
coverpage: true,
4546
executeScript: true,

Diff for: cypress/integration/routing/fallback.spec.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
context('config.fallbackLanguages', () => {
2+
it('fallbacks respecting aliases', () => {
3+
cy.visit('http://localhost:3000/#/es/');
4+
5+
cy.get('.sidebar-nav').contains('Changelog').click();
6+
7+
cy.get('#main').should('contain', 'Bug Fixes');
8+
})
9+
});

0 commit comments

Comments
 (0)