@@ -10,6 +10,7 @@ import { IgxInputGroupModule } from '../../input-group/input-group.component';
10
10
import { IgxMaskModule } from './mask.directive' ;
11
11
12
12
import { configureTestSuite } from '../../test-utils/configure-suite' ;
13
+ import { UIInteractions } from '../../test-utils/ui-interactions.spec' ;
13
14
14
15
describe ( 'igxMask' , ( ) => {
15
16
configureTestSuite ( ) ;
@@ -41,7 +42,6 @@ describe('igxMask', () => {
41
42
it ( 'Initializes an input with default mask' , fakeAsync ( ( ) => {
42
43
const fixture = TestBed . createComponent ( DefMaskComponent ) ;
43
44
fixture . detectChanges ( ) ;
44
-
45
45
const input = fixture . componentInstance . input ;
46
46
47
47
expect ( input . nativeElement . value ) . toEqual ( '' ) ;
@@ -51,6 +51,7 @@ describe('igxMask', () => {
51
51
tick ( ) ;
52
52
53
53
input . nativeElement . value = '@#$YUA123' ;
54
+ fixture . detectChanges ( ) ;
54
55
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
55
56
tick ( ) ;
56
57
@@ -149,13 +150,13 @@ describe('igxMask', () => {
149
150
it ( 'Enter incorrect value with a preset mask' , fakeAsync ( ( ) => {
150
151
const fixture = TestBed . createComponent ( MaskComponent ) ;
151
152
fixture . detectChanges ( ) ;
152
-
153
153
const input = fixture . componentInstance . input ;
154
154
155
155
input . nativeElement . dispatchEvent ( new Event ( 'focus' ) ) ;
156
156
tick ( ) ;
157
157
158
158
input . nativeElement . value = 'abc4569d12' ;
159
+ fixture . detectChanges ( ) ;
159
160
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
160
161
tick ( ) ;
161
162
@@ -168,6 +169,7 @@ describe('igxMask', () => {
168
169
tick ( ) ;
169
170
170
171
input . nativeElement . value = '1111111111111111111' ;
172
+ fixture . detectChanges ( ) ;
171
173
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
172
174
tick ( ) ;
173
175
@@ -199,6 +201,7 @@ describe('igxMask', () => {
199
201
tick ( ) ;
200
202
201
203
input . nativeElement . value = '123' ;
204
+ fixture . detectChanges ( ) ;
202
205
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
203
206
tick ( ) ;
204
207
@@ -225,6 +228,7 @@ describe('igxMask', () => {
225
228
expect ( comp . value ) . toEqual ( 3456 ) ;
226
229
227
230
input . nativeElement . value = 'A' ;
231
+ fixture . detectChanges ( ) ;
228
232
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
229
233
tick ( ) ;
230
234
@@ -277,6 +281,7 @@ describe('igxMask', () => {
277
281
tick ( ) ;
278
282
279
283
input . nativeElement . value = '' ;
284
+ fixture . detectChanges ( ) ;
280
285
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
281
286
tick ( ) ;
282
287
@@ -286,6 +291,7 @@ describe('igxMask', () => {
286
291
expect ( input . nativeElement . value ) . toEqual ( '(___) ____-___' ) ;
287
292
288
293
input . nativeElement . value = '6666' ;
294
+ fixture . detectChanges ( ) ;
289
295
input . nativeElement . dispatchEvent ( new Event ( 'input' ) ) ;
290
296
tick ( ) ;
291
297
0 commit comments