2518966153
Create style elements and modify their text content instead of using innerHTML to create the whole `<style>` element with its content. That way style insertion done at bootstrap time doesn't interfere with Trusted Types restrictions in Chrome (https://bit.ly/trusted-types). Remove the type attribute - `text/css` is default: https://html.spec.whatwg.org/#update-a-style-block. Closes #17014
22 lines
558 B
JavaScript
22 lines
558 B
JavaScript
'use strict';
|
|
|
|
// Sample E2E test:
|
|
describe('Sample', function() {
|
|
beforeEach(function() {
|
|
loadFixture('sample');
|
|
});
|
|
|
|
it('should have the interpolated text', function() {
|
|
expect(element(by.binding('text')).getText()).toBe('Hello, world!');
|
|
});
|
|
|
|
it('should insert the ng-cloak styles', function() {
|
|
browser.executeScript(`
|
|
var span = document.createElement('span');
|
|
span.className = 'ng-cloak foo';
|
|
document.body.appendChild(span);
|
|
`);
|
|
expect(element(by.className('foo')).isDisplayed()).toBe(false);
|
|
});
|
|
});
|