Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

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

Shaheer Kochaic452e23b1887
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}{' '}
<Typography.Link
diff --git a/frontend/src/container/FormAlertRules/BasicInfo.tsx b/frontend/src/container/FormAlertRules/BasicInfo.tsx
index d047ed617b..177c9e0fde 100644
--- a/frontend/src/container/FormAlertRules/BasicInfo.tsx
+++ b/frontend/src/container/FormAlertRules/BasicInfo.tsx
@@ -189,6 +189,7 @@ function BasicInfo({
checked={shouldBroadCastToAllChannels}
onChange={handleBroadcastToAllChannels}
disabled={noChannels || !!channels.loading}
+ data-testid="alert-broadcast-to-all-channels"
/>
</Tooltip>
</FormItemMedium>
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: (
<Tooltip title="Query Builder">
- <Button className="nav-btns">
+ <Button className="nav-btns" data-testid="query-builder-tab">
<Atom size={14} />
</Button>
</Tooltip>
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 (
- <Row gutter={[0, 12]}>
+ <Row gutter={[0, 12]} className={`query-builder-${version}`}>
<QBEntityOptions
isMetricsDataSource={isMetricsDataSource}
showFunctions={