Skip to content

Conversation

@sanketpathak
Copy link
Contributor

Description

https://issues.redhat.com/browse/RHIDP-11263

Please explain the changes you made here.

Which issue(s) does this PR fix

  • Fixes #?

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

@openshift-ci openshift-ci bot requested review from josephca and zdrapela January 23, 2026 11:01
@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

@rhdh-qodo-merge
Copy link

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

RHIDP-11263 - Partially compliant

Compliant requirements:

  • Replace the hard-coded version assertion with a regex-based version assertion.

Non-compliant requirements:

Requires further human verification:

  • Confirm the updated regex assertion is stable in CI and does not introduce flakiness (e.g., matching an unintended version elsewhere on the page).
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🔒 No security concerns identified
⚡ Recommended focus areas for review

Test Robustness

The regex-based locator may match any semantic version-like string anywhere in the table/page, not necessarily the version cell for the intended extension row. Consider scoping the locator to the specific row (e.g., techdocsRow.getByRole("cell", { name: /.../ })) or anchoring the regex (/^\d+\.\d+\.\d+$/) to reduce false positives.

await expect(
  page.getByRole("cell", { name: "Frontend plugin module" }),
).toBeVisible();
await expect(page.getByRole("cell", { name: /(\d+)\.(\d+)\.(\d+)/ })).toBeVisible();
📄 References
  1. redhat-developer/rhdh/e2e-tests/playwright/e2e/github-happy-path.spec.ts [14-229]
  2. redhat-developer/rhdh/e2e-tests/playwright/e2e/auth-providers/oidc.spec.ts [21-454]

@rhdh-qodo-merge
Copy link

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

PR Type

Tests


Description

  • Replace hardcoded version check with regex pattern matching

  • Allow e2e test to pass with any semantic version format

  • Improve test robustness by removing version-specific assertions


File Walkthrough

Relevant files
Tests
extensions.spec.ts
Use regex pattern for version validation in test                 

e2e-tests/playwright/e2e/extensions.spec.ts

  • Changed version assertion from exact match "1.1.30" to regex pattern
    /(\d+)\.(\d+)\.(\d+)/
  • Allows test to pass with any semantic version format instead of
    failing on version changes
  • Improves test maintainability by decoupling from specific version
    numbers
+1/-1     

@rhdh-qodo-merge
Copy link

rhdh-qodo-merge bot commented Jan 23, 2026

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Anchor version regex

Improve the version-matching regex by anchoring it with ^ and $ and removing
unnecessary capturing groups to ensure an exact match and prevent partial
matches.

e2e-tests/playwright/e2e/extensions.spec.ts [524]

-await expect(page.getByRole("cell", { name: /(\d+)\.(\d+)\.(\d+)/ })).toBeVisible();
+await expect(page.getByRole("cell", { name: /^\d+\.\d+\.\d+$/ })).toBeVisible();
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly improves the test's precision by anchoring the regular expression to match the entire cell content, preventing potential false positives from partial matches.

Low
  • Update

@github-actions
Copy link
Contributor

@sanketpathak sanketpathak changed the title Extension e2e test should not check for a specific version fix(e2e): extension e2e test should not check for a specific version Jan 23, 2026
@sanketpathak sanketpathak force-pushed the extension-e2e-should-not-check-specific-version branch from 302a862 to 53091fc Compare January 23, 2026 12:47
@github-actions
Copy link
Contributor

🚫 Image Push Skipped.

The container image push was skipped because the build was skipped (either due to [skip-build] tag or no relevant changes with existing image)

@sonarqubecloud
Copy link

@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

@sanketpathak: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ocp-helm 53091fc link true /test e2e-ocp-helm

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant