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/nav/mock_data.js')
-rw-r--r--spec/frontend/nav/mock_data.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/frontend/nav/mock_data.js b/spec/frontend/nav/mock_data.js
new file mode 100644
index 00000000000..2987d8deb16
--- /dev/null
+++ b/spec/frontend/nav/mock_data.js
@@ -0,0 +1,35 @@
+import { range } from 'lodash';
+
+export const TEST_NAV_DATA = {
+ activeTitle: 'Test Active Title',
+ primary: [
+ ...['projects', 'groups'].map((view) => ({
+ id: view,
+ href: null,
+ title: view,
+ view,
+ })),
+ ...range(0, 2).map((idx) => ({
+ id: `primary-link-${idx}`,
+ href: `/path/to/primary/${idx}`,
+ title: `Title ${idx}`,
+ })),
+ ],
+ secondary: range(0, 2).map((idx) => ({
+ id: `secondary-link-${idx}`,
+ href: `/path/to/secondary/${idx}`,
+ title: `SecTitle ${idx}`,
+ })),
+ views: {
+ projects: {
+ namespace: 'projects',
+ currentUserName: '',
+ currentItem: {},
+ },
+ groups: {
+ namespace: 'groups',
+ currentUserName: '',
+ currentItem: {},
+ },
+ },
+};