@@ -56,20 +56,20 @@ function runTests() {
56
56
} ) ;
57
57
58
58
it ( 'should be able to get text inside the input' , async ( ) => {
59
- const input = await loader . getHarness ( harness . with ( { id : 'prefilled' } ) ) ;
59
+ const input = await loader . getHarness ( harness . with ( { selector : '# prefilled' } ) ) ;
60
60
expect ( await input . getText ( ) ) . toBe ( 'Prefilled value' ) ;
61
61
} ) ;
62
62
63
63
it ( 'should get disabled state' , async ( ) => {
64
- const enabled = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
65
- const disabled = await loader . getHarness ( harness . with ( { id : 'disabled' } ) ) ;
64
+ const enabled = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
65
+ const disabled = await loader . getHarness ( harness . with ( { selector : '# disabled' } ) ) ;
66
66
67
67
expect ( await enabled . isDisabled ( ) ) . toBe ( false ) ;
68
68
expect ( await disabled . isDisabled ( ) ) . toBe ( true ) ;
69
69
} ) ;
70
70
71
71
it ( 'should focus and blur an input' , async ( ) => {
72
- const input = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
72
+ const input = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
73
73
expect ( getActiveElementId ( ) ) . not . toBe ( 'plain' ) ;
74
74
await input . focus ( ) ;
75
75
expect ( getActiveElementId ( ) ) . toBe ( 'plain' ) ;
@@ -78,19 +78,19 @@ function runTests() {
78
78
} ) ;
79
79
80
80
it ( 'should be able to type in an input' , async ( ) => {
81
- const input = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
81
+ const input = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
82
82
await input . enterText ( 'Hello there' ) ;
83
83
expect ( await input . getText ( ) ) . toBe ( 'Hello there' ) ;
84
84
} ) ;
85
85
86
86
it ( 'should be able to get the autocomplete panel' , async ( ) => {
87
- const input = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
87
+ const input = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
88
88
await input . focus ( ) ;
89
89
expect ( await input . getPanel ( ) ) . toBeTruthy ( ) ;
90
90
} ) ;
91
91
92
92
it ( 'should be able to get the autocomplete panel options' , async ( ) => {
93
- const input = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
93
+ const input = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
94
94
await input . focus ( ) ;
95
95
const options = await input . getOptions ( ) ;
96
96
@@ -99,7 +99,7 @@ function runTests() {
99
99
} ) ;
100
100
101
101
it ( 'should be able to get the autocomplete panel groups' , async ( ) => {
102
- const input = await loader . getHarness ( harness . with ( { id : 'grouped' } ) ) ;
102
+ const input = await loader . getHarness ( harness . with ( { selector : '# grouped' } ) ) ;
103
103
await input . focus ( ) ;
104
104
const groups = await input . getOptionGroups ( ) ;
105
105
const options = await input . getOptions ( ) ;
@@ -113,13 +113,13 @@ function runTests() {
113
113
fixture . componentInstance . states = [ ] ;
114
114
fixture . detectChanges ( ) ;
115
115
116
- const input = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
116
+ const input = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
117
117
await input . focus ( ) ;
118
118
expect ( await input . isPanelVisible ( ) ) . toBe ( false ) ;
119
119
} ) ;
120
120
121
121
it ( 'should be able to get whether the autocomplete is open' , async ( ) => {
122
- const input = await loader . getHarness ( harness . with ( { id : 'plain' } ) ) ;
122
+ const input = await loader . getHarness ( harness . with ( { selector : '# plain' } ) ) ;
123
123
124
124
expect ( await input . isOpen ( ) ) . toBe ( false ) ;
125
125
await input . focus ( ) ;
0 commit comments