chore: changes for new alert e2e tests (#6089)

* chore: changes for new alert version related tests

* chore: add test ids
This commit is contained in:
Shaheer Kochai 2024-10-07 09:56:08 +04:30 committed by GitHub
parent 69aab87d72
commit c452e23b18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 2 deletions

View File

@ -55,6 +55,7 @@ function SelectAlertType({ onSelect }: SelectAlertTypeProps): JSX.Element {
onClick={(): void => { onClick={(): void => {
onSelect(option.selection); onSelect(option.selection);
}} }}
data-testid={`alert-type-card-${option.selection}`}
> >
{option.description}{' '} {option.description}{' '}
<Typography.Link <Typography.Link

View File

@ -189,6 +189,7 @@ function BasicInfo({
checked={shouldBroadCastToAllChannels} checked={shouldBroadCastToAllChannels}
onChange={handleBroadcastToAllChannels} onChange={handleBroadcastToAllChannels}
disabled={noChannels || !!channels.loading} disabled={noChannels || !!channels.loading}
data-testid="alert-broadcast-to-all-channels"
/> />
</Tooltip> </Tooltip>
</FormItemMedium> </FormItemMedium>

View File

@ -63,6 +63,7 @@ function ChannelSelect({
mode="multiple" mode="multiple"
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder={t('placeholder_channel_select')} placeholder={t('placeholder_channel_select')}
data-testid="alert-channel-select"
value={currentValue} value={currentValue}
onChange={(value): void => { onChange={(value): void => {
handleChange(value as string[]); handleChange(value as string[]);

View File

@ -99,7 +99,7 @@ function QuerySection({
{ {
label: ( label: (
<Tooltip title="Query Builder"> <Tooltip title="Query Builder">
<Button className="nav-btns"> <Button className="nav-btns" data-testid="query-builder-tab">
<Atom size={14} /> <Atom size={14} />
</Button> </Button>
</Tooltip> </Tooltip>

View File

@ -333,7 +333,7 @@ export const Query = memo(function Query({
const isVersionV4 = version && version === ENTITY_VERSION_V4; const isVersionV4 = version && version === ENTITY_VERSION_V4;
return ( return (
<Row gutter={[0, 12]}> <Row gutter={[0, 12]} className={`query-builder-${version}`}>
<QBEntityOptions <QBEntityOptions
isMetricsDataSource={isMetricsDataSource} isMetricsDataSource={isMetricsDataSource}
showFunctions={ showFunctions={