Improve the AR manifest detail feature spec

What does this MR do and why?

Items 1 to 5 of the review follow-ups on ee/spec/features/artifact_registry/manifest_detail_spec.rb from the review of !257027 (merged). All are test-only; no production change.

  1. Add a not-found case: when Artifact Registry returns nil for the manifest, the page renders the in-SPA "Page not found" state (ManifestResolver returns nil, manifest_detail.vue renders the shared NotFound). Mirrors the versions spec's "an artifact Artifact Registry does not hold". It also asserts the manifest read happened once with the requested digest, because the router's catch-all route and a null repository render the same heading.
  2. Convert the four shared locals (slug, name, format, artifact_id) to let, matching the sibling feature specs; build manifest_page_path on versions_page_path; and name the referrer short digest (referrer_short_digest) like the other short digests instead of inlining 'c3c3c3c3c3c3'. Only these four are converted, keeping the group under the RSpec/MultipleMemoizedHelpers limit of 25 (now 22).
  3. Drive the referrers pager with click_button 'Next' / have_button('Next', disabled: false) (and Previous) instead of find_by_testid('nextButton'); GlKeysetPagination labels its buttons, and have_button waits for the state. Matches container_registry_spec.rb.
  4. Drop the have_received on the next-page example, whose cursor check was redundant: only the keyed stub (cursor: next_cursor) returns the e4 page, so the e4 digest on the page already proves the cursor reached the client. The catch-all stub answers every other call with page one. The previous-page have_received stays, because no stub matches prev_cursor, so a wrong cursor would still render page one; it catches a bug the next-page assertion cannot.
  5. Share index_attributes and child_attributes base hashes between the list-row Manifest.new and the detail ManifestDetail.new fixtures (same five identity fields), merging the detail-only keys on top.

Out of scope: item 6 of the issue (a shared RSpec context across the four AR feature specs) touches sibling files, so it is left for a dedicated follow-up MR as the issue suggests.

No changelog: test-only change.

References

Screenshots or screen recordings

Not applicable; test-only change.

How to set up and validate locally

This is a :js feature spec (run locally: 10 examples, 0 failures). It exercises the manifest detail SPA with Artifact Registry stubbed through the client, so no running Artifact Registry is needed.

VITE_ENABLED=true bin/rspec ee/spec/features/artifact_registry/manifest_detail_spec.rb

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Narendran

Merge request reports

Loading
Loading