@truedat/audit 8.4.3 → 8.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/audit",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.5",
|
|
4
4
|
"description": "Truedat Web Audit Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.3.0",
|
|
53
53
|
"@testing-library/user-event": "^14.6.1",
|
|
54
|
-
"@truedat/test": "8.4.
|
|
54
|
+
"@truedat/test": "8.4.5",
|
|
55
55
|
"identity-obj-proxy": "^3.0.0",
|
|
56
56
|
"jest": "^29.7.0",
|
|
57
57
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
84
84
|
"swr": "^2.3.3"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "b02bd52fc13d8e811993059bc50085f841415c91"
|
|
87
87
|
}
|
|
@@ -63,7 +63,7 @@ export const SubscriptionWatchForm = ({
|
|
|
63
63
|
{children}
|
|
64
64
|
<div>
|
|
65
65
|
<Button
|
|
66
|
-
type="
|
|
66
|
+
type="button"
|
|
67
67
|
onClick={handleSubmit}
|
|
68
68
|
disabled={disabled}
|
|
69
69
|
loading={subscriptionUpdating}
|
|
@@ -71,7 +71,7 @@ export const SubscriptionWatchForm = ({
|
|
|
71
71
|
<FormattedMessage id="actions.save" />
|
|
72
72
|
</Button>
|
|
73
73
|
{subscription?.id ? (
|
|
74
|
-
<Button type="
|
|
74
|
+
<Button type="button" onClick={handleDelete}>
|
|
75
75
|
<Icon name="trash alternate outline" color="red" />
|
|
76
76
|
<FormattedMessage id="ruleSubscription.actions.remove" />
|
|
77
77
|
</Button>
|
|
@@ -72,4 +72,27 @@ describe("<SubscriptionWatchForm />", () => {
|
|
|
72
72
|
|
|
73
73
|
expect(handleDelete).toHaveBeenCalledTimes(1);
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
it("renders save and remove buttons as button type", async () => {
|
|
77
|
+
const rendered = render(<SubscriptionWatchForm {...props} />);
|
|
78
|
+
await waitForLoad(rendered);
|
|
79
|
+
|
|
80
|
+
const saveButton = rendered.getByRole("button", { name: /save/i });
|
|
81
|
+
const removeButton = rendered.getByRole("button", { name: /remove/i });
|
|
82
|
+
|
|
83
|
+
expect(saveButton).toHaveAttribute("type", "button");
|
|
84
|
+
expect(removeButton).toHaveAttribute("type", "button");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("does not render remove button when subscription has no id", async () => {
|
|
88
|
+
const rendered = render(
|
|
89
|
+
<SubscriptionWatchForm
|
|
90
|
+
{...props}
|
|
91
|
+
subscription={{ ...subscription, id: undefined }}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
await waitForLoad(rendered);
|
|
95
|
+
|
|
96
|
+
expect(rendered.queryByRole("button", { name: /remove/i })).toBeNull();
|
|
97
|
+
});
|
|
75
98
|
});
|
|
@@ -73,13 +73,13 @@ exports[`<SubscriptionWatchForm /> matches the latest snapshot 1`] = `
|
|
|
73
73
|
<div>
|
|
74
74
|
<button
|
|
75
75
|
class="ui button"
|
|
76
|
-
type="
|
|
76
|
+
type="button"
|
|
77
77
|
>
|
|
78
78
|
actions.save
|
|
79
79
|
</button>
|
|
80
80
|
<button
|
|
81
81
|
class="ui button"
|
|
82
|
-
type="
|
|
82
|
+
type="button"
|
|
83
83
|
>
|
|
84
84
|
<i
|
|
85
85
|
aria-hidden="true"
|