Skip to content
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

test(router): fix router test failing on IE #36742

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 0 additions & 15 deletions packages/router/test/BUILD.bazel
Expand Up @@ -44,21 +44,6 @@ jasmine_node_test(

karma_web_test_suite(
name = "test_web",
tags = [
# disabled on 2020-04-14 due to failure on saucelabs monitor job
# https://app.circleci.com/pipelines/github/angular/angular/13320/workflows/9ca3527a-d448-4a64-880a-fb4de9d1fece/jobs/680645
# ```
# Chrome 73.0.3683 (Windows 7.0.0) ERROR: 'ERROR', Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'aa'
# Error: Cannot match any routes. URL Segment: 'aa'
# IE 11.0.0 (Windows 8.1.0.0) ERROR: 'ERROR', Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'aa'
# Error: Cannot match any routes. URL Segment: 'aa'
# Firefox 65.0.0 (Windows 7.0.0) ERROR: 'ERROR', Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'aa'
# IE 10.0.0 (Windows 8.0.0) ERROR: 'ERROR', Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'aa'
# Error: Cannot match any routes. URL Segment: 'aa'
# ```
"fixme-saucelabs-ve",
"fixme-saucelabs-ivy",
],
deps = [
":test_lib",
],
Expand Down
9 changes: 4 additions & 5 deletions packages/router/test/bootstrap.spec.ts
Expand Up @@ -297,7 +297,6 @@ describe('bootstrap', () => {

const res = await platformBrowserDynamic([]).bootstrapModule(TestModule);
const router = res.injector.get(Router);
const location: Location = res.injector.get(Location);

await router.navigateByUrl('/aa');
window.scrollTo(0, 5000);
Expand All @@ -317,12 +316,12 @@ describe('bootstrap', () => {
expect(getScrollY()).toEqual(0);

await router.navigateByUrl('/aa#marker2');
expect(getScrollY() >= 5900).toBe(true);
expect(window.scrollY < 6000).toBe(true); // offset
expect(getScrollY()).toBeGreaterThanOrEqual(5900);
expect(getScrollY()).toBeLessThan(6000); // offset

await router.navigateByUrl('/aa#marker3');
expect(getScrollY() >= 8900).toBe(true);
expect(getScrollY() < 9000).toBe(true);
expect(getScrollY()).toBeGreaterThanOrEqual(8900);
expect(getScrollY()).toBeLessThan(9000);
done();
});

Expand Down