1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add data-warning prop on button for better snapshot testing (#6040)

This commit is contained in:
Sebastian Malton 2022-08-30 05:28:20 -07:00 committed by GitHub
parent ac6a5f9b83
commit 106c3d246a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 1 deletions

View File

@ -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"
>

View File

@ -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

View File

@ -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

View File

@ -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

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>

View File

@ -126,6 +126,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
@ -256,6 +257,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
@ -350,6 +352,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
@ -444,6 +447,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