Chore: Migrate from aria-label to data-testid in plugin-related tests (#79272)
* Update basicsettings for datasource * Change aria-label for data-testid * Update more tests * Update betterer * Remove unnecessary data-testid * Put back aria label for some datasource selectors * Try to use data-testid with alerts * Update betterer
This commit is contained in:
@@ -17,11 +17,11 @@ export const Pages = {
|
||||
url: '/',
|
||||
},
|
||||
DataSource: {
|
||||
name: 'Data source settings page name input field',
|
||||
name: 'data-testid Data source settings page name input field',
|
||||
delete: 'Data source settings page Delete button',
|
||||
readOnly: 'Data source settings page read only message',
|
||||
readOnly: 'data-testid Data source settings page read only message',
|
||||
saveAndTest: 'data-testid Data source settings page Save and Test button',
|
||||
alert: 'Data source settings page Alert',
|
||||
alert: 'data-testid Data source settings page Alert',
|
||||
},
|
||||
DataSources: {
|
||||
url: '/datasources',
|
||||
@@ -268,12 +268,12 @@ export const Pages = {
|
||||
page: 'Plugins list page',
|
||||
list: 'Plugins list',
|
||||
listItem: 'Plugins list item',
|
||||
signatureErrorNotice: 'Unsigned plugins notice',
|
||||
signatureErrorNotice: 'data-testid Unsigned plugins notice',
|
||||
},
|
||||
PluginPage: {
|
||||
page: 'Plugin page',
|
||||
signatureInfo: 'Plugin signature info',
|
||||
disabledInfo: 'Plugin disabled info',
|
||||
signatureInfo: 'data-testid Plugin signature info',
|
||||
disabledInfo: 'data-testid Plugin disabled info',
|
||||
},
|
||||
PlaylistForm: {
|
||||
name: 'Playlist name',
|
||||
|
||||
@@ -54,15 +54,9 @@ export const Alert = React.forwardRef<HTMLDivElement, Props>(
|
||||
const ariaLabel = restProps['aria-label'] || title;
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cx(styles.wrapper, className)}
|
||||
data-testid={selectors.components.Alert.alertV2(severity)}
|
||||
role={role}
|
||||
aria-label={ariaLabel}
|
||||
{...restProps}
|
||||
>
|
||||
<div ref={ref} className={cx(styles.wrapper, className)} role={role} aria-label={ariaLabel} {...restProps}>
|
||||
<Box
|
||||
data-testid={selectors.components.Alert.alertV2(severity)}
|
||||
display="flex"
|
||||
backgroundColor={severity}
|
||||
borderRadius="default"
|
||||
|
||||
Reference in New Issue
Block a user