Alerting: Use the stepNo to make sure the ID of the switch is unique (#97405)

This commit is contained in:
Gilles De Mey 2024-12-05 13:08:41 +01:00 committed by GitHub
parent 20e619e445
commit 9a262c867c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ export const RuleEditorSection = ({
{switchMode && ( {switchMode && (
<Text variant="bodySmall"> <Text variant="bodySmall">
<InlineSwitch <InlineSwitch
id="query-and-expressions-advanced-switch" id={`advanced-switch-${stepNo}`}
data-testid={ data-testid={
switchMode.isAdvancedMode switchMode.isAdvancedMode
? 'query-and-expressions-advanced-options' ? 'query-and-expressions-advanced-options'