summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/new_resource_dropdown/mock_data.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vue_shared/components/new_resource_dropdown/mock_data.js')
-rw-r--r--spec/frontend/vue_shared/components/new_resource_dropdown/mock_data.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/new_resource_dropdown/mock_data.js b/spec/frontend/vue_shared/components/new_resource_dropdown/mock_data.js
new file mode 100644
index 00000000000..19b1453e8ac
--- /dev/null
+++ b/spec/frontend/vue_shared/components/new_resource_dropdown/mock_data.js
@@ -0,0 +1,54 @@
+export const emptySearchProjectsQueryResponse = {
+ data: {
+ projects: {
+ nodes: [],
+ },
+ },
+};
+
+export const emptySearchProjectsWithinGroupQueryResponse = {
+ data: {
+ group: {
+ id: '1',
+ projects: emptySearchProjectsQueryResponse.data.projects,
+ },
+ },
+};
+
+export const project1 = {
+ id: 'gid://gitlab/Group/26',
+ name: 'Super Mario Project',
+ nameWithNamespace: 'Mushroom Kingdom / Super Mario Project',
+ webUrl: 'https://127.0.0.1:3000/mushroom-kingdom/super-mario-project',
+};
+
+export const project2 = {
+ id: 'gid://gitlab/Group/59',
+ name: 'Mario Kart Project',
+ nameWithNamespace: 'Mushroom Kingdom / Mario Kart Project',
+ webUrl: 'https://127.0.0.1:3000/mushroom-kingdom/mario-kart-project',
+};
+
+export const project3 = {
+ id: 'gid://gitlab/Group/103',
+ name: 'Mario Party Project',
+ nameWithNamespace: 'Mushroom Kingdom / Mario Party Project',
+ webUrl: 'https://127.0.0.1:3000/mushroom-kingdom/mario-party-project',
+};
+
+export const searchProjectsQueryResponse = {
+ data: {
+ projects: {
+ nodes: [project1, project2, project3],
+ },
+ },
+};
+
+export const searchProjectsWithinGroupQueryResponse = {
+ data: {
+ group: {
+ id: '1',
+ projects: searchProjectsQueryResponse.data.projects,
+ },
+ },
+};