Skip to content

Commit c09749f

Browse files
vishalshrm539Vishal
andauthored
Fix EmbeddedData and other tests (#483)
Co-authored-by: Vishal <vishal.sharma@in.pega.com>
1 parent 8f39d7c commit c09749f

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

tests/e2e/Digv2/ComplexFields/EmbeddedData.spec.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ 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').fill('6175551212');
130+
await phone.locator('input').click();
131+
await phone.locator('input').pressSequentially('6175551212');
131132

132133
/** Creating second row by clicking on `+Add` button */
133134
await page.locator('a:has-text("+ Add")').click();
@@ -142,7 +143,8 @@ test.describe('E2E test', () => {
142143
await phone.locator('button').click();
143144
/** Selecting the country code */
144145
await page.locator('text=United States+1 >> nth=0').click();
145-
await phone.locator('input').fill('6175451212');
146+
await phone.locator('input').click();
147+
await phone.locator('input').pressSequentially('6175451212');
146148

147149
await page.locator('button:has-text("Next")').click();
148150

@@ -239,7 +241,8 @@ test.describe('E2E test', () => {
239241
await phone.locator('button').click();
240242
/** Selecting the country code */
241243
await page.locator('text=United States+1 >> nth=0').click();
242-
await phone.locator('input').fill('6175551212');
244+
await phone.locator('input').click();
245+
await phone.locator('input').pressSequentially('6175551212');
243246

244247
const country = modal.locator('div[data-test-id="59716c97497eb9694541f7c3d37b1a4d"]');
245248
await country.click();
@@ -332,7 +335,8 @@ test.describe('E2E test', () => {
332335
await phone.locator('button').click();
333336
/** Selecting the country code */
334337
await page.locator('text=United States+1 >> nth=0').click();
335-
await phone.locator('input').fill('6175551212');
338+
await phone.locator('input').click();
339+
await phone.locator('input').pressSequentially('6175551212');
336340

337341
let countryName = page.locator('div[data-test-id="59716c97497eb9694541f7c3d37b1a4d"]');
338342
await countryName.click();
@@ -351,7 +355,8 @@ test.describe('E2E test', () => {
351355
await phone.locator('button').click();
352356
/** Selecting the country code */
353357
await page.locator('text=United States+1 >> nth=0').click();
354-
await phone.locator('input').fill('6175451212');
358+
await phone.locator('input').click();
359+
await phone.locator('input').pressSequentially('6175451212');
355360

356361
countryName = page.locator('div[data-test-id="59716c97497eb9694541f7c3d37b1a4d"] >> nth=1');
357362
await countryName.click();

tests/e2e/Digv2/FormFields/Phone.spec.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ test.describe('E2E test', () => {
8484
await page.locator('text=United States+1 >> nth=0').click();
8585
const editablePhoneInput = editablePhone.locator('input');
8686
await editablePhoneInput.click();
87-
await editablePhoneInput.fill('6175551212');
87+
await editablePhoneInput.pressSequentially('6175551212');
8888

8989
/** Validation tests */
9090
const validationMsg = 'Invalid Phone';
@@ -93,7 +93,7 @@ test.describe('E2E test', () => {
9393
await page.locator('text=United States+1 >> nth=0').click();
9494
await editablePhoneInput.click();
9595
/** Entering an invalid Phone number */
96-
await editablePhoneInput.fill('61');
96+
await editablePhoneInput.pressSequentially('61');
9797
await editablePhoneInput.blur();
9898
/** Expecting an error for Invalid phone number */
9999
await expect(page.locator(`p:has-text("${validationMsg}")`)).toBeVisible();
@@ -102,7 +102,8 @@ test.describe('E2E test', () => {
102102
await editablePhoneInput.clear();
103103
await countrySelector.click();
104104
await page.locator('text=United States+1 >> nth=0').click();
105-
await editablePhoneInput.fill('6175551212');
105+
await editablePhoneInput.click();
106+
await editablePhoneInput.pressSequentially('6175551212');
106107

107108
await editablePhoneInput.blur();
108109
/** Expecting the invalid Phone number error be no longer present */

tests/e2e/Digv2/ViewTemplates/Confirmation.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ test.describe('E2E test', () => {
4848
await countrySelector.click();
4949
await page.locator('text=United States+1 >> nth=0').click();
5050
const phoneInput = phone.locator('input');
51-
await phoneInput.fill('6175551212');
51+
await phoneInput.click();
52+
await phoneInput.pressSequentially('6175551212');
5253

5354
await page.locator('button:has-text("submit")').click();
5455

tests/e2e/MediaCo/embedded.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ test.describe('E2E test', () => {
6262
await page.locator('text=United States+1 >> nth=0').click();
6363
const phoneInput = phone.locator('input');
6464
await phoneInput.click();
65-
await phoneInput.fill('6175551212');
65+
await phoneInput.pressSequentially('6175551212');
6666

6767
await page.locator('button:has-text("next")').click();
6868

tests/e2e/MediaCo/portal.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test.describe('E2E test', () => {
7474
await page.locator('text=United States+1 >> nth=0').click();
7575
const phoneInput = phone.locator('input');
7676
await phoneInput.click();
77-
await phoneInput.fill('6175551212');
77+
await phoneInput.pressSequentially('6175551212');
7878

7979
await page.locator('button:has-text("submit")').click();
8080

0 commit comments

Comments
 (0)