Move job page feature specs to integration tests

What does this MR do and why?

Adds frontend integration tests for the job page: the header, the pipeline information, the stage jobs, artifacts, trigger variables, the environment messages, the empty states and the stuck messages. The fixture spec records the job as each of these states, and asserts the fields the tests use.

Removes the feature specs they replace:

Removed feature spec Covered by
shows status name shows the status name
shows commit`s data shows the commit's SHA and title
shows active job shows the active job
shows pipeline id and source branch shows the pipeline ID and source branch
detached merge request pipeline: shows merge request iid and source branch when the job is in a merge request pipeline › shows the merge request IID and source branch
merge request pipeline: shows merge request iid and source branch when the job is in a merged results pipeline › shows the merge request IID and source branch, shows the target branch
both, when source project is a forked project Removed. The page renders a fork's paths the same way. MergeRequestPresenter builds them from the source project.
renders escaped tooltip name shows the job name in the tooltip
if job passed: does not show New issue button does not show the New issue button. The feature spec could not fail: it looked for a visible link, and the header actions are outside the test viewport.
if job failed: shows New issue button, links to issues/new with the title and description filled in shows the New issue button. The fixture spec checks the job title in the recorded new_issue_path.
when job is waiting for resource: shows correct UI components shows the waiting for resource message
has button to download artifacts shows the download button
no expire date defined: does not have the Keep button when the artifacts have no expiry date › does not show the Keep button
when artifacts are locked: shows the keep button when the artifacts expire and are locked › shows that the artifacts are kept and the Keep button
when user does not have ability to update job: does not have keep button when the user cannot update the job › does not show the Keep button. The fixture spec records the job as a reporter and checks it has no keep_path.
when artifacts expired and are unlocked: does not have the Keep button when the artifacts expired › shows that the artifacts were removed, does not show the Keep button
when artifacts expired and are locked: has the Keep button when the artifacts expired and are locked › shows the Keep button, does not show that the artifacts were removed
shows the button linking to the raw job log shows the button linking to the raw job log
developer: renders a hidden value with no reveal values button shows hidden values without the Reveal values button
maintainer: renders a hidden value with a reveal values button shows hidden values with the Reveal values button
maintainer: reveals values on button click when the values are revealed › shows the variable values
job is successful and has deployment: shows a link for the job, shows deployment message when the job deployed to the environment › shows the deployment message with a link to the environment
cluster: shows a link to the cluster, shows the name of the cluster shows the name of the cluster with a link to it
when the user is not able to view the cluster shows only the name of the cluster without a link
job is complete and not successful, job failed to deploy, job that failed to deploy and environment has not been created shows the failed deployment message with a link to the environment. The last one also created the environment, so it repeated the second.
deployment still not finished, job will deploy: when environment exists, when environment does not exist, job that will deploy and environment has not been created when the job is creating a deployment › shows the deployment message with a link to the environment, does not show the latest deployment. The last two also created the environment, so they repeated the second.
when it has deployment: shows that deployment will be overwritten shows that the latest deployment will be overwritten
when job stops environment: shows environment information banner shows that the job ran in the environment
job with outdated deployment: shows deployment message shows the out-of-date deployment message
renders a link to the most recent deployment shows links to the environment and the most recent deployment
when deployment does not have a deployable: has a href of # shows the most recent deployment link with a # href
shows manual action empty state manual_job_spec.js › shows the manual action message and the Run job button
shows delayed job, non triggered job, pending job, canceled job without log, skipped job when the job is delayed / not triggered / pending / canceled without a log / skipped › shows the empty state for the job status
canceled job with log: renders job log when the job was canceled with a log › shows the job log
when job is failed but has no trace shows the missing trace empty state
renders erased job warning shows who erased the job
does not render erased job warning does not render erased block when `erased` is false
on mobile: renders collapsed sidebar, on desktop: renders expanded sidebar hides sidebar on mobile, shows sidebar
stuck: without active runners available when the job is stuck because no runners are active › shows the stuck message
stuck: when available runners can not run specified tag when the job is stuck because paused runners cannot run its tags › shows the stuck message
stuck: when runners are offline and build has tags Removed. The page shows the same message as the previous row and picks it from the job's tags alone. #any_runners_online? covers the backend.
stuck: without any runners available Removed. The page shows the same message as "without active runners available". #any_runners_available? covers the backend.
stuck: without available runners online when the job is stuck because runners are offline › shows the stuck message
forward deployment failure: shows a modal to warn the user when the retry button is clicked › shows a modal to warn the user

The feature spec keeps the examples that need a real backend: the subscription status update, the live job log, cancelling, retrying, playing and unscheduling a job, keeping artifacts, the artifact download, the user who cannot retry, and the redirects and 404 responses.

Removes 58 of 80 examples from spec/features/projects/jobs_spec.rb.

References

Screenshots or screen recordings

Not a UI change.

How to set up and validate locally

  1. Generate the fixtures:

    bin/rspec ee/spec/frontend/fixtures/job_details_integration.rb
  2. Run the frontend integration tests:

    yarn jest:integration ee/spec/frontend/integration/ci/job_details

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 Anna Vovchenko

Merge request reports

Loading
Loading