Skip to content

Commit

Permalink
add failing test for #3636
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Feb 13, 2022
1 parent dd094a4 commit 0627a2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/kit/test/apps/basics/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,14 @@ test.describe('Scrolling', () => {
const originalScrollY = /** @type {number} */ (await page.evaluate(() => scrollY));
await clicknav('#routing-page');
await back();
expect(page.url().substring(page.url().indexOf('/', 8))).toEqual('/anchor#last-anchor-2');
const scrollY = /** @type {number} */ (await page.evaluate(() => scrollY));
expect(scrollY).toEqual(originalScrollY);
// TODO: fix this. it is failing due to duplicate history entries
// https://github.com/sveltejs/kit/issues/3636
// await page.goBack();
// expect(page.url().substring(page.url().indexOf('/', 8))).toEqual('/anchor');
// expect(scrollY).toEqual(0);
});

test('url-supplied anchor is ignored with onMount() scrolling on direct page load', async ({
Expand Down

0 comments on commit 0627a2c

Please sign in to comment.