Skip to content

Commit 84cd4eb

Browse files
committed
test(widgets): render dialog intent assertions via test renderer
1 parent 5364b52 commit 84cd4eb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/core/src/widgets/__tests__/dialogs.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ describe("dialogs", () => {
8585
);
8686

8787
const action = result.findById("primary-intent-action-0");
88-
assert.equal(action?.props["dsVariant"], "solid");
89-
assert.equal(action?.props["dsTone"], "primary");
88+
const actionProps = action?.props as { dsVariant?: unknown; dsTone?: unknown } | undefined;
89+
assert.equal(actionProps?.dsVariant, "solid");
90+
assert.equal(actionProps?.dsTone, "primary");
9091
});
9192

9293
test("ui.dialog maps danger intent to outline/danger DS props", () => {
@@ -101,8 +102,9 @@ describe("dialogs", () => {
101102
);
102103

103104
const action = result.findById("danger-intent-action-0");
104-
assert.equal(action?.props["dsVariant"], "outline");
105-
assert.equal(action?.props["dsTone"], "danger");
105+
const actionProps = action?.props as { dsVariant?: unknown; dsTone?: unknown } | undefined;
106+
assert.equal(actionProps?.dsVariant, "outline");
107+
assert.equal(actionProps?.dsTone, "danger");
106108
});
107109

108110
test("ui.dialog keeps default button styling when action has no intent", () => {

0 commit comments

Comments
 (0)