Commit 5b40320a authored by Miguel Rincon's avatar Miguel Rincon

Refactor pipeline specs

This change updates the pipeline table specs to use async/await.

It also reorganizes specs to use axios mocks more efficiently and avoid
repetition, while removing a few redundant specs.
parent 1f8ff381
......@@ -141,8 +141,8 @@ describe('Commit pipeline status component', () => {
expect(findLink().attributes('href')).toEqual(mockCiStatus.details_path);
});
it('renders CI icon', () => {
expect(findCiIcon().attributes('title')).toEqual('Pipeline: pending');
it('renders CI icon with the correct title and status', () => {
expect(findCiIcon().attributes('title')).toEqual('Pipeline: passed');
expect(findCiIcon().props('status')).toEqual(mockCiStatus);
});
});
......
......@@ -12,7 +12,7 @@ RSpec.describe Projects::PipelinesController, '(JavaScript fixtures)', type: :co
let!(:user) { create(:user, developer_projects: [project], email: commit.author_email) }
let!(:pipeline) { create(:ci_pipeline, project: project, sha: commit.id, user: user) }
let!(:pipeline_without_author) { create(:ci_pipeline, project: project, sha: commit_without_author.id) }
let!(:pipeline_without_commit) { create(:ci_pipeline, project: project, sha: '0000') }
let!(:pipeline_without_commit) { create(:ci_pipeline, status: :success, project: project, sha: '0000') }
render_views
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment