Skip to content

Commit a91ccfa

Browse files
author
manasa
committed
Fixed the issue where caseSummary fields were not updating
1 parent 6d32fe2 commit a91ccfa

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

packages/react-sdk-components/src/bridge/react_pconnect.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ const connectRedux = (component, c11nEnv) => {
100100
}
101101
}
102102
}
103+
// For CaseSummary, we need to compare changes in
104+
// primaryFields and secondary Fields
105+
if (next.template === 'CaseSummary') {
106+
for (const key of Object.keys(prev)) {
107+
if (!PCore.isDeepEqual(next[key], prev[key])) {
108+
return false;
109+
}
110+
}
111+
}
103112
/* TODO For some rawConfig we are not getting routingInfo under allStateProps */
104113
return !routingInfoCompare(next, prev);
105114
}

packages/react-sdk-components/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
123123
slotProps={{
124124
input: {
125125
readOnly: true,
126-
inputProps: {
127-
style: { cursor: 'pointer' },
128-
disableUnderline: true
129-
}
126+
disableUnderline: true,
127+
inputProps: { style: { cursor: 'pointer' } }
130128
}
131129
}}
132130
/>

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ test.describe('E2E test', () => {
2323
await newServiceCase.click();
2424
caseID = await page.locator('#caseId').textContent();
2525

26-
const firstNameInput = page.locator('input[data-test-id="BC910F8BDF70F29374F496F05BE0330C"]');
26+
let firstNameInput = page.locator('input[data-test-id="BC910F8BDF70F29374F496F05BE0330C"]');
2727
await firstNameInput.click();
2828
await firstNameInput.fill('John');
2929

3030
const middleNameInput = page.locator('input[data-test-id="D3691D297D95C48EF1A2B7D6523EF3F0"]');
3131
await middleNameInput.click();
3232
await middleNameInput.fill('');
3333

34-
const lastNameInput = page.locator('input[data-test-id="77587239BF4C54EA493C7033E1DBF636"]');
34+
let lastNameInput = page.locator('input[data-test-id="77587239BF4C54EA493C7033E1DBF636"]');
3535
await lastNameInput.click();
3636
await lastNameInput.fill('Doe');
3737

3838
const suffix = page.locator('div[data-test-id="56E6DDD1CB6CEC596B433440DFB21C17"]');
3939
await suffix.locator('button[title="Open"]').click();
4040
await page.locator('li:has-text("Jr")').click();
4141

42-
const emailInput = page.locator('input[data-test-id="CE8AE9DA5B7CD6C3DF2929543A9AF92D"]');
42+
let emailInput = page.locator('input[data-test-id="CE8AE9DA5B7CD6C3DF2929543A9AF92D"]');
4343
await emailInput.click();
4444
await emailInput.fill('[email protected]');
4545

@@ -52,6 +52,16 @@ test.describe('E2E test', () => {
5252

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

55+
const caseSummary = page.locator('div[id="CaseSummary"]');
56+
firstNameInput = caseSummary.locator('input').first();
57+
await expect(firstNameInput).toHaveValue('John');
58+
59+
lastNameInput = caseSummary.locator('input').nth(2);
60+
await expect(lastNameInput).toHaveValue('Doe');
61+
62+
emailInput = caseSummary.locator('input').nth(3);
63+
await expect(emailInput).toHaveValue('[email protected]');
64+
5565
const streetInput = page.locator('input[data-test-id="D61EBDD8A0C0CD57C22455E9F0918C65"]');
5666
await streetInput.click();
5767
await streetInput.fill('Main St');

0 commit comments

Comments
 (0)