Skip to content

test(e2e): analysis response to art-images on Atlas - #1183

Open
vobratil wants to merge 1 commit into
guacsec:mainfrom
vobratil:art-images-test
Open

test(e2e): analysis response to art-images on Atlas#1183
vobratil wants to merge 1 commit into
guacsec:mainfrom
vobratil:art-images-test

Conversation

@vobratil

@vobratil vobratil commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This is a single test that tests for TC-4487 against an Atlas instance.

Summary by Sourcery

Add an Atlas-specific e2e API test to verify analysis responses for pre-ingested art-images data.

Tests:

  • Add an Atlas-only e2e test that validates the analysis latest API returns a successful response with items for the art-images component.
  • Guard new Atlas tests behind the ATLAS_ENV flag and enforce an extended timeout for long-running analysis requests.

@sourcery-ai

sourcery-ai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a new, Atlas-specific end-to-end API test that verifies an analysis response is returned for the art-images component against an Atlas instance, and performs a minor comment typo fix in an existing Atlas test file.

File-Level Changes

Change Details Files
Introduce a dedicated Atlas analysis E2E test that exercises the /api/v3/analysis/latest/component endpoint for the art-images component with a generous timeout and Jira issue annotation.
  • Create a new Playwright test suite scoped to Atlas-only runs with test.describe.only and an environment-based skip using the ATLAS_ENV flag.
  • Configure an extended test timeout (20 minutes) to accommodate slow Atlas responses.
  • Issue a GET request via the shared axios fixture to the analysis/latest/component API using a URL-encoded component name query parameter and a limit of 10.
  • Log the elapsed time for the API call using the shared logger and formatTimeElapsed helper for observability.
  • Assert that the HTTP response status is 200 and that the payload contains an items property to validate a successful analysis response.
e2e/tests/api/features/analysis-atlas.ts
Fix a typo in an existing Atlas analysis test file comment.
  • Correct the word againt to against in the Atlas test suite comment describing its dependency on pre-ingested data.
e2e/tests/api/features/analysis-latest-atlas.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • Using test.describe.only will cause all other e2e suites to be skipped when this file is present; consider removing .only so the Atlas tests run alongside the rest of the suite.
  • The hardcoded 20-minute responseTimeout is unusually large; consider making this configurable (e.g., via environment variable) to avoid excessively long runs in slower environments or CI.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Using `test.describe.only` will cause all other e2e suites to be skipped when this file is present; consider removing `.only` so the Atlas tests run alongside the rest of the suite.
- The hardcoded 20-minute `responseTimeout` is unusually large; consider making this configurable (e.g., via environment variable) to avoid excessively long runs in slower environments or CI.

## Individual Comments

### Comment 1
<location path="e2e/tests/api/features/analysis-atlas.ts" line_range="9" />
<code_context>
+
+const responseTimeout = 1200000; // 20 minutes
+
+test.describe.only("Analysis / Atlas", () => {
+  test.skip(
+    !process.env.ATLAS_ENV || process.env.ATLAS_ENV !== "true",
</code_context>
<issue_to_address>
**issue (testing):** Using `test.describe.only` will prevent other e2e tests from running when this file is included

`.only` will cause this suite to run in isolation whenever this file is loaded, which can hide regressions by skipping other e2e tests. Please remove `.only` or ensure this file is excluded from normal e2e runs via configuration.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.


const responseTimeout = 1200000; // 20 minutes

test.describe.only("Analysis / Atlas", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (testing): Using test.describe.only will prevent other e2e tests from running when this file is included

.only will cause this suite to run in isolation whenever this file is loaded, which can hide regressions by skipping other e2e tests. Please remove .only or ensure this file is excluded from normal e2e runs via configuration.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.09%. Comparing base (ed87429) to head (5827e0f).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1183      +/-   ##
==========================================
+ Coverage   54.03%   54.09%   +0.06%     
==========================================
  Files         269      250      -19     
  Lines        5904     5638     -266     
  Branches     1849     1756      -93     
==========================================
- Hits         3190     3050     -140     
+ Misses       2419     2331      -88     
+ Partials      295      257      -38     
Flag Coverage Δ
e2e 70.38% <ø> (-1.66%) ⬇️
unit 8.45% <ø> (+1.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Vilem Obratil <vobratil@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant