Skip to content

Commit 5b5f464

Browse files
committed
test(platform-objects): hold Change Role's whole description, fallback included
The console's pin evaluates this exact sentence through a real ActionRunner, including the fallback for a row that does not expand user_id; holding the whole declaration here keeps that copy from drifting. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyekmZuiE5TVrwDWqH
1 parent fa9836b commit 5b5f464

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/platform-objects/src/identity/invitation-screens-copy.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ describe('row 8 — one role help text, a line per role', () => {
9393

9494
it('Change Role names the member it changes, with a fallback for a row without the user', () => {
9595
const changeRole = action(SysMember, 'update_member_role');
96-
expect(changeRole.description).toContain("${record.user_id?.name ?? 'this member'}");
96+
// The whole sentence, not just its hole: the console's pin
97+
// (`ActionParamDialog.invitationScreens-27521.test.tsx`) runs this exact
98+
// text through a real `ActionRunner`, and reads "this member" for a row
99+
// that does not expand `user_id`. A reworded declaration reds here first.
100+
expect(changeRole.description).toBe("Choose the new organization role for ${record.user_id?.name ?? 'this member'}.");
97101
expect(changeRole.confirmText).toBeUndefined();
98102
});
99103
});

0 commit comments

Comments
 (0)