Skip to content

Commit 027f96a

Browse files
authored
add testid to toast (#8408)
1 parent c76c484 commit 027f96a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/@react-spectrum/toast/src/Toast.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,15 @@ export const Toast = React.forwardRef(function Toast(props: SpectrumToastProps,
118118
onPress={handleAction}
119119
UNSAFE_className={classNames(styles, 'spectrum-Button')}
120120
variant="secondary"
121-
staticColor="white">
121+
staticColor="white"
122+
data-testid="rsp-toast-secondaryButton">
122123
{actionLabel}
123124
</Button>
124125
}
125126
</div>
126127
</div>
127128
<div className={classNames(styles, 'spectrum-Toast-buttons')}>
128-
<ClearButton {...closeButtonProps} variant="overBackground">
129+
<ClearButton {...closeButtonProps} variant="overBackground" data-testid="rsp-toast-closeButton">
129130
<CrossMedium />
130131
</ClearButton>
131132
</div>

0 commit comments

Comments
 (0)