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:
Diffstat (limited to 'spec/frontend/packages/list/coming_soon/mock_data.js')
-rw-r--r--spec/frontend/packages/list/coming_soon/mock_data.js90
1 files changed, 90 insertions, 0 deletions
diff --git a/spec/frontend/packages/list/coming_soon/mock_data.js b/spec/frontend/packages/list/coming_soon/mock_data.js
new file mode 100644
index 00000000000..bb4568e4bd5
--- /dev/null
+++ b/spec/frontend/packages/list/coming_soon/mock_data.js
@@ -0,0 +1,90 @@
+export const fakeIssues = [
+ {
+ id: 1,
+ iid: 1,
+ title: 'issue one',
+ webUrl: 'foo',
+ },
+ {
+ id: 2,
+ iid: 2,
+ title: 'issue two',
+ labels: [{ title: 'Accepting merge requests', color: '#69d100' }],
+ milestone: {
+ title: '12.10',
+ },
+ webUrl: 'foo',
+ },
+ {
+ id: 3,
+ iid: 3,
+ title: 'issue three',
+ labels: [{ title: 'workflow::In dev', color: '#428bca' }],
+ webUrl: 'foo',
+ },
+ {
+ id: 4,
+ iid: 4,
+ title: 'issue four',
+ labels: [
+ { title: 'Accepting merge requests', color: '#69d100' },
+ { title: 'workflow::In dev', color: '#428bca' },
+ ],
+ webUrl: 'foo',
+ },
+];
+
+export const asGraphQLResponse = {
+ project: {
+ issues: {
+ nodes: fakeIssues.map(x => ({
+ ...x,
+ labels: {
+ nodes: x.labels,
+ },
+ })),
+ },
+ },
+};
+
+export const asViewModel = [
+ {
+ ...fakeIssues[0],
+ labels: [],
+ },
+ {
+ ...fakeIssues[1],
+ labels: [
+ {
+ title: 'Accepting merge requests',
+ color: '#69d100',
+ scoped: false,
+ },
+ ],
+ },
+ {
+ ...fakeIssues[2],
+ labels: [
+ {
+ title: 'workflow::In dev',
+ color: '#428bca',
+ scoped: true,
+ },
+ ],
+ },
+ {
+ ...fakeIssues[3],
+ labels: [
+ {
+ title: 'workflow::In dev',
+ color: '#428bca',
+ scoped: true,
+ },
+ {
+ title: 'Accepting merge requests',
+ color: '#69d100',
+ scoped: false,
+ },
+ ],
+ },
+];