From 450d4945915b843e7b2179f8fc93678150fcc135 Mon Sep 17 00:00:00 2001 From: Bryan Florkiewicz Date: Wed, 20 Nov 2024 01:52:42 -0500 Subject: [PATCH 1/3] Add support for nav bundles to frontend config --- api/v1alpha1/frontendenvironment_types.go | 16 ++++ api/v1alpha1/zz_generated.deepcopy.go | 50 +++++++++++ ...cloud.redhat.com_frontendenvironments.yaml | 16 ++++ controllers/reconcile.go | 63 +++++++++++++ deploy.yml | 17 ++++ examples/feenvironment.yaml | 7 ++ examples/landing.yaml | 18 ++++ .../generate-bundles/00-create-namespace.yaml | 8 ++ .../generate-bundles/01-create-resources.yaml | 88 +++++++++++++++++++ tests/e2e/generate-bundles/02-assert.yaml | 56 ++++++++++++ 10 files changed, 339 insertions(+) create mode 100644 tests/e2e/generate-bundles/00-create-namespace.yaml create mode 100644 tests/e2e/generate-bundles/01-create-resources.yaml create mode 100644 tests/e2e/generate-bundles/02-assert.yaml diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index dfc034dc..7ceff5bd 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -24,6 +24,20 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) +// FrontendBundles defines the bundles specific to an environment that will be used to +// construct navigation +type FrontendBundles struct { + ID string `json:"id" yaml:"id"` + Title string `json:"title" yaml:"title"` +} + +// The frontend bundles but with the nav items filled with chrome nav items +type FrontendBundlesGenerated struct { + ID string `json:"id" yaml:"id"` + Title string `json:"title" yaml:"title"` + NavItems *[]ChromeNavItem `json:"navItems" yaml:"navItems"` +} + type FrontendServiceCategoryGroup struct { ID string `json:"id" yaml:"id"` Title string `json:"title" yaml:"title"` @@ -105,6 +119,8 @@ type FrontendEnvironmentSpec struct { HTTPHeaders map[string]string `json:"httpHeaders,omitempty"` DefaultReplicas *int32 `json:"defaultReplicas,omitempty" yaml:"defaultReplicas,omitempty"` + // For the ChromeUI to render navigation bundles + Bundles *[]FrontendBundles `json:"bundles,omitempty" yaml:"bundles,omitempty"` } type MonitoringConfig struct { diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index cf9e3ee5..ebb66322 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -386,6 +386,47 @@ func (in *Frontend) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FrontendBundles) DeepCopyInto(out *FrontendBundles) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendBundles. +func (in *FrontendBundles) DeepCopy() *FrontendBundles { + if in == nil { + return nil + } + out := new(FrontendBundles) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FrontendBundlesGenerated) DeepCopyInto(out *FrontendBundlesGenerated) { + *out = *in + if in.NavItems != nil { + in, out := &in.NavItems, &out.NavItems + *out = new([]ChromeNavItem) + if **in != nil { + in, out := *in, *out + *out = make([]ChromeNavItem, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendBundlesGenerated. +func (in *FrontendBundlesGenerated) DeepCopy() *FrontendBundlesGenerated { + if in == nil { + return nil + } + out := new(FrontendBundlesGenerated) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FrontendDeployments) DeepCopyInto(out *FrontendDeployments) { *out = *in @@ -513,6 +554,15 @@ func (in *FrontendEnvironmentSpec) DeepCopyInto(out *FrontendEnvironmentSpec) { *out = new(int32) **out = **in } + if in.Bundles != nil { + in, out := &in.Bundles, &out.Bundles + *out = new([]FrontendBundles) + if **in != nil { + in, out := *in, *out + *out = make([]FrontendBundles, len(*in)) + copy(*out, *in) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendEnvironmentSpec. diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index 193019a8..500068be 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -67,6 +67,22 @@ spec: description: The name of the secret we will use to get the akamai credentials type: string + bundles: + description: For the ChromeUI to render navigation bundles + items: + description: |- + FrontendBundles defines the bundles specific to an environment that will be used to + construct navigation + properties: + id: + type: string + title: + type: string + required: + - id + - title + type: object + type: array defaultReplicas: format: int32 type: integer diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 53be5957..8afa83ea 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -988,6 +988,54 @@ func setupServiceTilesData(feList *crd.FrontendList, feEnvironment crd.FrontendE return categories, skippedTiles } +func getNavItemPath(feName string, bundleID string, sectionID string) string { + return fmt.Sprintf("%s-%s-%s", feName, bundleID, sectionID) +} + +func setupBundlesData(feList *crd.FrontendList, feEnvironment crd.FrontendEnvironment) ([]crd.FrontendBundlesGenerated, []string) { + bundles := []crd.FrontendBundlesGenerated{} + if feEnvironment.Spec.Bundles == nil { + // skip if we do not have bundles in fe environment + return bundles, []string{} + } + + skippedNavItemsMap := make(map[string][]string) + bundleNavSegmentMap := make(map[string][]crd.NavigationSegment) + for _, frontend := range feList.Items { + if frontend.Spec.FeoConfigEnabled && frontend.Spec.NavigationSegments != nil { + for _, navSegment := range frontend.Spec.NavigationSegments { + bundleNavSegmentMap[navSegment.BundleID] = append(bundleNavSegmentMap[navSegment.BundleID], *navSegment) + skippedNavItemsMap[navSegment.BundleID] = append(skippedNavItemsMap[navSegment.BundleID], getNavItemPath(frontend.Name, navSegment.BundleID, navSegment.SectionID)) + } + } + } + + for _, bundle := range *feEnvironment.Spec.Bundles { + delete(skippedNavItemsMap, bundle.ID) + // TODO sort alphabetically if position collision + sort.Slice(bundleNavSegmentMap[bundle.ID], func(i, j int) bool { + return (bundleNavSegmentMap[bundle.ID])[i].Position < (bundleNavSegmentMap[bundle.ID])[j].Position + }) + navItems := []crd.ChromeNavItem{} + for _, navSegment := range bundleNavSegmentMap[bundle.ID] { + navItems = append(navItems, *navSegment.NavItems...) + } + newBundle := crd.FrontendBundlesGenerated{ + ID: bundle.ID, + Title: bundle.Title, + NavItems: &navItems, + } + bundles = append(bundles, newBundle) + } + + skippedNavItems := []string{} + for _, skipped := range skippedNavItemsMap { + skippedNavItems = append(skippedNavItems, skipped...) + } + + return bundles, skippedNavItems +} + func (r *FrontendReconciliation) setupBundleData(_ *v1.ConfigMap, _ map[string]crd.Frontend) error { bundleList := &crd.BundleList{} @@ -1127,6 +1175,8 @@ func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMa serviceCategories, skippedTiles := setupServiceTilesData(feList, *r.FrontendEnvironment) + bundles, skippedBundles := setupBundlesData(feList, *r.FrontendEnvironment) + fedModulesJSONData, err := json.Marshal(fedModules) if err != nil { return err @@ -1149,10 +1199,19 @@ func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMa return err } + bundlesJSONData, err := json.Marshal(bundles) + if err != nil { + return err + } + if len(skippedTiles) > 0 { r.Log.Info("Unable to find service categories for tiles:", strings.Join(skippedTiles, ",")) } + if len(skippedBundles) > 0 { + r.Log.Info("Unable to find bundle for nav items:", "skippedBundles", strings.Join(skippedBundles, ",")) + } + cfgMap.Data["fed-modules.json"] = string(fedModulesJSONData) if len(searchIndex) > 0 { cfgMap.Data["search-index.json"] = string(searchIndexJSONData) @@ -1166,6 +1225,10 @@ func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMa cfgMap.Data["service-tiles.json"] = string(serviceCategoriesJSONData) } + if len(bundles) > 0 { + cfgMap.Data["bundles.json"] = string(bundlesJSONData) + } + return nil } diff --git a/deploy.yml b/deploy.yml index f0a25363..60e0defc 100644 --- a/deploy.yml +++ b/deploy.yml @@ -270,6 +270,23 @@ objects: description: The name of the secret we will use to get the akamai credentials type: string + bundles: + description: For the ChromeUI to render navigation bundles + items: + description: 'FrontendBundles defines the bundles specific to + an environment that will be used to + + construct navigation' + properties: + id: + type: string + title: + type: string + required: + - id + - title + type: object + type: array defaultReplicas: format: int32 type: integer diff --git a/examples/feenvironment.yaml b/examples/feenvironment.yaml index d1dcb5ce..63760c9c 100644 --- a/examples/feenvironment.yaml +++ b/examples/feenvironment.yaml @@ -22,3 +22,10 @@ spec: groups: - id: iam title: IAM + bundles: + - id: rhel + title: Red Hat Enterprise Linux + - id: ansible + title: Ansible + - id: settings + title: Settings diff --git a/examples/landing.yaml b/examples/landing.yaml index 380e2790..752d8f47 100644 --- a/examples/landing.yaml +++ b/examples/landing.yaml @@ -77,3 +77,21 @@ spec: description: Some Iam thing icon: IAMIcon isExternal: false + navigationSegments: + - sectionId: inventory-partial + bundleId: insights + position: 100 + navItems: + - id: landing + title: Landing section + href: /apps/landing + - id: bar + title: Some new link + expandable: true + routes: + - id: foo + title: Foo + href: /nested/bar + - id: baz + title: Some new link + href: /baz diff --git a/tests/e2e/generate-bundles/00-create-namespace.yaml b/tests/e2e/generate-bundles/00-create-namespace.yaml new file mode 100644 index 00000000..ead7ebc5 --- /dev/null +++ b/tests/e2e/generate-bundles/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-generate-bundles +spec: + finalizers: + - kubernetes diff --git a/tests/e2e/generate-bundles/01-create-resources.yaml b/tests/e2e/generate-bundles/01-create-resources.yaml new file mode 100644 index 00000000..c7230081 --- /dev/null +++ b/tests/e2e/generate-bundles/01-create-resources.yaml @@ -0,0 +1,88 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-generate-bundles-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com + bundles: + - id: rhel + title: Red Hat Enterprise Linux + - id: ansible + title: Ansible + - id: settings + title: Settings +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: landing-page + namespace: test-generate-bundles +spec: + envName: test-generate-bundles-environment + title: landing-page + deploymentRepo: https://github.com/RedHatInsights/landing-page-frontend + frontend: + paths: + - /apps/landing-page + image: "quay.io/cloudservices/landing-page-frontend:3244a17" + module: + manifestLocation: /apps/landing-page/fed-mods.json + modules: [] + moduleID: landing-page + navigationSegments: + - sectionId: inventory-partial-2 + bundleId: rhel + position: 200 + navItems: + - id: landing2 + title: Landing section + href: /apps/landing + - id: bar2 + title: Some new link + expandable: true + routes: + - id: foo + title: Foo + href: /nested/bar + - id: baz2 + title: Some new link + href: /baz + - sectionId: inventory-partial + bundleId: rhel + position: 100 + navItems: + - id: landing + title: Landing section + href: /apps/landing + - id: bar + title: Some new link + expandable: true + routes: + - id: foo + title: Foo + href: /nested/bar + - id: baz + title: Some new link + href: /baz + - sectionId: skipped-partial + bundleId: skipped + position: 100 + navItems: + - id: landing + title: Landing section + href: /apps/landing + - id: bar + title: Some new link + expandable: true + routes: + - id: foo + title: Foo + href: /nested/bar + - id: baz + title: Some new link + href: /baz + feoConfigEnabled: true diff --git a/tests/e2e/generate-bundles/02-assert.yaml b/tests/e2e/generate-bundles/02-assert.yaml new file mode 100644 index 00000000..0780a901 --- /dev/null +++ b/tests/e2e/generate-bundles/02-assert.yaml @@ -0,0 +1,56 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: landing-page-frontend + namespace: test-generate-bundles + labels: + frontend: landing-page + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: landing-page +spec: + selector: + matchLabels: + frontend: landing-page + template: + spec: + volumes: + - name: config + configMap: + name: test-generate-bundles-environment + defaultMode: 420 + containers: + - name: fe-image + image: quay.io/cloudservices/landing-page-frontend:3244a17 + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/stable/operator-generated +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: test-generate-bundles-environment + namespace: test-generate-bundles + labels: + frontendenv: test-generate-bundles-environment + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + name: test-generate-bundles-environment +data: + fed-modules.json: >- + {"landing-page":{"manifestLocation":"/apps/landing-page/fed-mods.json","moduleID":"landing-page","fullProfile":false}} + bundles.json: >- + [{"id":"rhel","title":"Red Hat Enterprise Linux","navItems":[{"href":"/apps/landing","title":"Landing + section","id":"landing"},{"expandable":true,"title":"Some new link","id":"bar","routes":[{"href":"/nested/bar","title":"Foo","id":"foo"}]},{"href":"/baz","title":"Some + new link","id":"baz"},{"href":"/apps/landing","title":"Landing section","id":"landing2"},{"expandable":true,"title":"Some + new link","id":"bar2","routes":[{"href":"/nested/bar","title":"Foo","id":"foo"}]},{"href":"/baz","title":"Some + new link","id":"baz2"}]},{"id":"ansible","title":"Ansible","navItems":[]},{"id":"settings","title":"Settings","navItems":[]}] From 06340d13f8c66317d9fc1263ef4e6d3de8f17e8b Mon Sep 17 00:00:00 2001 From: Bryan Florkiewicz Date: Wed, 20 Nov 2024 23:28:32 -0500 Subject: [PATCH 2/3] Rename sectionId to segmentId in frontend nav segments --- api/v1alpha1/frontend_types.go | 2 +- config/crd/bases/cloud.redhat.com_frontends.yaml | 4 ++-- controllers/reconcile.go | 6 +++--- deploy.yml | 4 ++-- examples/landing.yaml | 2 +- tests/e2e/generate-bundles/01-create-resources.yaml | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 361e2aee..124c3716 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -93,7 +93,7 @@ type WidgetEntry struct { } type NavigationSegment struct { - SectionID string `json:"sectionId" yaml:"sectionId"` + SegmentID string `json:"segmentId" yaml:"segmentId"` // Id of the bundle to which the segment should be injected BundleID string `json:"bundleId" yaml:"bundleId"` // A position of the segment within the bundle diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index cd025490..5dc591c4 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -376,13 +376,13 @@ spec: 0 is the first position The position "steps" should be at least 100 to make sure there is enough space in case some segments should be injected between existing ones type: integer - sectionId: + segmentId: type: string required: - bundleId - navItems - position - - sectionId + - segmentId type: object type: array replicas: diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 8afa83ea..30fdb161 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -988,8 +988,8 @@ func setupServiceTilesData(feList *crd.FrontendList, feEnvironment crd.FrontendE return categories, skippedTiles } -func getNavItemPath(feName string, bundleID string, sectionID string) string { - return fmt.Sprintf("%s-%s-%s", feName, bundleID, sectionID) +func getNavItemPath(feName string, bundleID string, segmentID string) string { + return fmt.Sprintf("%s-%s-%s", feName, bundleID, segmentID) } func setupBundlesData(feList *crd.FrontendList, feEnvironment crd.FrontendEnvironment) ([]crd.FrontendBundlesGenerated, []string) { @@ -1005,7 +1005,7 @@ func setupBundlesData(feList *crd.FrontendList, feEnvironment crd.FrontendEnviro if frontend.Spec.FeoConfigEnabled && frontend.Spec.NavigationSegments != nil { for _, navSegment := range frontend.Spec.NavigationSegments { bundleNavSegmentMap[navSegment.BundleID] = append(bundleNavSegmentMap[navSegment.BundleID], *navSegment) - skippedNavItemsMap[navSegment.BundleID] = append(skippedNavItemsMap[navSegment.BundleID], getNavItemPath(frontend.Name, navSegment.BundleID, navSegment.SectionID)) + skippedNavItemsMap[navSegment.BundleID] = append(skippedNavItemsMap[navSegment.BundleID], getNavItemPath(frontend.Name, navSegment.BundleID, navSegment.SegmentID)) } } } diff --git a/deploy.yml b/deploy.yml index 60e0defc..92b678ad 100644 --- a/deploy.yml +++ b/deploy.yml @@ -797,13 +797,13 @@ objects: there is enough space in case some segments should be injected between existing ones' type: integer - sectionId: + segmentId: type: string required: - bundleId - navItems - position - - sectionId + - segmentId type: object type: array replicas: diff --git a/examples/landing.yaml b/examples/landing.yaml index 752d8f47..89826760 100644 --- a/examples/landing.yaml +++ b/examples/landing.yaml @@ -78,7 +78,7 @@ spec: icon: IAMIcon isExternal: false navigationSegments: - - sectionId: inventory-partial + - segmentId: inventory-partial bundleId: insights position: 100 navItems: diff --git a/tests/e2e/generate-bundles/01-create-resources.yaml b/tests/e2e/generate-bundles/01-create-resources.yaml index c7230081..176c3fd8 100644 --- a/tests/e2e/generate-bundles/01-create-resources.yaml +++ b/tests/e2e/generate-bundles/01-create-resources.yaml @@ -34,7 +34,7 @@ spec: modules: [] moduleID: landing-page navigationSegments: - - sectionId: inventory-partial-2 + - segmentId: inventory-partial-2 bundleId: rhel position: 200 navItems: @@ -51,7 +51,7 @@ spec: - id: baz2 title: Some new link href: /baz - - sectionId: inventory-partial + - segmentId: inventory-partial bundleId: rhel position: 100 navItems: @@ -68,7 +68,7 @@ spec: - id: baz title: Some new link href: /baz - - sectionId: skipped-partial + - segmentId: skipped-partial bundleId: skipped position: 100 navItems: From e7bafcf5fb55d15db8a6268e65b38e02683dcfee Mon Sep 17 00:00:00 2001 From: Bryan Florkiewicz Date: Thu, 21 Nov 2024 00:02:08 -0500 Subject: [PATCH 3/3] Fall back to sorting alphabetically when position number conflicts in nav segment --- controllers/reconcile.go | 4 ++- .../generate-bundles/01-create-resources.yaml | 31 ++++++++++++++++--- tests/e2e/generate-bundles/02-assert.yaml | 7 +++-- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 30fdb161..565ca579 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -1012,8 +1012,10 @@ func setupBundlesData(feList *crd.FrontendList, feEnvironment crd.FrontendEnviro for _, bundle := range *feEnvironment.Spec.Bundles { delete(skippedNavItemsMap, bundle.ID) - // TODO sort alphabetically if position collision sort.Slice(bundleNavSegmentMap[bundle.ID], func(i, j int) bool { + if (bundleNavSegmentMap[bundle.ID])[i].Position == (bundleNavSegmentMap[bundle.ID])[j].Position { + return (bundleNavSegmentMap[bundle.ID])[i].SegmentID[0] < (bundleNavSegmentMap[bundle.ID])[j].SegmentID[0] + } return (bundleNavSegmentMap[bundle.ID])[i].Position < (bundleNavSegmentMap[bundle.ID])[j].Position }) navItems := []crd.ChromeNavItem{} diff --git a/tests/e2e/generate-bundles/01-create-resources.yaml b/tests/e2e/generate-bundles/01-create-resources.yaml index 176c3fd8..9cddc798 100644 --- a/tests/e2e/generate-bundles/01-create-resources.yaml +++ b/tests/e2e/generate-bundles/01-create-resources.yaml @@ -34,12 +34,12 @@ spec: modules: [] moduleID: landing-page navigationSegments: - - segmentId: inventory-partial-2 + - segmentId: inventory-last-segment bundleId: rhel - position: 200 + position: 200 # should be last based on position values navItems: - id: landing2 - title: Landing section + title: Landing section last href: /apps/landing - id: bar2 title: Some new link @@ -51,12 +51,12 @@ spec: - id: baz2 title: Some new link href: /baz - - segmentId: inventory-partial + - segmentId: c-inventory-segment bundleId: rhel position: 100 navItems: - id: landing - title: Landing section + title: Landing section c href: /apps/landing - id: bar title: Some new link @@ -68,6 +68,27 @@ spec: - id: baz title: Some new link href: /baz + - segmentId: a-inventory-segment + bundleId: rhel + position: 100 # collision with above segment - should sort by segmentId alphabetically + navItems: + - id: landing + title: Landing section A + href: /apps/landing + - segmentId: b-inventory-segment + bundleId: rhel + position: 100 # collision with above segment - should sort by segmentId alphabetically + navItems: + - id: landing + title: Landing section B + href: /apps/landing + - segmentId: d-inventory-segment + bundleId: rhel + position: 100 # collision with above segment - should sort by segmentId alphabetically + navItems: + - id: landing + title: Landing section D + href: /apps/landing - segmentId: skipped-partial bundleId: skipped position: 100 diff --git a/tests/e2e/generate-bundles/02-assert.yaml b/tests/e2e/generate-bundles/02-assert.yaml index 0780a901..498b9d2a 100644 --- a/tests/e2e/generate-bundles/02-assert.yaml +++ b/tests/e2e/generate-bundles/02-assert.yaml @@ -50,7 +50,8 @@ data: {"landing-page":{"manifestLocation":"/apps/landing-page/fed-mods.json","moduleID":"landing-page","fullProfile":false}} bundles.json: >- [{"id":"rhel","title":"Red Hat Enterprise Linux","navItems":[{"href":"/apps/landing","title":"Landing - section","id":"landing"},{"expandable":true,"title":"Some new link","id":"bar","routes":[{"href":"/nested/bar","title":"Foo","id":"foo"}]},{"href":"/baz","title":"Some - new link","id":"baz"},{"href":"/apps/landing","title":"Landing section","id":"landing2"},{"expandable":true,"title":"Some - new link","id":"bar2","routes":[{"href":"/nested/bar","title":"Foo","id":"foo"}]},{"href":"/baz","title":"Some + section A","id":"landing"},{"href":"/apps/landing","title":"Landing section B","id":"landing"},{"href":"/apps/landing","title":"Landing + section c","id":"landing"},{"expandable":true,"title":"Some new link","id":"bar","routes":[{"href":"/nested/bar","title":"Foo","id":"foo"}]},{"href":"/baz","title":"Some + new link","id":"baz"},{"href":"/apps/landing","title":"Landing section D","id":"landing"},{"href":"/apps/landing","title":"Landing + section last","id":"landing2"},{"expandable":true,"title":"Some new link","id":"bar2","routes":[{"href":"/nested/bar","title":"Foo","id":"foo"}]},{"href":"/baz","title":"Some new link","id":"baz2"}]},{"id":"ansible","title":"Ansible","navItems":[]},{"id":"settings","title":"Settings","navItems":[]}]