Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-23 09:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-23 09:08:47 +0300
commitd950ea420a77bc6b27037bd00484f2463e79b4fd (patch)
treeec93e370d6543321bb725e06f331b602e06873ac /spec/frontend/pipelines
parent9d9c8fc2ec2fdfa0bae2f77a5c2bde52a5bf45e2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines')
-rw-r--r--spec/frontend/pipelines/mock_data.js81
-rw-r--r--spec/frontend/pipelines/pipelines_table_spec.js56
2 files changed, 0 insertions, 137 deletions
diff --git a/spec/frontend/pipelines/mock_data.js b/spec/frontend/pipelines/mock_data.js
index 02ec529eb12..7e3c3727c9d 100644
--- a/spec/frontend/pipelines/mock_data.js
+++ b/spec/frontend/pipelines/mock_data.js
@@ -471,84 +471,3 @@ export const mockSearch = [
export const mockBranchesAfterMap = ['branch-1', 'branch-10', 'branch-11'];
export const mockTagsAfterMap = ['tag-3', 'tag-2', 'tag-1', 'main-tag'];
-
-export const triggered = [
- {
- id: 602,
- user: {
- id: 1,
- name: 'Administrator',
- username: 'root',
- state: 'active',
- avatar_url:
- 'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
- web_url: 'http://gdk.test:3000/root',
- show_status: false,
- path: '/root',
- },
- active: false,
- coverage: null,
- source: 'pipeline',
- source_job: { name: 'trigger_job_on_mr' },
- path: '/root/job-log-sections/-/pipelines/602',
- details: {
- status: {
- icon: 'status_success',
- text: 'passed',
- label: 'passed',
- group: 'success',
- tooltip: 'passed',
- has_details: true,
- details_path: '/root/job-log-sections/-/pipelines/602',
- illustration: null,
- favicon:
- '/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2.png',
- },
- },
- project: {
- id: 36,
- name: 'job-log-sections',
- full_path: '/root/job-log-sections',
- full_name: 'Administrator / job-log-sections',
- },
- },
-];
-
-export const triggeredBy = {
- id: 614,
- user: {
- id: 1,
- name: 'Administrator',
- username: 'root',
- state: 'active',
- avatar_url: 'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
- web_url: 'http://gdk.test:3000/root',
- show_status: false,
- path: '/root',
- },
- active: false,
- coverage: null,
- source: 'web',
- source_job: { name: null },
- path: '/root/trigger-downstream/-/pipelines/614',
- details: {
- status: {
- icon: 'status_success',
- text: 'passed',
- label: 'passed',
- group: 'success',
- tooltip: 'passed',
- has_details: true,
- details_path: '/root/trigger-downstream/-/pipelines/614',
- illustration: null,
- favicon:
- '/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2.png',
- },
- },
- project: {
- id: 42,
- name: 'trigger-downstream',
- full_path: '/root/trigger-downstream',
- full_name: 'Administrator / trigger-downstream',
- },
-};
diff --git a/spec/frontend/pipelines/pipelines_table_spec.js b/spec/frontend/pipelines/pipelines_table_spec.js
index 07d9b208776..68b0dfc018e 100644
--- a/spec/frontend/pipelines/pipelines_table_spec.js
+++ b/spec/frontend/pipelines/pipelines_table_spec.js
@@ -12,7 +12,6 @@ import PipelinesTimeago from '~/pipelines/components/pipelines_list/time_ago.vue
import eventHub from '~/pipelines/event_hub';
import CiBadge from '~/vue_shared/components/ci_badge_link.vue';
import CommitComponent from '~/vue_shared/components/commit.vue';
-import { triggeredBy, triggered } from './mock_data';
jest.mock('~/pipelines/event_hub');
@@ -60,8 +59,6 @@ describe('Pipelines Table', () => {
const findStagesTh = () => wrapper.findByTestId('stages-th');
const findTimeAgoTh = () => wrapper.findByTestId('timeago-th');
const findActionsTh = () => wrapper.findByTestId('actions-th');
- const findUpstream = () => wrapper.findByTestId('mini-graph-upstream');
- const findDownstream = () => wrapper.findByTestId('mini-graph-downstream');
beforeEach(() => {
pipeline = createMockPipeline();
@@ -139,8 +136,6 @@ describe('Pipelines Table', () => {
describe('stages cell', () => {
it('should render a pipeline mini graph', () => {
expect(findPipelineMiniGraph().exists()).toBe(true);
- expect(findUpstream().exists()).toBe(false);
- expect(findDownstream().exists()).toBe(false);
});
it('should render the right number of stages', () => {
@@ -178,57 +173,6 @@ describe('Pipelines Table', () => {
expect(eventHub.$emit).toHaveBeenCalledWith('refreshPipelinesTable');
});
-
- describe('upstream linked pipelines', () => {
- beforeEach(() => {
- pipeline = createMockPipeline();
- pipeline.triggered_by = triggeredBy;
-
- createComponent({ pipelines: [pipeline] });
- });
-
- it('should render only a upstream pipeline', () => {
- expect(findUpstream().exists()).toBe(true);
- expect(findDownstream().exists()).toBe(false);
- });
-
- it('should pass an array of the correct data to the linked pipeline component', () => {
- const triggeredByProps = findUpstream().props('triggeredBy');
-
- expect(triggeredByProps).toEqual(expect.any(Array));
- expect(triggeredByProps).toHaveLength(1);
- expect(triggeredByProps[0]).toBe(triggeredBy);
- });
- });
-
- describe('downstream linked pipelines', () => {
- beforeEach(() => {
- pipeline = createMockPipeline();
- pipeline.triggered = triggered;
-
- createComponent({ pipelines: [pipeline] });
- });
-
- it('should render only a downstream pipeline', () => {
- expect(findDownstream().exists()).toBe(true);
- expect(findUpstream().exists()).toBe(false);
- });
- });
-
- describe('upstream and downstream linked pipelines', () => {
- beforeEach(() => {
- pipeline = createMockPipeline();
- pipeline.triggered = triggered;
- pipeline.triggered_by = triggeredBy;
-
- createComponent({ pipelines: [pipeline] });
- });
-
- it('should render both downstream and upstream pipelines', () => {
- expect(findDownstream().exists()).toBe(true);
- expect(findUpstream().exists()).toBe(true);
- });
- });
});
describe('duration cell', () => {