From d2cda4b6c075828e244477567aa5b872ffe81e4d Mon Sep 17 00:00:00 2001 From: cudr Date: Fri, 15 Mar 2019 05:13:18 +0300 Subject: [PATCH] add test --- test/apps/basics/src/routes/dirs/bar/[a].svelte | 3 +++ test/apps/basics/src/routes/dirs/foo/[b].svelte | 1 + test/apps/basics/test.ts | 13 ++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/apps/basics/src/routes/dirs/bar/[a].svelte create mode 100644 test/apps/basics/src/routes/dirs/foo/[b].svelte diff --git a/test/apps/basics/src/routes/dirs/bar/[a].svelte b/test/apps/basics/src/routes/dirs/bar/[a].svelte new file mode 100644 index 0000000..b31915f --- /dev/null +++ b/test/apps/basics/src/routes/dirs/bar/[a].svelte @@ -0,0 +1,3 @@ +

A page

+ +same segment diff --git a/test/apps/basics/src/routes/dirs/foo/[b].svelte b/test/apps/basics/src/routes/dirs/foo/[b].svelte new file mode 100644 index 0000000..f7a165f --- /dev/null +++ b/test/apps/basics/src/routes/dirs/foo/[b].svelte @@ -0,0 +1 @@ +

B page

diff --git a/test/apps/basics/test.ts b/test/apps/basics/test.ts index 1247bfc..9e31855 100644 --- a/test/apps/basics/test.ts +++ b/test/apps/basics/test.ts @@ -275,4 +275,15 @@ describe('basics', function() { await wait(50); assert.equal(await title(), 'bar'); }); -}); \ No newline at end of file + + it('navigates between dynamic routes with same segments', async () => { + await page.goto(`${base}/dirs/bar/xyz`); + await start(); + + assert.equal(await title(), 'A page'); + + await page.click('[href="dirs/foo/xyz"]'); + await wait(50); + assert.equal(await title(), 'B page'); + }); +});