Repository navigation
Expand file tree
/
Copy pathapp-config.local-e2e.yaml
More file actions
323 lines (316 loc) · 10.6 KB
/
Copy pathapp-config.local-e2e.yaml
File metadata and controls
323 lines (316 loc) · 10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# Config overlay for the cluster-free local E2E harness (NFS `packages/app`, Tier B).
#
# Layered on top of app-config.yaml and the generated
# dynamic-plugins-root/app-config.dynamic-plugins.yaml to run Playwright E2E
# without an OpenShift/Kubernetes cluster or container images:
#
# yarn --cwd e2e-tests e2e:local
#
# It enables guest sign-in (the auth backend rejects guest unless a provider is
# configured) and pins the in-memory SQLite database so a single `run` is fully
# self-contained. See docs/e2e-tests/local-e2e-harness.md.
#
# NOTE: test-only. This grants unauthenticated guest access
# (dangerouslyAllowOutsideDevelopment) and must never be layered into a
# production config.
auth:
environment: development
providers:
guest:
userEntityRef: user:default/guest
# Required because auth.environment may resolve outside "development" in CI.
dangerouslyAllowOutsideDevelopment: true
# app-auth 1.2.0 no longer injects Guest in development; auth.providers is not
# frontend-visible. Explicit signInPage is required. packages/app/config.d.ts must
# declare it @visibility frontend so package start does not filter it out.
# Same regression as #5619 (OCP ConfigMaps); see rhdh-plugins #4716.
signInPage: guest
backend:
database:
client: better-sqlite3
connection: ":memory:"
# CI's customized build-info card on the Settings page, exercised by
# plugins/user-settings-info-card.spec.ts.
buildInfo:
title: "RHDH Build info"
card:
TechDocs builder: "local"
Authentication provider: "Github"
RBAC: disabled
overrideBuildInfo: true
# The settings page language toggle only renders with multiple locales
# configured; mirror the CI list (settings.spec.ts switches to French).
i18n:
locales:
- en
- de
- es
- fr
- it
- ja
# CI opts user settings out of database storage.
userSettings:
persistence: browser
# CI ingests the guest user ("Guest User", member of team-a) from Keycloak via
# the keycloakOrg provider; off-cluster the same entities come from a local
# file. NOTE: this locations array replaces the base app-config.yaml one (the
# GitHub URL locations), keeping the harness catalog offline and deterministic.
catalog:
locations:
# file targets resolve relative to the backend process cwd, which the
# harness webServer sets to packages/backend.
- type: file
target: ../../e2e-tests/local-harness/guest-ownership-entities.yaml
rules:
- allow: [User, Group]
# The app (NFS, default) reads `app.extensions` below, mirroring the CI ConfigMap
# (.ci/pipelines/resources/config_map/dynamic-plugins-config.yaml): the home page route
# plus a customized home-page widget layout. RHDH homepage owns `page:homepage`;
# disable community `page:home` so only one Home destination is registered. NFS
# home-page cards are a fixed set of built-in widgets (home-page-widget:homepage/*) —
# arbitrary cards like the old OFS Placeholder/Markdown/JokeCard/Headline mount points
# have no NFS equivalent. The app-defaults dynamic plugin provides the NFS sidebar. See
# home-page-customization.spec.ts and sidebar.spec.ts for the assertions this drives —
# guest-signin-happy-path.spec.ts additionally covers the Search and Starred Catalog
# Entities widgets.
app:
extensions:
- page:home: false
- page:homepage:
config:
path: /
title: Home
- api:home/visits: true
- translation:app/homepage-translations
# app-root-element:home/visit-listener (also enabled in the CI ConfigMap) is
# deliberately NOT enabled here. It calls VisitsStorageApi.save() — an unguarded
# backend call — on every route change, which 404s because userSettings.persistence:
# browser (above) means the backend never loads @backstage/plugin-user-settings-backend.
# In a production build that 404 is just a background error; under this harness's dev
# server (backstage-cli package start), the resulting unhandled rejection triggers
# webpack's react-refresh error overlay, which is a full-screen transparent iframe that
# then intercepts every click for the rest of the test. api:home/visits above is enough
# to keep the Top/Recently Visited home-page widgets rendering (just always empty here).
# The global-header plugin's own default extensions (gh-component:global-header/*,
# gh-menu-item:global-header/*) are enabled by default — see
# e2e-tests/local-harness/dynamic-plugins.yaml. Only the wrapper + translation
# module need explicit enabling here, since they attach to the core `app`
# plugin rather than being scoped to the global-header plugin itself.
- app-root-wrapper:app/global-header
- translation:app/global-header-translations
# NFS AppLanguageApi reads availableLanguages here — not from i18n.locales above.
# Without this, UserSettingsLanguageToggle hides itself (languages.length <= 1).
- api:app/app-language:
config:
availableLanguages: [en, de, es, fr, it, ja]
defaultLanguage: en
# Backstage 1.54 added home-page-widget:search/search-bar on @backstage/plugin-search.
# The RHDH homepage plugin already provides home-page-widget:homepage/search-bar; leaving
# both enabled duplicates the Search input and fails guest-signin-happy-path.spec.ts.
- home-page-widget:search/search-bar: false
# customizable: false so `priority` actually governs ordering (with customizable:
# true, the layout extension keeps the plugin-registration order and ignores
# priority entirely). Keys match each widget's `params.name` — see
# rhdh-plugins/workspaces/homepage/plugins/homepage/src/extensions/homePageCards.tsx.
# Breakpoints mirror app-config.local.yaml / the CI ConfigMap so the default NFS widgets
# render in a stable layout for home-page-customization.spec.ts.
- home-page-layout:homepage/dynamic-homepage-layout:
config:
customizable: false
widgetLayout:
"Red Hat Developer Hub - Explore templates":
priority: 300
breakpoints:
xl:
w: 12
h: 5
lg:
w: 12
h: 5
md:
w: 12
h: 5
sm:
w: 12
h: 5
xs:
w: 12
h: 7.5
xxs:
w: 12
h: 13.5
"Red Hat Developer Hub - Software Catalog":
priority: 200
breakpoints:
xl:
w: 12
h: 7
lg:
w: 12
h: 7
md:
w: 12
h: 8
sm:
w: 12
h: 9
xs:
w: 12
h: 11
xxs:
w: 12
h: 15
"Red Hat Developer Hub - Onboarding":
priority: 100
breakpoints:
xl:
w: 12
h: 6
lg:
w: 12
h: 6
md:
w: 12
h: 7
sm:
w: 12
h: 8
xs:
w: 12
h: 9
xxs:
w: 12
h: 14
"Quick Access Card":
priority: 90
breakpoints:
xl:
w: 6
h: 8
x: 6
lg:
w: 6
h: 8
x: 6
md:
w: 6
h: 8
x: 6
sm:
w: 12
h: 8
x: 6
xs:
w: 12
h: 8
x: 6
xxs:
w: 12
h: 8
x: 6
"Featured docs":
priority: 80
breakpoints:
xl:
w: 6
h: 4
lg:
w: 6
h: 4
md:
w: 6
h: 4
sm:
w: 12
h: 4
xs:
w: 12
h: 4
xxs:
w: 12
h: 4
"Catalog starred":
priority: 70
breakpoints:
xl:
w: 6
h: 4
lg:
w: 6
h: 4
md:
w: 6
h: 4
sm:
w: 12
h: 4
xs:
w: 12
h: 4
xxs:
w: 12
h: 4
"Recently visited":
priority: 60
breakpoints:
xl:
w: 6
h: 4
lg:
w: 6
h: 4
md:
w: 6
h: 4
sm:
w: 12
h: 4
xs:
w: 12
h: 4
xxs:
w: 12
h: 4
"Top visited":
priority: 50
breakpoints:
xl:
w: 6
h: 4
lg:
w: 6
h: 4
md:
w: 6
h: 4
sm:
w: 12
h: 4
xs:
w: 12
h: 4
xxs:
w: 12
h: 4
homepage:
# The backend catalog defaults only include the three main sections. Mirror
# the CI fixture's cards so Guest and homepage tests cover the same widgets.
defaultWidgets:
- id: rhdh-onboarding-section
ref: rhdh-onboarding-section
- id: rhdh-entity-section
ref: rhdh-entity-section
- id: rhdh-template-section
ref: rhdh-template-section
- id: quickaccess-card
ref: quickaccess-card
- id: search-bar
ref: search-bar
- id: featured-docs-card
ref: featured-docs-card
- id: catalog-starred-entities-card
ref: catalog-starred-entities-card
- id: recently-visited-card
ref: recently-visited-card
- id: top-visited-card
ref: top-visited-card