Skip to content

Conversation

DavidRajnoha
Copy link
Contributor

@DavidRajnoha DavidRajnoha commented Oct 22, 2025

Add Silence Matching Regression Test

**Depends on #609 **

Summary

Adds comprehensive e2e regression test for silences matching logic (Section 3.2 from test documentation).
Injects data-test-ids for the alert chart.

Bug

Silences were being matched by alert name only, not by the complete signature of alertname + namespace + severity. This caused alerts with the same name but different namespaces to incorrectly share silence status.

Verifies: OU-1020, OU-706

Tests

New test file 03.reg_api_calls.cy.ts that verifies silence matching works correctly by testing:

  1. Silenced alert behavior

    • Reduced opacity (0.3) for visual distinction
    • Tooltip displays "(silenced)" indicator
  2. Non-silenced alert behavior

    • Full opacity (1.0)
    • Tooltip does NOT display "(silenced)" indicator
  3. Same alert name, different namespaces

    • Each namespace is evaluated independently
    • Single incident can contain both silenced and non-silenced alerts with same name

Technical Details

  • Uses fixture 9-silenced-alerts-mixed-scenario.yaml with test scenarios
  • Extracted helper functions to eliminate duplication:
    • selectIncidentAndWaitForAlerts() - incident selection with wait
    • verifyAlertOpacity() - opacity assertion
    • verifyAlertTooltip() - tooltip content verification
  • Single comprehensive test flow following e2e best practices

- Add test for initial incidents loading without filter manipulation (OU-1002)
- Add parameterized tests for dropdown closure on deselection (OU-1033)
  * Tests 3 dropdown types (filter type, severity, days)
  * Tests 2 deselection methods (bar click, chip removal)
- Add test for incident ID filter preservation (OU-1030)
Add comprehensive regression tests for tooltip positioning, bar sorting,
and date/time display in incidents charts.

- 3 consolidated test sections covering  various scenarios
- Page object enhancements for alert chart interactions
- Victory chart tooltip positioning with 12px arrow + 8px margin validation

Verifies Section 2 of TESTING_CHECKLIST.md
Verify silences matched by alertname+namespace+severity with opacity
and tooltip indicators across single and multi-alert scenarios.

Includes data-test-ids for alert chart elements.
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 22, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 22, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 22, 2025

@DavidRajnoha: This pull request references OBSINTA-777 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.21.0" version, but no target version was set.

In response to this:

Add Silence Matching Regression Test

**Depends on #609 **

Summary

Adds comprehensive e2e regression test for silences matching logic (Section 3.2 from test documentation).
Injects data-test-ids for the alert chart.

Bug

Silences were being matched by alert name only, not by the complete signature of alertname + namespace + severity. This caused alerts with the same name but different namespaces to incorrectly share silence status.

Verifies: OU-1020, OU-706

Tests

New test file 03.reg_api_calls.cy.ts that verifies silence matching works correctly by testing:

  1. Silenced alert behavior
  • Reduced opacity (0.3) for visual distinction
  • Tooltip displays "(silenced)" indicator
  1. Non-silenced alert behavior
  • Full opacity (1.0)
  • Tooltip does NOT display "(silenced)" indicator
  1. Same alert name, different namespaces
  • Each namespace is evaluated independently
  • Single incident can contain both silenced and non-silenced alerts with same name

Technical Details

  • Uses fixture 9-silenced-alerts-mixed-scenario.yaml with test scenarios
  • Extracted helper functions to eliminate duplication:
  • selectIncidentAndWaitForAlerts() - incident selection with wait
  • verifyAlertOpacity() - opacity assertion
  • verifyAlertTooltip() - tooltip content verification
  • Single comprehensive test flow following e2e best practices

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 22, 2025

@DavidRajnoha: This pull request references OBSINTA-777 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.21.0" version, but no target version was set.

In response to this:

Add Silence Matching Regression Test

**Depends on #609 **

Summary

Adds comprehensive e2e regression test for silences matching logic (Section 3.2 from test documentation).
Injects data-test-ids for the alert chart.

Bug

Silences were being matched by alert name only, not by the complete signature of alertname + namespace + severity. This caused alerts with the same name but different namespaces to incorrectly share silence status.

Verifies: OU-1020, OU-706

Tests

New test file 03.reg_api_calls.cy.ts that verifies silence matching works correctly by testing:

  1. Silenced alert behavior
  • Reduced opacity (0.3) for visual distinction
  • Tooltip displays "(silenced)" indicator
  1. Non-silenced alert behavior
  • Full opacity (1.0)
  • Tooltip does NOT display "(silenced)" indicator
  1. Same alert name, different namespaces
  • Each namespace is evaluated independently
  • Single incident can contain both silenced and non-silenced alerts with same name

Technical Details

  • Uses fixture 9-silenced-alerts-mixed-scenario.yaml with test scenarios
  • Extracted helper functions to eliminate duplication:
  • selectIncidentAndWaitForAlerts() - incident selection with wait
  • verifyAlertOpacity() - opacity assertion
  • verifyAlertTooltip() - tooltip content verification
  • Single comprehensive test flow following e2e best practices

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: DavidRajnoha
Once this PR has been reviewed and has the lgtm label, please assign kyoto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants