@@ -117,15 +117,15 @@ test.describe('E2E test', () => {
117117 await modal . locator ( 'input[data-test-id="202003240938510831411"]' ) . fill ( 'MA' ) ;
118118 await modal . locator ( 'input[data-test-id="202003240938510832734"]' ) . fill ( '02142' ) ;
119119
120- // phone = page.locator('mat-tel-input[data-test-id="1f8261d17452a959e013666c5df45e07"]');
121- // countrySelector = phone.locator('button.country-selector');
122- // await countrySelector.click();
123- // await page.locator('div.flag.US >> nth=0').click();
124- // await phone.locator('input[type="tel"]').fill('6175551212');
120+ phone = page . locator ( 'mat-tel-input[data-test-id="1f8261d17452a959e013666c5df45e07"]' ) ;
121+ countrySelector = phone . locator ( 'button.country-selector' ) ;
122+ await countrySelector . click ( ) ;
123+ await page . locator ( 'div.flag.US >> nth=0' ) . click ( ) ;
124+ await phone . locator ( 'input[type="tel"]' ) . fill ( '6175551212' ) ;
125125
126- // const country = modal.locator('mat-select[data-test-id="59716c97497eb9694541f7c3d37b1a4d"]');
127- // await country.click();
128- // await page.getByRole('option', { name: 'Switzerland' }).click();
126+ const country = modal . locator ( 'mat-select[data-test-id="59716c97497eb9694541f7c3d37b1a4d"]' ) ;
127+ await country . click ( ) ;
128+ await page . getByRole ( 'option' , { name : 'Switzerland' } ) . click ( ) ;
129129
130130 /** submitting the record */
131131 await modal . locator ( 'button:has-text("submit")' ) . click ( ) ;
@@ -137,7 +137,9 @@ test.describe('E2E test', () => {
137137 await expect ( table . locator ( 'td >> text="Cambridge"' ) ) . toBeVisible ( ) ;
138138 await expect ( table . locator ( 'td >> text="MA"' ) ) . toBeVisible ( ) ;
139139 await expect ( table . locator ( 'td >> text="02142"' ) ) . toBeVisible ( ) ;
140- // await expect(table.locator('td >> text="+16175551212"')).toBeVisible();
140+ await expect ( table . locator ( 'td >> text="+16175551212"' ) ) . toBeVisible ( ) ;
141+
142+ // Todo: Below piece of commented scenario is working fine in runtime but failing only during test case execution.
141143
142144 // await page.locator('button:has-text("Next")').click();
143145
@@ -146,11 +148,11 @@ test.describe('E2E test', () => {
146148 // await expect(table.locator('td >> text="Cambridge"')).toBeVisible();
147149 // await expect(table.locator('td >> text="MA"')).toBeVisible();
148150 // await expect(table.locator('td >> text="02142"')).toBeVisible();
149- // await expect(table.locator('td >> text="6175551212 "')).toBeVisible();
151+ // await expect(table.locator('td >> text="+16175551212 "')).toBeVisible();
150152
151153 // await page.locator('button:has-text("Previous")').click();
154+ //await expect(table).toBeVisible();
152155
153- // await expect(table).toBeVisible();
154156 /** Edit Record tests */
155157 await table . locator ( '.header-icon' ) . click ( ) ;
156158 let editMenu = await page . locator ( 'div[role="menu"]' ) ;
0 commit comments