Frontend: Migrate NewsContainer.tsx from aria-label e2e selectors to data-testid (#79666)
This commit is contained in:
@@ -133,7 +133,7 @@ export const Components = {
|
||||
title: (title: string) => `Drawer title ${title}`,
|
||||
expand: 'Drawer expand',
|
||||
contract: 'Drawer contract',
|
||||
close: 'Drawer close',
|
||||
close: 'data-testid Drawer close',
|
||||
rcContentWrapper: () => '.rc-drawer-content-wrapper',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -9,8 +9,9 @@ import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { useStyles2 } from '../../themes';
|
||||
import { Button } from '../Button';
|
||||
import { t } from '../../utils/i18n';
|
||||
import { CustomScrollbar } from '../CustomScrollbar/CustomScrollbar';
|
||||
import { IconButton } from '../IconButton/IconButton';
|
||||
import { Text } from '../Text/Text';
|
||||
|
||||
export interface Props {
|
||||
@@ -116,12 +117,12 @@ export function Drawer({
|
||||
{typeof title === 'string' && (
|
||||
<div className={cx(styles.header, Boolean(tabs) && styles.headerWithTabs)}>
|
||||
<div className={styles.actions}>
|
||||
<Button
|
||||
icon="times"
|
||||
<IconButton
|
||||
name="times"
|
||||
variant="secondary"
|
||||
fill="text"
|
||||
onClick={onClose}
|
||||
aria-label={selectors.components.Drawer.General.close}
|
||||
data-testid={selectors.components.Drawer.General.close}
|
||||
tooltip={t(`drawer.close`, 'Close Drawer')}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.titleWrapper}>
|
||||
|
||||
Reference in New Issue
Block a user