Skip to content

Commit e1f391c

Browse files
authored
Merge pull request #1222 from kravciak/main
Update screenshots to match lato font
2 parents 64378c5 + 020b1ac commit e1f391c

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

tests/e2e/00-installation.spec.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,21 @@ import { Common } from './components/common'
1111

1212
const conf = {
1313
// Install UI extension from: source (yarn dev), github (github tag), prime (official)
14-
ui_from: process.env.ORIGIN || (process.env.API ? 'source' : RancherUI.isPrime ? 'prime' : 'github'),
14+
ui_from: process.env.ORIGIN as 'source'|'github'|'prime'|undefined,
1515
// How to install Kubewarden: manual (from UI extension), fleet, upgrade (previously version)
16-
kw_mode: process.env.MODE || 'manual',
16+
kw_mode: process.env.MODE as 'manual'|'fleet'|'upgrade'|undefined,
1717
// Fetch Kubewarden versions from github for upgrade test
1818
upMap : [] as AppVersion[]
1919
}
2020

21-
expect(conf.ui_from).toMatch(/^(source|github|prime)$/)
22-
expect(conf.kw_mode).toMatch(/^(manual|fleet|upgrade)$/)
21+
if (conf.ui_from) expect(conf.ui_from).toMatch(/^(source|github|prime)$/)
22+
if (conf.kw_mode) expect(conf.kw_mode).toMatch(/^(manual|fleet|upgrade)$/)
2323

24+
// Configure defaults after env is loaded
2425
test.beforeAll(async() => {
26+
conf.ui_from ??= RancherUI.isPrime ? 'prime' : 'github'
27+
conf.kw_mode ??= 'manual'
28+
2529
if (conf.kw_mode === 'upgrade') {
2630
conf.upMap = (await Common.fetchVersionMap()).splice(-3)
2731
}
114 Bytes
Loading
18 Bytes
Loading
26 Bytes
Loading

0 commit comments

Comments
 (0)