From d35d164ece973ed257a8b00183779c42159e1991 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 17 Nov 2018 22:33:10 -0800 Subject: [PATCH] test(ivy): add fixme to a failing testbed test (#27278) PR Close #27278 --- .../bazel/injectable_def/app/test/BUILD.bazel | 1 + .../bazel/injectable_def/app/test/app_spec.ts | 30 ++++++++++--------- .../ivy_build/app/test/BUILD.bazel | 4 +-- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel index e99b4d640e..e8bec6db54 100644 --- a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/BUILD.bazel @@ -31,6 +31,7 @@ jasmine_node_test( ":test_lib", "//packages/platform-server", "//packages/platform-server/testing", + "//packages/private/testing", "//tools/testing:node", ], ) diff --git a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/app_spec.ts b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/app_spec.ts index d94ec80347..b77bc09ddb 100644 --- a/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/app_spec.ts +++ b/packages/compiler-cli/integrationtest/bazel/injectable_def/app/test/app_spec.ts @@ -9,6 +9,7 @@ import {Component, INJECTOR, Injectable, NgModule} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {renderModuleFactory} from '@angular/platform-server'; +import {fixmeIvy} from '@angular/private/testing'; import {BasicAppModuleNgFactory} from 'app_built/src/basic.ngfactory'; import {DepAppModuleNgFactory} from 'app_built/src/dep.ngfactory'; import {HierarchyAppModuleNgFactory} from 'app_built/src/hierarchy.ngfactory'; @@ -167,20 +168,21 @@ describe('ngInjectableDef Bazel Integration', () => { expect(TestBed.get(INJECTOR).get('foo')).toEqual('bar'); }); - it('Component injector understands requests for INJECTABLE', () => { - @Component({ - selector: 'test-cmp', - template: 'test', - providers: [{provide: 'foo', useValue: 'bar'}], - }) - class TestCmp { - } + fixmeIvy('FW-646: Directive providers don\'t support primitive types') && + it('Component injector understands requests for INJECTABLE', () => { + @Component({ + selector: 'test-cmp', + template: 'test', + providers: [{provide: 'foo', useValue: 'bar'}], + }) + class TestCmp { + } - TestBed.configureTestingModule({ - declarations: [TestCmp], - }); + TestBed.configureTestingModule({ + declarations: [TestCmp], + }); - const fixture = TestBed.createComponent(TestCmp); - expect(fixture.componentRef.injector.get(INJECTOR).get('foo')).toEqual('bar'); - }); + const fixture = TestBed.createComponent(TestCmp); + expect(fixture.componentRef.injector.get(INJECTOR).get('foo')).toEqual('bar'); + }); }); diff --git a/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel index 5de7233cc1..5d8c2ad1b9 100644 --- a/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app/test/BUILD.bazel @@ -11,8 +11,8 @@ ts_library( ], ), tags = [ - "ivy-only", "fixme-ivy-aot", + "ivy-only", ], deps = [ "//packages/compiler-cli/integrationtest/bazel/injector_def/ivy_build/app", @@ -25,8 +25,8 @@ jasmine_node_test( name = "test", bootstrap = ["angular/tools/testing/init_node_spec.js"], tags = [ - "ivy-only", "fixme-ivy-aot", + "ivy-only", ], deps = [ ":test_lib",