diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 4e09c54c..23c46355 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -46,6 +46,7 @@ type SearchEntry struct { Description string `json:"description" yaml:"description"` AltTitle []string `json:"alt_title,omitempty" yaml:"alt_title,omitempty"` IsExternal bool `json:"isExternal,omitempty" yaml:"isExternal,omitempty"` + FrontendRef string `json:"frontendRef,omitempty" yaml:"frontendRef,omitempty"` } type ServiceTile struct { @@ -57,6 +58,7 @@ type ServiceTile struct { Description string `json:"description" yaml:"description"` Icon string `json:"icon" yaml:"icon"` IsExternal bool `json:"isExternal,omitempty" yaml:"isExternal,omitempty"` + FrontendRef string `json:"frontendRef,omitempty" yaml:"frontendRef,omitempty"` } type WidgetHeaderLink struct { @@ -86,10 +88,11 @@ type WidgetDefaults struct { } type WidgetEntry struct { - Scope string `json:"scope" yaml:"scope"` - Module string `json:"module" yaml:"module"` - Config WidgetConfig `json:"config" yaml:"config"` - Defaults WidgetDefaults `json:"defaults" yaml:"defaults"` + Scope string `json:"scope" yaml:"scope"` + Module string `json:"module" yaml:"module"` + Config WidgetConfig `json:"config" yaml:"config"` + Defaults WidgetDefaults `json:"defaults" yaml:"defaults"` + FrontendRef string `json:"frontendRef,omitempty" yaml:"frontendRef,omitempty"` } type BundleSegment struct { @@ -231,9 +234,11 @@ type ChromeNavItem struct { NavItems []ChromeNavItem `json:"navItems,omitempty" yaml:"navItems,omitempty"` // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless - Routes []ChromeNavItem `json:"routes,omitempty" yaml:"routes,omitempty"` - Permissions []Permission `json:"permissions,omitempty" yaml:"permissions,omitempty"` - SegmentRef *SegmentRef `json:"segmentRef,omitempty" yaml:"segmentRef,omitempty"` + Routes []ChromeNavItem `json:"routes,omitempty" yaml:"routes,omitempty"` + Permissions []Permission `json:"permissions,omitempty" yaml:"permissions,omitempty"` + SegmentRef *SegmentRef `json:"segmentRef,omitempty" yaml:"segmentRef,omitempty"` + BundleSegmentRef string `json:"bundleSegmentRef,omitempty" yaml:"bundleSegmentRef,omitempty"` + FrontendRef string `json:"frontendRef,omitempty" yaml:"frontendRef,omitempty"` } func (navItem ChromeNavItem) HasSegmentRef() bool { diff --git a/config/crd/bases/cloud.redhat.com_bundles.yaml b/config/crd/bases/cloud.redhat.com_bundles.yaml index 209f67b0..bf427c0e 100644 --- a/config/crd/bases/cloud.redhat.com_bundles.yaml +++ b/config/crd/bases/cloud.redhat.com_bundles.yaml @@ -48,8 +48,12 @@ spec: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -114,8 +118,12 @@ spec: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index 96c24b37..e46eacfb 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -86,8 +86,12 @@ spec: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -401,8 +405,12 @@ spec: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -476,6 +484,8 @@ spec: type: array description: type: string + frontendRef: + type: string href: type: string id: @@ -504,6 +514,8 @@ spec: properties: description: type: string + frontendRef: + type: string group: type: string href: @@ -641,6 +653,8 @@ spec: - sm - xl type: object + frontendRef: + type: string module: type: string scope: diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 1d8188ba..8fd227d9 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -1018,7 +1018,7 @@ var _ = ginkgo.Describe("Search index", func() { testCase := SearchIndexCase{ Env: FrontendEnvName, Namespace: FrontendNamespace, - ExpectedResult: "[{\"id\":\"test-search-index-test-search-index-env-test\",\"href\":\"/test/href\",\"title\":\"Test\",\"description\":\"Test description\"},{\"id\":\"test-search-index-test-search-index-env-test2\",\"href\":\"/test2/href\",\"title\":\"Test2\",\"description\":\"Test2 description\"}]", + ExpectedResult: fmt.Sprintf("[{\"id\":\"test-search-index-test-search-index-env-test\",\"href\":\"/test/href\",\"title\":\"Test\",\"description\":\"Test description\",\"frontendRef\":\"%s\"},{\"id\":\"test-search-index-test-search-index-env-test2\",\"href\":\"/test2/href\",\"title\":\"Test2\",\"description\":\"Test2 description\",\"frontendRef\":\"%s\"}]", FrontendName, FrontendName), SearchFrontendEntries: []SearchFrontendEntry{{ Name: FrontendName, SearchEntries: []*crd.SearchEntry{{ @@ -1066,7 +1066,7 @@ var _ = ginkgo.Describe("Search index", func() { testCase := SearchIndexCase{ Env: FrontendEnvName2, Namespace: FrontendNamespace, - ExpectedResult: "[{\"id\":\"test-search-index2-test-search-index-env2-test-search-index2\",\"href\":\"/test/href\",\"title\":\"Test\",\"description\":\"Test description\"},{\"id\":\"test-search-index3-test-search-index-env2-test-search-index3\",\"href\":\"/test/href\",\"title\":\"Test\",\"description\":\"Test description\"}]", + ExpectedResult: fmt.Sprintf("[{\"id\":\"test-search-index2-test-search-index-env2-test-search-index2\",\"href\":\"/test/href\",\"title\":\"Test\",\"description\":\"Test description\",\"frontendRef\":\"%s\"},{\"id\":\"test-search-index3-test-search-index-env2-test-search-index3\",\"href\":\"/test/href\",\"title\":\"Test\",\"description\":\"Test description\",\"frontendRef\":\"%s\"}]", FrontendName2, FrontendName3), SearchFrontendEntries: []SearchFrontendEntry{{ Name: FrontendName2, SearchEntries: []*crd.SearchEntry{{ @@ -1225,7 +1225,25 @@ var _ = ginkgo.Describe("Widget registry", func() { ginkgo.It("Should create widget registry", func() { ginkgo.By("collection entries from Frontend resources", func() { - expectedResult := []crd.WidgetEntry{*Widget1, *Widget2, *Widget3} + expectedResult := []crd.WidgetEntry{{ + FrontendRef: FrontendName, + Scope: Widget1.Scope, + Module: Widget1.Module, + Config: Widget1.Config, + Defaults: WidgetDefaults, + }, { + FrontendRef: FrontendName, + Scope: Widget2.Scope, + Module: Widget2.Module, + Config: Widget2.Config, + Defaults: WidgetDefaults, + }, { + FrontendRef: FrontendName2, + Scope: Widget3.Scope, + Module: Widget3.Module, + Config: Widget3.Config, + Defaults: WidgetDefaults, + }} widgetCases := []WidgetCase{{ WidgetsFrontend: []WidgetFrontendTestEntry{{ Widgets: []*crd.WidgetEntry{Widget1, Widget2}, @@ -1368,11 +1386,38 @@ var _ = ginkgo.Describe("Service tiles", func() { Groups: []crd.FrontendServiceCategoryGroupGenerated{{ ID: ServiceSectionGroupID1, Title: "Service Section Group 1", - Tiles: &[]crd.ServiceTile{*ServiceTile1, *ServiceTile2}, + Tiles: &[]crd.ServiceTile{{ + Section: ServiceTile1.Section, + Group: ServiceTile1.Group, + ID: ServiceTile1.ID, + Href: ServiceTile1.Href, + Title: ServiceTile1.Title, + Description: ServiceTile1.Description, + Icon: ServiceTile1.Icon, + FrontendRef: FrontendName, + }, { + Section: ServiceTile2.Section, + Group: ServiceTile2.Group, + ID: ServiceTile2.ID, + Href: ServiceTile2.Href, + Title: ServiceTile2.Title, + Description: ServiceTile2.Description, + Icon: ServiceTile2.Icon, + FrontendRef: FrontendName, + }}, }, { ID: ServiceSectionGroupID2, Title: "Service Section Group 2", - Tiles: &[]crd.ServiceTile{*ServiceTile3}, + Tiles: &[]crd.ServiceTile{{ + Section: ServiceTile3.Section, + Group: ServiceTile3.Group, + ID: ServiceTile3.ID, + Href: ServiceTile3.Href, + Title: ServiceTile3.Title, + Description: ServiceTile3.Description, + Icon: ServiceTile3.Icon, + FrontendRef: FrontendName, + }}, }}, }, } diff --git a/controllers/reconcile.go b/controllers/reconcile.go index a9937fb2..5f439695 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -903,6 +903,7 @@ func adjustSearchEntry(searchEntry *crd.SearchEntry, frontend crd.Frontend) crd. Href: searchEntry.Href, AltTitle: altTitleCopy, IsExternal: searchEntry.IsExternal, + FrontendRef: frontend.Name, } return newSearchEntry } @@ -926,6 +927,7 @@ func setupWidgetRegistry(feList *crd.FrontendList) []crd.WidgetEntry { for _, frontend := range feList.Items { if frontend.Spec.FeoConfigEnabled { for _, widget := range frontend.Spec.WidgetRegistry { + widget.FrontendRef = frontend.Name widgetRegistry = append(widgetRegistry, *widget) } } @@ -977,6 +979,7 @@ func setupServiceTilesData(feList *crd.FrontendList, feEnvironment crd.FrontendE groupKey := getServiceTilePath(tile.Section, tile.Group) if groupTiles, ok := tileGroupAccessMap[groupKey]; ok { // assign the tile to the service category and group + tile.FrontendRef = frontend.Name *groupTiles = append(*groupTiles, *tile) } else { // ignore the tile if destination does not exist @@ -1010,7 +1013,8 @@ func fillNavRefsTree(navItems []crd.ChromeNavItem, navSegmentsCache map[string]m var err error for index := 0; index < len(parsedNavItems); index++ { navItem := parsedNavItems[index] - if navItem.HasSegmentRef() { + // if navItem is a segment ref, replace it with the actual segment + if navItem.HasSegmentRef() && navItem.Href == "" && navItem.Title == "" { segmentRef := navItem.SegmentRef segmentRefCacheEntry, ok := navSegmentsCache[segmentRef.FrontendName][segmentRef.SegmentID] if !ok { @@ -1024,13 +1028,26 @@ func fillNavRefsTree(navItems []crd.ChromeNavItem, navSegmentsCache map[string]m if err != nil { return parsedNavItems, err } + // add attributes required for the frontend local dev environment + // don't forget to mark the segment as filled and fill it navSegmentsCache[segmentRef.FrontendName][segmentRef.SegmentID].IsFilled = true navSegmentsCache[segmentRef.FrontendName][segmentRef.SegmentID].NavItems = segmentRefItems } + + // copy segmentRefItems and add segment ref for Frontend local dev environment + frontendSegmentRefItems := []crd.ChromeNavItem{} + for _, item := range segmentRefItems { + newItem := item.DeepCopy() + newItem.BundleSegmentRef = navItem.BundleSegmentRef + newItem.FrontendRef = segmentRef.FrontendName + newItem.SegmentRef = segmentRef + frontendSegmentRefItems = append(frontendSegmentRefItems, *newItem) + } + // delete the original ref and replace it with the filled segments parsedNavItems = append(parsedNavItems[:index], parsedNavItems[index+1:]...) - parsedNavItems = slices.Insert(parsedNavItems, index, segmentRefItems...) + parsedNavItems = slices.Insert(parsedNavItems, index, frontendSegmentRefItems...) } // Make sure nested nav items have their refs filled as well @@ -1058,7 +1075,7 @@ func fillNavRefsTree(navItems []crd.ChromeNavItem, navSegmentsCache map[string]m func filterUnknownNavRefs(navItems []crd.ChromeNavItem) []crd.ChromeNavItem { res := []crd.ChromeNavItem{} for _, navItem := range navItems { - if navItem.HasSegmentRef() { + if navItem.HasSegmentRef() && navItem.Href == "" && navItem.Title == "" { // skip if segment is a ref continue } @@ -1076,6 +1093,26 @@ func filterUnknownNavRefs(navItems []crd.ChromeNavItem) []crd.ChromeNavItem { return res } +func addRefsToNavItems(navItems []crd.ChromeNavItem, bundleID string, frontendID string) []crd.ChromeNavItem { + res := []crd.ChromeNavItem{} + for _, navItem := range navItems { + newNavItem := navItem + newNavItem.BundleSegmentRef = bundleID + newNavItem.FrontendRef = frontendID + + if newNavItem.IsExpandable() { + newNavItem.Routes = addRefsToNavItems(newNavItem.Routes, bundleID, frontendID) + } + + if newNavItem.IsGroup() { + newNavItem.NavItems = addRefsToNavItems(newNavItem.NavItems, bundleID, frontendID) + } + + res = append(res, newNavItem) + } + return res +} + func setupBundlesData(feList *crd.FrontendList, feEnvironment crd.FrontendEnvironment) ([]crd.FrontendBundlesGenerated, []string, error) { bundles := []crd.FrontendBundlesGenerated{} if feEnvironment.Spec.Bundles == nil { @@ -1105,6 +1142,8 @@ func setupBundlesData(feList *crd.FrontendList, feEnvironment crd.FrontendEnviro for _, frontend := range feList.Items { if frontend.Spec.FeoConfigEnabled && frontend.Spec.BundleSegments != nil { for _, bundleNavSegment := range frontend.Spec.BundleSegments { + navItemsWithRefs := addRefsToNavItems(*bundleNavSegment.NavItems, bundleNavSegment.BundleID, frontend.Name) + bundleNavSegment.NavItems = &navItemsWithRefs bundleNavSegmentMap[bundleNavSegment.BundleID] = append(bundleNavSegmentMap[bundleNavSegment.BundleID], *bundleNavSegment) skippedNavItemsMap[bundleNavSegment.BundleID] = append(skippedNavItemsMap[bundleNavSegment.BundleID], getNavItemPath(frontend.Name, bundleNavSegment.BundleID, bundleNavSegment.SegmentID)) } diff --git a/deploy.yml b/deploy.yml index 27702299..b0646f2f 100644 --- a/deploy.yml +++ b/deploy.yml @@ -67,8 +67,12 @@ objects: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -133,8 +137,12 @@ objects: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -519,8 +527,12 @@ objects: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -838,8 +850,12 @@ objects: properties: appId: type: string + bundleSegmentRef: + type: string expandable: type: boolean + frontendRef: + type: string groupId: type: string href: @@ -913,6 +929,8 @@ objects: type: array description: type: string + frontendRef: + type: string href: type: string id: @@ -941,6 +959,8 @@ objects: properties: description: type: string + frontendRef: + type: string group: type: string href: @@ -1078,6 +1098,8 @@ objects: - sm - xl type: object + frontendRef: + type: string module: type: string scope: diff --git a/tests/e2e/generate-bundles/02-assert.yaml b/tests/e2e/generate-bundles/02-assert.yaml index 498b9d2a..458a4cd2 100644 --- a/tests/e2e/generate-bundles/02-assert.yaml +++ b/tests/e2e/generate-bundles/02-assert.yaml @@ -49,9 +49,4 @@ 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 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":[]}] + [{"id":"rhel","title":"Red Hat Enterprise Linux","navItems":[{"href":"/apps/landing","title":"Landing section A","id":"landing","bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"href":"/apps/landing","title":"Landing section B","id":"landing","bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"href":"/apps/landing","title":"Landing section c","id":"landing","bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"expandable":true,"title":"Some new link","id":"bar","routes":[{"href":"/nested/bar","title":"Foo","id":"foo","bundleSegmentRef":"rhel","frontendRef":"landing-page"}],"bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"href":"/baz","title":"Some new link","id":"baz","bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"href":"/apps/landing","title":"Landing section D","id":"landing","bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"href":"/apps/landing","title":"Landing section last","id":"landing2","bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"expandable":true,"title":"Some new link","id":"bar2","routes":[{"href":"/nested/bar","title":"Foo","id":"foo","bundleSegmentRef":"rhel","frontendRef":"landing-page"}],"bundleSegmentRef":"rhel","frontendRef":"landing-page"},{"href":"/baz","title":"Some new link","id":"baz2","bundleSegmentRef":"rhel","frontendRef":"landing-page"}]},{"id":"ansible","title":"Ansible","navItems":[]},{"id":"settings","title":"Settings","navItems":[]}] diff --git a/tests/e2e/generate-nav-with-segments/02-assert.yaml b/tests/e2e/generate-nav-with-segments/02-assert.yaml index 1027368f..c7016d6e 100644 --- a/tests/e2e/generate-nav-with-segments/02-assert.yaml +++ b/tests/e2e/generate-nav-with-segments/02-assert.yaml @@ -12,4 +12,4 @@ data: fed-modules.json: >- {"segmentedAppOne":{"manifestLocation":"/apps/chrome/js/fed-mods.json","fullProfile":false},"segmentedAppTwo":{"manifestLocation":"/apps/chrome/js/fed-mods.json","fullProfile":false}} bundles.json: >- - [{"id":"segmented-bundle","title":"Segmented bundle","navItems":[{"href":"/link-one","title":"Link one classic","id":"link-one"},{"href":"/link-two","title":"Link two injected","id":"link-two"},{"href":"/link-three","title":"Link three injected","id":"link-three"},{"href":"/link-four","title":"Link four classic","id":"link-four"},{"expandable":true,"title":"Expandable","id":"expandable","routes":[{"href":"/nested/one","title":"Nested one","id":"nested-one"},{"href":"/nested/two","title":"Nested two","id":"nested-two"},{"href":"/nested/three","title":"Nested three","id":"nested-three"},{"href":"/nested/four","title":"Nested four","id":"nested-four"}]}]}] + [{"id":"segmented-bundle","title":"Segmented bundle","navItems":[{"href":"/link-one","title":"Link one classic","id":"link-one","bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-one"},{"href":"/link-two","title":"Link two injected","id":"link-two","segmentRef":{"frontendName":"segmented-app-two","segmentId":"segment-two-item-one"},"bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-two"},{"href":"/link-three","title":"Link three injected","id":"link-three","segmentRef":{"frontendName":"segmented-app-two","segmentId":"segment-two-item-one"},"bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-two"},{"href":"/link-four","title":"Link four classic","id":"link-four","bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-one"},{"expandable":true,"title":"Expandable","id":"expandable","routes":[{"href":"/nested/one","title":"Nested one","id":"nested-one","bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-one"},{"href":"/nested/two","title":"Nested two","id":"nested-two","segmentRef":{"frontendName":"segmented-app-two","segmentId":"nested-segment-two"},"bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-two"},{"href":"/nested/three","title":"Nested three","id":"nested-three","segmentRef":{"frontendName":"segmented-app-two","segmentId":"nested-segment-two"},"bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-two"},{"href":"/nested/four","title":"Nested four","id":"nested-four","bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-one"}],"bundleSegmentRef":"segmented-bundle","frontendRef":"segmented-app-one"}]}] diff --git a/tests/e2e/generate-search-index/02-assert.yaml b/tests/e2e/generate-search-index/02-assert.yaml index 19513795..b26ac362 100644 --- a/tests/e2e/generate-search-index/02-assert.yaml +++ b/tests/e2e/generate-search-index/02-assert.yaml @@ -49,6 +49,6 @@ data: fed-modules.json: >- {"search":{"manifestLocation":"/apps/search/fed-mods.json","moduleID":"search","fullProfile":false}} search-index.json: >- - [{"id":"search-test-search-index-environment-landing","href":"/","title":"Landing","description":"Landing page description","alt_title":["HCC Home page","Home"]},{"id":"search-test-search-index-environment-landing-widgets","href":"/widgets","title":"Widget fantastic","description":"Widget"}] + [{"id":"search-test-search-index-environment-landing","href":"/","title":"Landing","description":"Landing page description","alt_title":["HCC Home page","Home"],"frontendRef":"search"},{"id":"search-test-search-index-environment-landing-widgets","href":"/widgets","title":"Widget fantastic","description":"Widget","frontendRef":"search"}] diff --git a/tests/e2e/generate-service-tiles/02-assert.yaml b/tests/e2e/generate-service-tiles/02-assert.yaml index 50511d79..5d0318c8 100644 --- a/tests/e2e/generate-service-tiles/02-assert.yaml +++ b/tests/e2e/generate-service-tiles/02-assert.yaml @@ -49,4 +49,4 @@ data: fed-modules.json: >- {"service-tiles":{"manifestLocation":"/apps/service-tiles/fed-mods.json","moduleID":"service-tiles","fullProfile":false}} service-tiles.json: >- - [{"id":"automation","title":"Automation","groups":[{"id":"ansible","title":"Ansible","tiles":[{"section":"automation","group":"ansible","id":"ansible-link","href":"/ansible/foo","title":"Ansible FOO","description":"Ansible FOO description thing","icon":"AnsibleIcon"}]},{"id":"rhel","title":"Red Hat Enterprise Linux","tiles":[]}]},{"id":"iam","title":"Identity and Access Management","groups":[{"id":"iam","title":"IAM","tiles":[{"section":"iam","group":"iam","id":"iam-link","href":"/iam","title":"IAM FOO","description":"Some Iam thing","icon":"IAMIcon","isExternal":true}]}]}] + [{"id":"automation","title":"Automation","groups":[{"id":"ansible","title":"Ansible","tiles":[{"section":"automation","group":"ansible","id":"ansible-link","href":"/ansible/foo","title":"Ansible FOO","description":"Ansible FOO description thing","icon":"AnsibleIcon","frontendRef":"service-tiles"}]},{"id":"rhel","title":"Red Hat Enterprise Linux","tiles":[]}]},{"id":"iam","title":"Identity and Access Management","groups":[{"id":"iam","title":"IAM","tiles":[{"section":"iam","group":"iam","id":"iam-link","href":"/iam","title":"IAM FOO","description":"Some Iam thing","icon":"IAMIcon","isExternal":true,"frontendRef":"service-tiles"}]}]}] diff --git a/tests/e2e/generate-widget-registry/02-assert.yaml b/tests/e2e/generate-widget-registry/02-assert.yaml index bad23d0e..44129392 100644 --- a/tests/e2e/generate-widget-registry/02-assert.yaml +++ b/tests/e2e/generate-widget-registry/02-assert.yaml @@ -49,6 +49,6 @@ data: fed-modules.json: >- {"widgets":{"manifestLocation":"/apps/widgets/fed-mods.json","moduleID":"widgets","fullProfile":false}} widget-registry.json: >- - [{"scope":"widgets","module":"./RandomWidget","config":{"icon":"CogIcon","title":"Random Widget","headerLink":{"title":"","href":""}},"defaults":{"sm":{"w":1,"h":1,"maxH":1,"minH":1},"md":{"w":1,"h":1,"maxH":1,"minH":1},"lg":{"w":1,"h":1,"maxH":1,"minH":1},"xl":{"w":1,"h":1,"maxH":1,"minH":1}}}] + [{"scope":"widgets","module":"./RandomWidget","config":{"icon":"CogIcon","title":"Random Widget","headerLink":{"title":"","href":""}},"defaults":{"sm":{"w":1,"h":1,"maxH":1,"minH":1},"md":{"w":1,"h":1,"maxH":1,"minH":1},"lg":{"w":1,"h":1,"maxH":1,"minH":1},"xl":{"w":1,"h":1,"maxH":1,"minH":1}},"frontendRef":"widgets"}]