test: closure integration test for change detection (#14691)
This commit is contained in:
parent
5753de50f0
commit
49b462e815
|
@ -3,6 +3,9 @@ import { browser, element, by } from 'protractor';
|
||||||
describe('Hello world E2E Tests', function () {
|
describe('Hello world E2E Tests', function () {
|
||||||
it('should display: Hello world!', function () {
|
it('should display: Hello world!', function () {
|
||||||
browser.get('');
|
browser.get('');
|
||||||
expect(element(by.css('div')).getText()).toEqual('Hello world!');
|
const div = element(by.css('div'));
|
||||||
|
expect(div.getText()).toEqual('Hello world!');
|
||||||
|
element(by.css('input')).sendKeys('!');
|
||||||
|
expect(div.getText()).toEqual('Hello world!!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import {Component, Injectable} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'hello-world-app',
|
selector: 'hello-world-app',
|
||||||
template: '<div>Hello {{ name }}!</div>',
|
template: `
|
||||||
|
<div>Hello {{ name }}!</div>
|
||||||
|
<input type="text" [value]="name" (input)="name = $event.target.value"/>
|
||||||
|
`,
|
||||||
})
|
})
|
||||||
@Injectable()
|
|
||||||
export class HelloWorldComponent {
|
export class HelloWorldComponent {
|
||||||
name: string = 'world';
|
name: string = 'world';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue