diff --git a/integration/bazel-schematics/angular.json.original b/integration/bazel-schematics/angular.json.original index a9d121b615..fdb73942f0 100644 --- a/integration/bazel-schematics/angular.json.original +++ b/integration/bazel-schematics/angular.json.original @@ -23,7 +23,7 @@ "src/assets" ], "styles": [ - "src/styles.css" + "src/styles.scss" ], "scripts": [] }, @@ -82,7 +82,7 @@ "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ - "src/styles.css" + "src/styles.scss" ], "scripts": [], "assets": [ diff --git a/integration/bazel-schematics/test.sh b/integration/bazel-schematics/test.sh index 5b57a8f288..976f054aba 100755 --- a/integration/bazel-schematics/test.sh +++ b/integration/bazel-schematics/test.sh @@ -7,10 +7,11 @@ function testBazel() { bazel version rm -rf demo # Create project - ng new demo --collection=@angular/bazel --defaults --skip-git + ng new demo --collection=@angular/bazel --defaults --skip-git --style=scss node replace_angular_repo.js "./demo/WORKSPACE" cd demo cp ../package.json.replace ./package.json + ng generate component widget --style=css ng build ng test ng e2e diff --git a/packages/bazel/src/schematics/bazel-workspace/index_spec.ts b/packages/bazel/src/schematics/bazel-workspace/index_spec.ts index 63e4dbe92d..77b9fc6062 100644 --- a/packages/bazel/src/schematics/bazel-workspace/index_spec.ts +++ b/packages/bazel/src/schematics/bazel-workspace/index_spec.ts @@ -91,32 +91,17 @@ describe('Bazel-workspace Schematic', () => { expect(host.files).toContain('/src/BUILD.bazel'); }); - it('should download rules_sass in WORKSPACE', () => { + it('should download and load rules_sass in WORKSPACE', () => { const content = host.readContent('/WORKSPACE'); expect(content).toContain('RULES_SASS_VERSION'); - expect(content).toContain('io_bazel_rules_sass'); - }); - - it('should load sass_repositories in WORKSPACE', () => { - const content = host.readContent('/WORKSPACE'); expect(content).toContain( 'load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")'); - expect(content).toContain('sass_repositories()'); }); it('should add sass_binary rules in src/BUILD', () => { const content = host.readContent('/src/BUILD.bazel'); expect(content).toContain('load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")'); - expect(content).toMatch(/sass_binary\((.*\n)+\)/); - }); - - it('should add SASS targets to assets of ng_module in src/BUILD', () => { - const content = host.readContent('/src/BUILD.bazel'); - expect(content).toContain(` - assets = glob([ - "**/*.css", - "**/*.html", - ]) + [":style_" + x for x in glob(["**/*.scss"])],`); + expect(content).toContain('glob(["**/*.scss"])'); }); }); });