Skip to content

Commit 17a43eb

Browse files
authored
fix(e2e): re-enable rbac tests (#4030)
* fix(e2e): re-enable rbac tests Signed-off-by: Patrick Knight <pknight@redhat.com> * fix(e2e): add dynamic home page plugin to rbac values file Signed-off-by: Patrick Knight <pknight@redhat.com> * fix(e2e): add config values for rbac plugin Signed-off-by: Patrick Knight <pknight@redhat.com> --------- Signed-off-by: Patrick Knight <pknight@redhat.com>
1 parent de15254 commit 17a43eb

File tree

2 files changed

+184
-6
lines changed

2 files changed

+184
-6
lines changed

.ibm/pipelines/value_files/values_showcase-rbac.yaml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,28 @@ global:
129129
disabled: true
130130
- package: ./dynamic-plugins/dist/backstage-community-plugin-rbac
131131
disabled: false
132+
pluginConfig:
133+
dynamicPlugins:
134+
frontend:
135+
backstage-community.plugin-rbac:
136+
translationResources:
137+
- importName: rbacTranslations
138+
ref: rbacTranslationRef
139+
module: Alpha
140+
appIcons:
141+
- name: rbacIcon
142+
importName: RbacIcon
143+
dynamicRoutes:
144+
- path: /rbac
145+
importName: RbacPage
146+
menuItem:
147+
icon: rbacIcon
148+
text: RBAC
149+
textKey: menuItem.rbac
150+
menuItems:
151+
rbac:
152+
parent: default.admin
153+
icon: rbacIcon
132154
- package: ./dynamic-plugins/dist/backstage-community-plugin-analytics-provider-segment
133155
disabled: true
134156
#Enable Scorecard plugin.
@@ -217,6 +239,165 @@ global:
217239
frontend:
218240
red-hat-developer-hub.backstage-plugin-orchestrator-form-widgets: {}
219241

242+
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-dynamic-home-page
243+
disabled: false
244+
pluginConfig:
245+
dynamicPlugins:
246+
frontend:
247+
red-hat-developer-hub.backstage-plugin-dynamic-home-page:
248+
dynamicRoutes:
249+
- path: /
250+
importName: DynamicHomePage
251+
mountPoints:
252+
- mountPoint: application/listener
253+
importName: VisitListener
254+
- mountPoint: home.page/cards
255+
importName: OnboardingSection
256+
config:
257+
id: rhdh-onboarding-section
258+
title: Red Hat Developer Hub - Onboarding
259+
cardLayout:
260+
width:
261+
minColumns: 4
262+
maxColumns: 12
263+
defaultColumns: 12
264+
height:
265+
minRows: 2
266+
maxRows: 12
267+
defaultRows: 4
268+
layouts:
269+
xl:
270+
w: 12
271+
h: 6
272+
lg:
273+
w: 12
274+
h: 6
275+
md:
276+
w: 12
277+
h: 7
278+
sm:
279+
w: 12
280+
h: 8
281+
xs:
282+
w: 12
283+
h: 9
284+
xxs:
285+
w: 12
286+
h: 14
287+
- mountPoint: home.page/cards
288+
importName: EntitySection
289+
config:
290+
id: rhdh-entity-section
291+
title: Red Hat Developer Hub - Software Catalog
292+
cardLayout:
293+
width:
294+
minColumns: 4
295+
maxColumns: 12
296+
defaultColumns: 12
297+
height:
298+
minRows: 2
299+
maxRows: 12
300+
defaultRows: 4
301+
layouts:
302+
xl:
303+
w: 12
304+
h: 7
305+
lg:
306+
w: 12
307+
h: 7
308+
md:
309+
w: 12
310+
h: 8
311+
sm:
312+
w: 12
313+
h: 9
314+
xs:
315+
w: 12
316+
h: 11
317+
xxs:
318+
w: 12
319+
h: 15
320+
- mountPoint: home.page/cards
321+
importName: TemplateSection
322+
config:
323+
id: rhdh-template-section
324+
title: Red Hat Developer Hub - Explore templates
325+
cardLayout:
326+
width:
327+
minColumns: 4
328+
maxColumns: 12
329+
defaultColumns: 12
330+
height:
331+
minRows: 2
332+
maxRows: 12
333+
defaultRows: 4
334+
layouts:
335+
xl:
336+
w: 12
337+
h: 5
338+
lg:
339+
w: 12
340+
h: 5
341+
md:
342+
w: 12
343+
h: 5
344+
sm:
345+
w: 12
346+
h: 5
347+
xs:
348+
w: 12
349+
h: 7.5
350+
xxs:
351+
w: 12
352+
h: 13.5
353+
- mountPoint: home.page/cards
354+
importName: QuickAccessCard
355+
config:
356+
id: quickaccess-card
357+
title: Quick Access Card
358+
- mountPoint: home.page/cards
359+
importName: SearchBar
360+
config:
361+
id: searchbar
362+
title: Search
363+
cardLayout:
364+
width:
365+
minColumns: 4
366+
maxColumns: 12
367+
defaultColumns: 12
368+
height:
369+
minRows: 1
370+
maxRows: 2
371+
defaultRows: 2
372+
- mountPoint: home.page/cards
373+
importName: CatalogStarredEntitiesCard
374+
config:
375+
id: catalog-starred-entities-card
376+
title: Starred catalog entities
377+
- mountPoint: home.page/cards
378+
importName: RecentlyVisitedCard
379+
config:
380+
id: recently-visited-card
381+
title: Recently visited
382+
- mountPoint: home.page/cards
383+
importName: TopVisitedCard
384+
config:
385+
id: top-visited-card
386+
title: Top visited
387+
- mountPoint: home.page/cards
388+
importName: FeaturedDocsCard
389+
config:
390+
id: featured-docs-card
391+
title: Featured docs
392+
- mountPoint: home.page/cards
393+
importName: JokeCard
394+
config:
395+
id: joke-card
396+
title: Random joke
397+
translationResources:
398+
- importName: homepageTranslations
399+
ref: homepageTranslationRef
400+
220401
# -- Upstream Backstage [chart configuration](https://github.com/backstage/charts/blob/main/charts/backstage/values.yaml)
221402
# @default -- Use Openshift compatible settings
222403
upstream:

e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ test.describe("Test RBAC", () => {
320320
await uiHelper.clickLink("RBAC");
321321
});
322322

323-
//FIXME RHDHBUGS-2483
324-
test.skip("Create and edit a role from the roles list page", async ({
323+
test("Create and edit a role from the roles list page", async ({
325324
page,
326325
}) => {
327326
const uiHelper = new UIhelper(page);
@@ -403,8 +402,7 @@ test.describe("Test RBAC", () => {
403402
await rbacPo.deleteRole("role:default/test-role");
404403
});
405404

406-
//FIXME https://issues.redhat.com/browse/RHDHBUGS-2483
407-
test.skip("Edit users and groups and update policies of a role from the overview page", async ({
405+
test("Edit users and groups and update policies of a role from the overview page", async ({
408406
page,
409407
}) => {
410408
const uiHelper = new UIhelper(page);
@@ -749,8 +747,7 @@ test.describe("Test RBAC", () => {
749747
await uiHelper.verifyHeading("All roles (1)");
750748
});
751749

752-
//FIXME https://issues.redhat.com/browse/RHDHBUGS-2483
753-
test.skip("Test that user with `IsOwner` condition can access the RBAC page, create a role, edit a role, and delete the role", async ({
750+
test("Test that user with `IsOwner` condition can access the RBAC page, create a role, edit a role, and delete the role", async ({
754751
page,
755752
}) => {
756753
const common = new Common(page);

0 commit comments

Comments
 (0)