Skip to content

Commit 2ac0097

Browse files
fix: small fixes from PR comments
1 parent 112fac3 commit 2ac0097

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

packages/pluggableWidgets/progress-circle-web/src/components/ProgressCircle.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,9 @@ export const ProgressCircle: FunctionComponent<ProgressCircleProps> = ({
8989
)}
9090
style={style}
9191
>
92-
{alertMessage ? (
93-
<Alert bootstrapStyle="danger" role="alert">
94-
{alertMessage}
95-
</Alert>
96-
) : null}
92+
<Alert bootstrapStyle="danger" role="alert">
93+
{alertMessage}
94+
</Alert>
9795
<div
9896
className={classNames("h2", "progress-circle-label-container", {
9997
"widget-progress-circle-clickable": !!onClick

packages/pluggableWidgets/switch-web/src/__tests__/Switch.spec.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import "@testing-library/jest-dom";
2-
// Removed unused Alert, AlertProps imports
32
import { actionValue, EditableValueBuilder } from "@mendix/widget-plugin-test-utils";
43
import { render, fireEvent } from "@testing-library/react";
54
import { createElement } from "react";
6-
7-
// Removed unused SwitchComponent, SwitchProps imports
85
import { SwitchContainerProps } from "../../typings/SwitchProps";
96
import { Switch } from "../Switch";
107

@@ -105,8 +102,6 @@ describe("Switch", () => {
105102
expect(wrapper?.getAttribute("aria-readonly")).toBe("false");
106103
});
107104

108-
// Removed preventDefault tests: RTL does not support checking preventDefault on synthetic events
109-
110105
it("invokes action on click", () => {
111106
const props = createProps({ action: actionValue() });
112107
const { container } = renderSwitch(props);
@@ -201,7 +196,5 @@ describe("Switch", () => {
201196
fireEvent.click(button!);
202197
expect(props.booleanAttribute.setValue).not.toHaveBeenCalled();
203198
});
204-
205-
// Removed preventDefault tests: RTL does not support checking preventDefault on synthetic events
206199
});
207200
});

0 commit comments

Comments
 (0)