diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/frontend/cycle_analytics/mock_data.js | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/frontend/cycle_analytics/mock_data.js')
-rw-r--r-- | spec/frontend/cycle_analytics/mock_data.js | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/spec/frontend/cycle_analytics/mock_data.js b/spec/frontend/cycle_analytics/mock_data.js index 242ea1932fb..4e6471d5f7b 100644 --- a/spec/frontend/cycle_analytics/mock_data.js +++ b/spec/frontend/cycle_analytics/mock_data.js @@ -1,5 +1,10 @@ -import { DEFAULT_VALUE_STREAM } from '~/cycle_analytics/constants'; +import { TEST_HOST } from 'helpers/test_constants'; +import { DEFAULT_VALUE_STREAM, DEFAULT_DAYS_IN_PAST } from '~/cycle_analytics/constants'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; +import { getDateInPast } from '~/lib/utils/datetime_utility'; + +export const createdBefore = new Date(2019, 0, 14); +export const createdAfter = getDateInPast(createdBefore, DEFAULT_DAYS_IN_PAST); export const getStageByTitle = (stages, title) => stages.find((stage) => stage.title && stage.title.toLowerCase().trim() === title) || {}; @@ -169,6 +174,15 @@ export const stageMedians = { staging: 388800, }; +export const formattedStageMedians = { + issue: '2d', + plan: '1d', + review: '1w', + code: '1d', + test: '3d', + staging: '4d', +}; + export const allowedStages = [issueStage, planStage, codeStage]; export const transformedProjectStagePathData = [ @@ -212,6 +226,31 @@ export const transformedProjectStagePathData = [ export const selectedValueStream = DEFAULT_VALUE_STREAM; +export const group = { + id: 1, + name: 'foo', + path: 'foo', + full_path: 'foo', + avatar_url: `${TEST_HOST}/images/home/nasa.svg`, +}; + +export const currentGroup = convertObjectPropsToCamelCase(group, { deep: true }); + +export const selectedProjects = [ + { + id: 'gid://gitlab/Project/1', + name: 'cool project', + pathWithNamespace: 'group/cool-project', + avatarUrl: null, + }, + { + id: 'gid://gitlab/Project/2', + name: 'another cool project', + pathWithNamespace: 'group/another-cool-project', + avatarUrl: null, + }, +]; + export const rawValueStreamStages = [ { title: 'Issue', |