test(core): rename ivy-trusted-types integration test to trusted-types (#39614)

Since there won't be a ViewEngine-specific integration test, we don't
need the Ivy prefix.

PR Close #39614
This commit is contained in:
Bjarki 2020-11-18 20:31:04 +00:00 committed by Andrew Kushnir
parent 569086a974
commit ce604b909b
32 changed files with 19 additions and 19 deletions

View File

@ -69,7 +69,7 @@ INTEGRATION_TESTS = {
"i18n": {"tags": ["no-ivy-aot"]}, "i18n": {"tags": ["no-ivy-aot"]},
"injectable-def": {"tags": ["no-ivy-aot"]}, "injectable-def": {"tags": ["no-ivy-aot"]},
"ivy-i18n": {"tags": ["no-ivy-aot"]}, "ivy-i18n": {"tags": ["no-ivy-aot"]},
"ivy-trusted-types": {}, "trusted-types": {},
"language_service_plugin": {}, "language_service_plugin": {},
"ng_elements": {"tags": ["no-ivy-aot"]}, "ng_elements": {"tags": ["no-ivy-aot"]},
"ng_elements_schematics": {"tags": ["no-ivy-aot"]}, "ng_elements_schematics": {"tags": ["no-ivy-aot"]},

View File

@ -3,7 +3,7 @@
"version": 1, "version": 1,
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"ivy-trusted-types": { "trusted-types": {
"projectType": "application", "projectType": "application",
"schematics": { "schematics": {
"@schematics/angular:application": { "@schematics/angular:application": {
@ -17,7 +17,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/ivy-trusted-types", "outputPath": "dist/trusted-types",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
@ -66,20 +66,20 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "ivy-trusted-types:build", "browserTarget": "trusted-types:build",
"headers": { "headers": {
"Content-Security-Policy": "trusted-types angular angular#unsafe-bypass; require-trusted-types-for 'script';" "Content-Security-Policy": "trusted-types angular angular#unsafe-bypass; require-trusted-types-for 'script';"
} }
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "ivy-trusted-types:build:production" "browserTarget": "trusted-types:build:production"
}, },
"ci": { "ci": {
"progress": false "progress": false
}, },
"ci-production": { "ci-production": {
"browserTarget": "ivy-trusted-types:build:production", "browserTarget": "trusted-types:build:production",
"progress": false "progress": false
} }
} }
@ -87,7 +87,7 @@
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "ivy-trusted-types:build" "browserTarget": "trusted-types:build"
} }
}, },
"test": { "test": {
@ -126,23 +126,23 @@
"builder": "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options": { "options": {
"protractorConfig": "e2e/protractor.conf.js", "protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ivy-trusted-types:serve", "devServerTarget": "trusted-types:serve",
"webdriverUpdate": false "webdriverUpdate": false
}, },
"configurations": { "configurations": {
"production": { "production": {
"devServerTarget": "ivy-trusted-types:serve:production" "devServerTarget": "trusted-types:serve:production"
}, },
"ci": { "ci": {
"devServerTarget": "ivy-trusted-types:serve:ci" "devServerTarget": "trusted-types:serve:ci"
}, },
"ci-production": { "ci-production": {
"devServerTarget": "ivy-trusted-types:serve:ci-production" "devServerTarget": "trusted-types:serve:ci-production"
} }
} }
} }
} }
} }
}, },
"defaultProject": "ivy-trusted-types" "defaultProject": "trusted-types"
} }

View File

@ -10,7 +10,7 @@ describe('workspace-project App', () => {
it('should display welcome message', async () => { it('should display welcome message', async () => {
await page.navigateTo(); await page.navigateTo();
expect(await page.getTitleText()).toEqual('ivy-trusted-types app is running!'); expect(await page.getTitleText()).toEqual('trusted-types app is running!');
}); });
it('should sanitize and inject bound innerHTML', async () => { it('should sanitize and inject bound innerHTML', async () => {

View File

@ -21,7 +21,7 @@ module.exports = function(config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageReporter: { coverageReporter: {
dir: require('path').join(__dirname, './coverage/ivy-trusted-types'), dir: require('path').join(__dirname, './coverage/trusted-types'),
subdir: '.', subdir: '.',
reporters: [ reporters: [
{ type: 'html' }, { type: 'html' },

View File

@ -1,5 +1,5 @@
{ {
"name": "ivy-trusted-types", "name": "trusted-types",
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",

View File

@ -20,16 +20,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy(); expect(app).toBeTruthy();
}); });
it(`should have as title 'ivy-trusted-types'`, () => { it(`should have as title 'trusted-types'`, () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance; const app = fixture.componentInstance;
expect(app.title).toEqual('ivy-trusted-types'); expect(app.title).toEqual('trusted-types');
}); });
it('should render title', () => { it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges(); fixture.detectChanges();
const compiled = fixture.nativeElement; const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('ivy-trusted-types app is running!'); expect(compiled.querySelector('.content span').textContent).toContain('trusted-types app is running!');
}); });
}); });

View File

@ -7,7 +7,7 @@ import {DomSanitizer, SafeHtml, SafeResourceUrl} from '@angular/platform-browser
styleUrls: ['./app.component.css'] styleUrls: ['./app.component.css']
}) })
export class AppComponent { export class AppComponent {
title = 'ivy-trusted-types'; title = 'trusted-types';
html = `<span>Hello from bound HTML</span><iframe id="bound-html-iframe"></iframe>`; html = `<span>Hello from bound HTML</span><iframe id="bound-html-iframe"></iframe>`;
iframeHtml = `<h1>Hello from iframe</h1>`; iframeHtml = `<h1>Hello from iframe</h1>`;
replace = `<span>Hello from second outerHTML</span>`; replace = `<span>Hello from second outerHTML</span>`;

View File

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 948 B