Skip to content

Commit e9cd782

Browse files
committed
test(WebPlatform): disable web components tests when shim is needed
1 parent cb40e76 commit e9cd782

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/core_dom/web_platform_spec.dart

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
library angular.dom.platform_spec;
22

33
import '../_specs.dart';
4+
import 'package:browser_detect/browser_detect.dart';
45

56
import 'dart:js' as js;
67

78
main() {
89
describe('WebPlatform', () {
9-
1010
beforeEachModule((Module module) {
1111
module
1212
..bind(_WebPlatformTestComponent)
@@ -19,6 +19,10 @@ main() {
1919
it('should scope styles to shadow dom across browsers.',
2020
async((TestBed _, MockHttpBackend backend, WebPlatform platform) {
2121

22+
// TODO(vicb) WebPlatform does not work with polyfills
23+
// see https://github.com/angular/angular.dart/issues/1300
24+
if (platform.cssShimRequired) return;
25+
2226
backend
2327
..expectGET('style.css').respond(200, 'span { background-color: red; '
2428
'}')
@@ -58,6 +62,10 @@ main() {
5862
it('should not crash with an attribute selector; but wont work either..',
5963
async((TestBed _, MockHttpBackend backend, WebPlatform platform) {
6064

65+
// TODO(vicb) WebPlatform does not work with polyfills
66+
// see https://github.com/angular/angular.dart/issues/1300
67+
if (platform.cssShimRequired) return;
68+
6169
backend
6270
..expectGET('style.css').respond(200, 'span { background-color: red; '
6371
'}')
@@ -76,6 +84,10 @@ main() {
7684
it('should scope :host styles to the primary element.',
7785
async((TestBed _, MockHttpBackend backend, WebPlatform platform) {
7886

87+
// TODO(vicb) WebPlatform does not work with polyfills
88+
// see https://github.com/angular/angular.dart/issues/1300
89+
if (platform.cssShimRequired) return;
90+
7991
backend
8092
..expectGET('style.css').respond(200, ':host {'
8193
'background-color: red; }')

0 commit comments

Comments
 (0)