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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-08-16 15:03:40 -04:00
parent 3e02229920
commit b46b3f6e98
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 <button
class="Button primary" class="Button primary"
data-waiting="false"
disabled="" disabled=""
type="button" type="button"
> >

View File

@ -306,6 +306,7 @@ exports[`extensions - navigation using application menu when navigating to exten
<div> <div>
<button <button
class="Button button primary" class="Button button primary"
data-waiting="false"
type="button" type="button"
> >
Install Install

View File

@ -6316,6 +6316,7 @@ exports[`add custom helm repository in preferences when navigating to preference
<button <button
class="Button waiting primary" class="Button waiting primary"
data-testid="custom-helm-repository-submit-button" data-testid="custom-helm-repository-submit-button"
data-waiting="true"
type="submit" type="submit"
> >
Add Add

View File

@ -7430,6 +7430,7 @@ exports[`showing details for helm release given application is started when navi
<button <button
class="Button primary" class="Button primary"
data-testid="helm-release-configuration-save-button" data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button" type="button"
> >
Save Save
@ -8668,6 +8669,7 @@ exports[`showing details for helm release given application is started when navi
<button <button
class="Button primary" class="Button primary"
data-testid="helm-release-configuration-save-button" data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button" type="button"
> >
Save Save
@ -9906,6 +9908,7 @@ exports[`showing details for helm release given application is started when navi
<button <button
class="Button waiting primary" class="Button waiting primary"
data-testid="helm-release-configuration-save-button" data-testid="helm-release-configuration-save-button"
data-waiting="true"
type="button" type="button"
> >
Save Save
@ -10971,6 +10974,7 @@ exports[`showing details for helm release given application is started when navi
<button <button
class="Button primary" class="Button primary"
data-testid="helm-release-configuration-save-button" data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button" type="button"
> >
Save Save
@ -12037,6 +12041,7 @@ exports[`showing details for helm release given application is started when navi
<button <button
class="Button primary" class="Button primary"
data-testid="helm-release-configuration-save-button" data-testid="helm-release-configuration-save-button"
data-waiting="false"
disabled="" disabled=""
type="button" type="button"
> >
@ -13276,6 +13281,7 @@ exports[`showing details for helm release given application is started when navi
<button <button
class="Button primary" class="Button primary"
data-testid="helm-release-configuration-save-button" data-testid="helm-release-configuration-save-button"
data-waiting="false"
type="button" type="button"
> >
Save Save

View File

@ -49,7 +49,11 @@ export const Button = withTooltip((props: ButtonProps) => {
// render as button // render as button
return ( return (
<button type="button" {...btnProps}> <button
type="button"
{...btnProps}
data-waiting={typeof waiting === "boolean" ? String(waiting) : undefined}
>
{label} {label}
{children} {children}
</button> </button>

View File

@ -122,6 +122,7 @@ exports[`kube-object-menu given kube object when removing kube object renders 1`
<button <button
class="Button ok primary" class="Button ok primary"
data-testid="confirm" data-testid="confirm"
data-waiting="false"
type="button" type="button"
> >
Remove Remove
@ -248,6 +249,7 @@ exports[`kube-object-menu given kube object when rerendered with different kube
<button <button
class="Button ok primary" class="Button ok primary"
data-testid="confirm" data-testid="confirm"
data-waiting="false"
type="button" type="button"
> >
Remove Remove
@ -340,6 +342,7 @@ exports[`kube-object-menu given kube object with namespace when removing kube ob
<button <button
class="Button ok primary" class="Button ok primary"
data-testid="confirm" data-testid="confirm"
data-waiting="false"
type="button" type="button"
> >
Remove Remove
@ -432,6 +435,7 @@ exports[`kube-object-menu given kube object without namespace when removing kube
<button <button
class="Button ok primary" class="Button ok primary"
data-testid="confirm" data-testid="confirm"
data-waiting="false"
type="button" type="button"
> >
Remove Remove