build(bazel): enable manual ts_web_test_suite tests that require static_files (#24279)

PR Close #24279
This commit is contained in:
Greg Magolan 2018-06-03 23:06:17 -07:00 committed by Victor Berchet
parent b750919ce0
commit d700a409da
5 changed files with 16 additions and 8 deletions

View File

@ -29,8 +29,10 @@ jasmine_node_test(
ts_web_test_suite( ts_web_test_suite(
name = "test_web", name = "test_web",
# disable since tests are running but not yet passing static_files = [
tags = ["manual"], "//packages/platform-browser/test:static_assets/test.html",
"//packages/platform-browser/test:browser/static_assets/200.html"
],
deps = [ deps = [
":test_lib", ":test_lib",
], ],

View File

@ -19,7 +19,7 @@ import {ResourceLoaderImpl} from '../../src/resource_loader/resource_loader_impl
// will be relative to here, so url200 should look like // will be relative to here, so url200 should look like
// static_assets/200.html. // static_assets/200.html.
// We currently have no way of detecting this. // We currently have no way of detecting this.
const url200 = '/base/packages/platform-browser/test/browser/static_assets/200.html'; const url200 = '/base/angular/packages/platform-browser/test/browser/static_assets/200.html';
const url404 = '/bad/path/404.html'; const url404 = '/bad/path/404.html';
beforeEach(() => { resourceLoader = new ResourceLoaderImpl(); }); beforeEach(() => { resourceLoader = new ResourceLoaderImpl(); });

View File

@ -26,7 +26,7 @@ class FancyService {
@Component({ @Component({
selector: 'external-template-comp', selector: 'external-template-comp',
templateUrl: '/base/packages/platform-browser/test/static_assets/test.html' templateUrl: '/base/angular/packages/platform-browser/test/static_assets/test.html'
}) })
class ExternalTemplateComp { class ExternalTemplateComp {
} }
@ -48,7 +48,7 @@ class BadTemplateUrl {
it('should run async tests with ResourceLoaders', async(() => { it('should run async tests with ResourceLoaders', async(() => {
const resourceLoader = new ResourceLoaderImpl(); const resourceLoader = new ResourceLoaderImpl();
resourceLoader.get('/base/packages/platform-browser/test/static_assets/test.html') resourceLoader.get('/base/angular/packages/platform-browser/test/static_assets/test.html')
.then(() => { actuallyDone = true; }); .then(() => { actuallyDone = true; });
}), }),
10000); // Long timeout here because this test makes an actual ResourceLoader. 10000); // Long timeout here because this test makes an actual ResourceLoader.

View File

@ -1,6 +1,11 @@
load("//tools:defaults.bzl", "ts_library", "ts_web_test_suite") load("//tools:defaults.bzl", "ts_library", "ts_web_test_suite")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
exports_files([
"browser/static_assets/200.html",
"static_assets/test.html",
])
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
@ -35,8 +40,9 @@ jasmine_node_test(
ts_web_test_suite( ts_web_test_suite(
name = "test_web", name = "test_web",
# disable since tests are running but not yet passing static_files = [
tags = ["manual"], ":static_assets/test.html"
],
deps = [ deps = [
":test_lib", ":test_lib",
], ],

View File

@ -104,7 +104,7 @@ class SomeLibModule {
} }
@Component( @Component(
{selector: 'comp', templateUrl: '/base/packages/platform-browser/test/static_assets/test.html'}) {selector: 'comp', templateUrl: '/base/angular/packages/platform-browser/test/static_assets/test.html'})
class CompWithUrlTemplate { class CompWithUrlTemplate {
} }