Add data-warning prop on button for better snapshot testing

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-08-16 15:03:40 -04:00
1 parent 3e02229920
commit b46b3f6e98
6 files changed
+18 -1

No files matched your search

@@ -298,6 +298,7 @@ exports[`add-cluster - navigation using application menu when navigating to add
>
<button
class="Button primary"
data-waiting="false"
disabled=""
type="button"
>
@@ -306,6 +306,7 @@ exports[`extensions - navigation using application menu when navigating to exten
<div>
<button
class="Button button primary"
data-waiting="false"
type="button"
>
Install
@@ -6316,6 +6316,7 @@ exports[`add custom helm repository in preferences when navigating to preference
<button
class="Button waiting primary"
data-testid="custom-helm-repository-submit-button"
data-waiting="true"
type="submit"
>
Add
@@ -7430,6 +7430,7 @@ exports[`showing details for helm release given application is started when navi
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button"
>
Save
@@ -8668,6 +8669,7 @@ exports[`showing details for helm release given application is started when navi
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button"
>
Save
@@ -9906,6 +9908,7 @@ exports[`showing details for helm release given application is started when navi
<button
class="Button waiting primary"
data-testid="helm-release-configuration-save-button"
data-waiting="true"
type="button"
>
Save
@@ -10971,6 +10974,7 @@ exports[`showing details for helm release given application is started when navi
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button"
>
Save
@@ -12037,6 +12041,7 @@ exports[`showing details for helm release given application is started when navi
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
data-waiting="false"
disabled=""
type="button"
>
@@ -13276,6 +13281,7 @@ exports[`showing details for helm release given application is started when navi
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button"
>
Save
+5 -1
View File
@@ -49,7 +49,11 @@ export const Button = withTooltip((props: ButtonProps) => {
// render as button
return (
<button type="button" {...btnProps}>
<button
type="button"
{...btnProps}
data-waiting={typeof waiting === "boolean" ? String(waiting) : undefined}
>
{label}
{children}
</button>
@@ -122,6 +122,7 @@ exports[`kube-object-menu given kube object when removing kube object renders 1`
<button
class="Button ok primary"
data-testid="confirm"
data-waiting="false"
type="button"
>
Remove
@@ -248,6 +249,7 @@ exports[`kube-object-menu given kube object when rerendered with different kube
<button
class="Button ok primary"
data-testid="confirm"
data-waiting="false"
type="button"
>
Remove
@@ -340,6 +342,7 @@ exports[`kube-object-menu given kube object with namespace when removing kube ob
<button
class="Button ok primary"
data-testid="confirm"
data-waiting="false"
type="button"
>
Remove
@@ -432,6 +435,7 @@ exports[`kube-object-menu given kube object without namespace when removing kube
<button
class="Button ok primary"
data-testid="confirm"
data-waiting="false"
type="button"
>
Remove