build: remove manual tags from platform jasmine tests (#26606)

PR Close #26606
This commit is contained in:
Miško Hevery 2018-10-19 16:43:31 -07:00 committed by Igor Minar
parent 615a515bba
commit 213c25fb08
7 changed files with 12 additions and 11 deletions

View File

@ -18,8 +18,6 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
# dissable since tests are running but not yet passing
tags = ["manual"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",

View File

@ -15,7 +15,7 @@ import {CachedResourceLoader} from '../../src/resource_loader/resource_loader_ca
import {setTemplateCache} from './resource_loader_cache_setter'; import {setTemplateCache} from './resource_loader_cache_setter';
{ if (isBrowser) {
describe('CachedResourceLoader', () => { describe('CachedResourceLoader', () => {
let resourceLoader: CachedResourceLoader; let resourceLoader: CachedResourceLoader;

View File

@ -9,7 +9,7 @@
import {AsyncTestCompleter, beforeEach, describe, expect, inject, it} from '@angular/core/testing/src/testing_internal'; import {AsyncTestCompleter, beforeEach, describe, expect, inject, it} from '@angular/core/testing/src/testing_internal';
import {ResourceLoaderImpl} from '../../src/resource_loader/resource_loader_impl'; import {ResourceLoaderImpl} from '../../src/resource_loader/resource_loader_impl';
{ if (isBrowser) {
describe('ResourceLoaderImpl', () => { describe('ResourceLoaderImpl', () => {
let resourceLoader: ResourceLoaderImpl; let resourceLoader: ResourceLoaderImpl;

View File

@ -37,7 +37,7 @@ class BadTemplateUrl {
// Tests for angular/testing bundle specific to the browser environment. // Tests for angular/testing bundle specific to the browser environment.
// For general tests, see test/testing/testing_public_spec.ts. // For general tests, see test/testing/testing_public_spec.ts.
{ if (isBrowser) {
describe('test APIs for the browser', () => { describe('test APIs for the browser', () => {
describe('using the async helper', () => { describe('using the async helper', () => {
let actuallyDone: boolean; let actuallyDone: boolean;

View File

@ -30,7 +30,6 @@ jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
# dissable since tests are running but not yet passing # dissable since tests are running but not yet passing
tags = ["manual"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",

View File

@ -307,11 +307,12 @@ class CompWithUrlTemplate {
TestBed.compileComponents(); TestBed.compileComponents();
})); }));
it('should allow to createSync components with templateUrl after explicit async compilation', isBrowser &&
() => { it('should allow to createSync components with templateUrl after explicit async compilation',
const fixture = TestBed.createComponent(CompWithUrlTemplate); () => {
expect(fixture.nativeElement).toHaveText('from external template'); const fixture = TestBed.createComponent(CompWithUrlTemplate);
}); expect(fixture.nativeElement).toHaveText('from external template');
});
}); });
describe('overwriting metadata', () => { describe('overwriting metadata', () => {

View File

@ -40,6 +40,9 @@ import 'zone.js/dist/jasmine-patch.js';
import {TestBed} from '@angular/core/testing'; import {TestBed} from '@angular/core/testing';
import {ServerTestingModule, platformServerTesting} from '@angular/platform-server/testing/src/server'; import {ServerTestingModule, platformServerTesting} from '@angular/platform-server/testing/src/server';
import {DominoAdapter} from '@angular/platform-server/src/domino_adapter'; import {DominoAdapter} from '@angular/platform-server/src/domino_adapter';
import {createDocument} from 'domino';
TestBed.initTestEnvironment(ServerTestingModule, platformServerTesting()); TestBed.initTestEnvironment(ServerTestingModule, platformServerTesting());
DominoAdapter.makeCurrent(); DominoAdapter.makeCurrent();
(global as any).document =
(DominoAdapter as any).defaultDoc || ((DominoAdapter as any).defaultDoc = createDocument());