Skip to content

feat: Virtual Routes Support #1799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 23, 2022
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ba998e8
add first test
illBeRoy May 14, 2022
7c92837
new VirtualRoutes mixin that handles routes. fetch tries to use Virtu…
illBeRoy May 14, 2022
7a2d0d0
cover all basic use cases
illBeRoy May 14, 2022
3f359ed
regex matching in routes
illBeRoy May 14, 2022
53c507f
covered all virtual routes tests
illBeRoy May 14, 2022
9d816bc
added hack to fix config test on firefox
illBeRoy May 15, 2022
fb084f8
removed formatting regex matches into string routes
illBeRoy May 17, 2022
1866fa2
added support for "next" function
illBeRoy May 17, 2022
8bf6890
added docs
illBeRoy May 17, 2022
a022b3d
navigate now supports both hash and history routerModes
illBeRoy May 18, 2022
1447898
waiting for networkidle in navigateToRoute helper
illBeRoy May 18, 2022
e8a12c0
promiseless implementation
illBeRoy May 18, 2022
e81429d
remove firefox workaround from catchPluginErrors test, since we no lo…
illBeRoy May 18, 2022
f0be4ca
updated docs
illBeRoy May 18, 2022
dbf45d4
updated docs for "alias" as well
illBeRoy May 18, 2022
dfbf77f
minor rephrasing
illBeRoy May 18, 2022
a245a2b
removed non-legacy code from exact-match; updated navigateToRoute hel…
illBeRoy May 19, 2022
4277cc5
moved endsWith from router utils to general utils; added startsWith u…
illBeRoy May 19, 2022
4bd7ac8
updated docs per feedback
illBeRoy May 19, 2022
ebfc235
moved navigateToRoute helper into the virtual-routes test file
illBeRoy May 19, 2022
bea7308
moved navigateToRoute to top of file
illBeRoy May 19, 2022
c748b33
updated docs per pr comments
illBeRoy May 20, 2022
File filter

Filter by extension

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
added hack to fix config test on firefox
  • Loading branch information
illBeRoy committed May 15, 2022
commit 9d816bc27f3c56e4a7d3c66362d9ee1b73c47fce
16 changes: 15 additions & 1 deletion test/e2e/configuration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,26 @@ test.describe('Configuration options', () => {
await expect(mainElm).toContainText('beforeEach');
});

test('catchPluginErrors:false (throws uncaught errors)', async ({ page }) => {
test('catchPluginErrors:false (throws uncaught errors)', async ({
page,
browserName,
}) => {
let consoleMsg, errorMsg;

page.on('console', msg => (consoleMsg = msg.text()));
page.on('pageerror', err => (errorMsg = err.message));

// firefox has some funky behavior with unhandled promise rejections. see related issue on playwright: https://github.com/microsoft/playwright/issues/14165
if (browserName === 'firefox') {
page.on('domcontentloaded', () =>
page.evaluate(() =>
window.addEventListener('unhandledrejection', err => {
throw err.reason;
})
)
);
}

await docsifyInit({
config: {
catchPluginErrors: false,
Expand Down