@@ -127,8 +127,7 @@ test.describe('E2E test', () => {
127127 await phone . locator ( 'button' ) . click ( ) ;
128128 /** Selecting the country code */
129129 await page . locator ( 'text=United States+1 >> nth=0' ) . click ( ) ;
130- await phone . locator ( 'input' ) . click ( ) ;
131- await phone . locator ( 'input' ) . pressSequentially ( '6175551212' ) ;
130+ await common . enterPhoneNumber ( phone , '6175551212' ) ;
132131
133132 /** Creating second row by clicking on `+Add` button */
134133 await page . locator ( 'a:has-text("+ Add")' ) . click ( ) ;
@@ -143,8 +142,7 @@ test.describe('E2E test', () => {
143142 await phone . locator ( 'button' ) . click ( ) ;
144143 /** Selecting the country code */
145144 await page . locator ( 'text=United States+1 >> nth=0' ) . click ( ) ;
146- await phone . locator ( 'input' ) . click ( ) ;
147- await phone . locator ( 'input' ) . pressSequentially ( '6175451212' ) ;
145+ await common . enterPhoneNumber ( phone , '6175451212' ) ;
148146
149147 await page . locator ( 'button:has-text("Next")' ) . click ( ) ;
150148
@@ -241,8 +239,7 @@ test.describe('E2E test', () => {
241239 await phone . locator ( 'button' ) . click ( ) ;
242240 /** Selecting the country code */
243241 await page . locator ( 'text=United States+1 >> nth=0' ) . click ( ) ;
244- await phone . locator ( 'input' ) . click ( ) ;
245- await phone . locator ( 'input' ) . pressSequentially ( '6175551212' ) ;
242+ await common . enterPhoneNumber ( phone , '6175551212' ) ;
246243
247244 const country = modal . locator ( 'div[data-test-id="59716c97497eb9694541f7c3d37b1a4d"]' ) ;
248245 await country . click ( ) ;
@@ -335,8 +332,7 @@ test.describe('E2E test', () => {
335332 await phone . locator ( 'button' ) . click ( ) ;
336333 /** Selecting the country code */
337334 await page . locator ( 'text=United States+1 >> nth=0' ) . click ( ) ;
338- await phone . locator ( 'input' ) . click ( ) ;
339- await phone . locator ( 'input' ) . pressSequentially ( '6175551212' ) ;
335+ await common . enterPhoneNumber ( phone , '6175551212' ) ;
340336
341337 let countryName = page . locator ( 'div[data-test-id="59716c97497eb9694541f7c3d37b1a4d"]' ) ;
342338 await countryName . click ( ) ;
@@ -355,8 +351,7 @@ test.describe('E2E test', () => {
355351 await phone . locator ( 'button' ) . click ( ) ;
356352 /** Selecting the country code */
357353 await page . locator ( 'text=United States+1 >> nth=0' ) . click ( ) ;
358- await phone . locator ( 'input' ) . click ( ) ;
359- await phone . locator ( 'input' ) . pressSequentially ( '6175451212' ) ;
354+ await common . enterPhoneNumber ( phone , '6175451212' ) ;
360355
361356 countryName = page . locator ( 'div[data-test-id="59716c97497eb9694541f7c3d37b1a4d"] >> nth=1' ) ;
362357 await countryName . click ( ) ;
0 commit comments