1
- 'use strict' ; // necessary for es6 output in node
1
+ 'use strict' ; // necessary for es6 output in node
2
2
3
3
import { browser , element , by } from 'protractor' ;
4
4
@@ -9,7 +9,7 @@ describe('TypeScript to Javascript tests', function () {
9
9
} ) ;
10
10
11
11
it ( 'should display the basic component example' , function ( ) {
12
- testTag ( 'hero-view' , 'Hero: Windstorm' ) ;
12
+ testTag ( 'hero-view' , 'Hero Detail : Windstorm' ) ;
13
13
} ) ;
14
14
15
15
it ( 'should display the component example with lifecycle methods' , function ( ) {
@@ -36,7 +36,7 @@ describe('TypeScript to Javascript tests', function () {
36
36
37
37
it ( 'should support component with inputs and outputs' , function ( ) {
38
38
let app = element ( by . css ( 'hero-io' ) ) ;
39
- let confirmComponent = app . element ( by . css ( 'my -confirm' ) ) ;
39
+ let confirmComponent = app . element ( by . css ( 'app -confirm' ) ) ;
40
40
41
41
confirmComponent . element ( by . buttonText ( 'OK' ) ) . click ( ) ;
42
42
expect ( app . element ( by . cssContainingText ( 'span' , 'OK clicked' ) ) . isPresent ( ) ) . toBe ( true ) ;
@@ -46,11 +46,11 @@ describe('TypeScript to Javascript tests', function () {
46
46
} ) ;
47
47
48
48
it ( 'should support host bindings and host listeners' , function ( ) {
49
- let app = element ( by . css ( 'heroes-bindings ' ) ) ;
49
+ let app = element ( by . css ( 'hero-host ' ) ) ;
50
50
let h1 = app . element ( by . css ( 'h1' ) ) ;
51
51
52
52
expect ( app . getAttribute ( 'class' ) ) . toBe ( 'heading' ) ;
53
- expect ( app . getAttribute ( 'title' ) ) . toBe ( 'Tooltip content ' ) ;
53
+ expect ( app . getAttribute ( 'title' ) ) . toContain ( 'Tooltip' ) ;
54
54
55
55
h1 . click ( ) ;
56
56
expect ( h1 . getAttribute ( 'class' ) ) . toBe ( 'active' ) ;
@@ -61,12 +61,12 @@ describe('TypeScript to Javascript tests', function () {
61
61
} ) ;
62
62
63
63
it ( 'should support content and view queries' , function ( ) {
64
- let app = element ( by . css ( 'heroes -queries' ) ) ;
65
- let windstorm = app . element ( by . css ( 'a-hero :first-child' ) ) ;
64
+ let app = element ( by . css ( 'hero -queries' ) ) ;
65
+ let windstorm = app . element ( by . css ( 'view-child :first-child' ) ) ;
66
66
67
- app . element ( by . buttonText ( 'Activate ') ) . click ( ) ;
67
+ app . element ( by . css ( 'button ') ) . click ( ) ;
68
68
expect ( windstorm . element ( by . css ( 'h2' ) ) . getAttribute ( 'class' ) ) . toBe ( 'active' ) ;
69
- expect ( windstorm . element ( by . css ( 'active-label ' ) ) . getText ( ) ) . toBe ( 'Active' ) ;
69
+ expect ( windstorm . element ( by . css ( 'content-child ' ) ) . getText ( ) ) . toBe ( 'Active' ) ;
70
70
} ) ;
71
71
72
72
function testTag ( selector : string , expectedText : string ) {
0 commit comments