From c452e23b1887b1ba813feb7cb6814aea67e22801 Mon Sep 17 00:00:00 2001 From: Shaheer Kochai Date: Mon, 7 Oct 2024 09:56:08 +0430 Subject: [PATCH] chore: changes for new alert e2e tests (#6089) * chore: changes for new alert version related tests * chore: add test ids --- .../src/container/CreateAlertRule/SelectAlertType/index.tsx | 1 + frontend/src/container/FormAlertRules/BasicInfo.tsx | 1 + frontend/src/container/FormAlertRules/ChannelSelect/index.tsx | 1 + frontend/src/container/FormAlertRules/QuerySection.tsx | 2 +- frontend/src/container/QueryBuilder/components/Query/Query.tsx | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/container/CreateAlertRule/SelectAlertType/index.tsx b/frontend/src/container/CreateAlertRule/SelectAlertType/index.tsx index 52f4d52215..48075649b7 100644 --- a/frontend/src/container/CreateAlertRule/SelectAlertType/index.tsx +++ b/frontend/src/container/CreateAlertRule/SelectAlertType/index.tsx @@ -55,6 +55,7 @@ function SelectAlertType({ onSelect }: SelectAlertTypeProps): JSX.Element { onClick={(): void => { onSelect(option.selection); }} + data-testid={`alert-type-card-${option.selection}`} > {option.description}{' '} diff --git a/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx b/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx index ad1b9fb327..209369c229 100644 --- a/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx +++ b/frontend/src/container/FormAlertRules/ChannelSelect/index.tsx @@ -63,6 +63,7 @@ function ChannelSelect({ mode="multiple" style={{ width: '100%' }} placeholder={t('placeholder_channel_select')} + data-testid="alert-channel-select" value={currentValue} onChange={(value): void => { handleChange(value as string[]); diff --git a/frontend/src/container/FormAlertRules/QuerySection.tsx b/frontend/src/container/FormAlertRules/QuerySection.tsx index aa56c84571..ff958fd253 100644 --- a/frontend/src/container/FormAlertRules/QuerySection.tsx +++ b/frontend/src/container/FormAlertRules/QuerySection.tsx @@ -99,7 +99,7 @@ function QuerySection({ { label: ( - diff --git a/frontend/src/container/QueryBuilder/components/Query/Query.tsx b/frontend/src/container/QueryBuilder/components/Query/Query.tsx index 453cf063f8..e35086f3b0 100644 --- a/frontend/src/container/QueryBuilder/components/Query/Query.tsx +++ b/frontend/src/container/QueryBuilder/components/Query/Query.tsx @@ -333,7 +333,7 @@ export const Query = memo(function Query({ const isVersionV4 = version && version === ENTITY_VERSION_V4; return ( - +