Skip to content

Commit c802d10

Browse files
Merge pull request #166 from pegasystems/mod/tor/testsFixes
Fix tests for infiniy '23
2 parents 52768a8 + 7daa777 commit c802d10

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/react-sdk-components/tests/e2e/Digv2/FormFields/Email.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ test.describe('E2E test', () => {
112112
const editableEmail = page.locator(
113113
'input[data-test-id="c75f8a926bb5e08fd8342f7fe45dc344"]'
114114
);
115-
editableEmail.type("Johndoe.com");
115+
await editableEmail.type("Johndoe.com");
116116
await editableEmail.blur();
117-
await expect(page.locator('p:has-text("Invalid value specified for EmailEditable")')).toBeVisible();
117+
await expect(page.locator('p:has-text("Invalid Email")')).toBeVisible();
118118
editableEmail.fill("[email protected]");
119119
await editableEmail.blur();
120-
await expect(page.locator('p:has-text("Invalid value specified for EmailEditable")')).toBeHidden();
120+
await expect(page.locator('p:has-text("Invalid Email")')).toBeHidden();
121121

122122
attributes = await common.getAttributes(editableEmail);
123123
await expect(attributes.includes('readonly')).toBeFalsy();

packages/react-sdk-components/tests/e2e/Digv2/FormFields/URL.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ test.describe('E2E test', () => {
9898
await expect(attributes.includes('readonly')).toBeFalsy();
9999

100100
/** Validation tests */
101-
const validationMsg =
102-
'Please enter a valid URL including the protocol (http://, https://, ftp://, etc.)';
101+
const validationMsg = 'Invalid URL';
103102
await EditableURL.type('InvalidUrl');
104103
await EditableURL.blur();
105104
await expect(page.locator(`p:has-text("${validationMsg}")`)).toBeVisible();

packages/react-sdk-components/tests/e2e/MediaCo/portal.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ test.describe('E2E test', () => {
3131

3232
const newServiceCase = page.locator('div[role="button"]:has-text("New Service")');
3333
await newServiceCase.click();
34-
3534
caseID = await page.locator('#caseId').textContent();
3635

3736
const firstNameInput = page.locator('input[data-test-id="BC910F8BDF70F29374F496F05BE0330C"]');
@@ -119,14 +118,16 @@ test.describe('E2E test', () => {
119118
const attachmentID = await page.locator('div[id="attachment-ID"]').textContent();
120119
await page.setInputFiles(`#${attachmentID}`, filePath);
121120

121+
const PCoreVersion = await page.evaluate(() => window.PCore.getPCoreVersion());
122+
122123
await Promise.all([
123124
page.waitForResponse(`${endpoints.serverConfig.infinityRestServerUrl}${endpoints.serverConfig.appAlias ? `/app/${endpoints.serverConfig.appAlias}` : ""}/api/application/v2/attachments/upload`)
124125
]);
125126

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

128129
await Promise.all([
129-
page.waitForResponse(`${endpoints.serverConfig.infinityRestServerUrl}${endpoints.serverConfig.appAlias ? `/app/${endpoints.serverConfig.appAlias}` : ""}/api/application/v2/cases/${currentCaseID}/attachments`),
130+
page.waitForResponse(`${endpoints.serverConfig.infinityRestServerUrl}${endpoints.serverConfig.appAlias ? `/app/${endpoints.serverConfig.appAlias}` : ""}/api/application/v2/cases/${currentCaseID}/attachments${PCoreVersion.includes('8.23') ? '?includeThumbnail=false' : ''}`),
130131
]);
131132

132133
const attachmentCount = await page.locator('div[id="attachments-count"]').textContent();

0 commit comments

Comments
 (0)