Skip to content

Commit 0564a6c

Browse files
authored
Update environment variable policy test (#1239)
* Disable retries * Reorder github action inputs by usage * Update environment variable policy test --------- Signed-off-by: Martin Kravec <kravciak@gmail.com>
1 parent e7c342a commit 0564a6c

3 files changed

Lines changed: 10 additions & 13 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ run-name: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.h
55
on:
66
workflow_dispatch:
77
inputs:
8-
kubewarden:
9-
description: Kubewarden UI from
10-
type: choice
11-
default: 'github'
12-
options:
13-
- source # build extension from main branch
14-
- github # https://rancher.github.io/kubewarden-ui/
15-
- prime # ui-plugin-charts in released rancher prime
168
rancher:
179
description: Rancher version
1810
type: choice
@@ -30,6 +22,14 @@ on:
3022
rancher_text:
3123
description: Rancher constraint
3224
required: false
25+
kubewarden:
26+
description: Kubewarden UI from
27+
type: choice
28+
default: 'github'
29+
options:
30+
- source # build extension from main branch
31+
- github # https://rancher.github.io/kubewarden-ui/
32+
- prime # ui-plugin-charts in released rancher prime
3333
k3s:
3434
description: Kubernetes version
3535
type: choice

tests/e2e/90-allpolicies.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,9 @@ async function setupVerifyImageSignatures(ui: RancherUI) {
9595
}
9696

9797
async function setupEnvironmentVariablePolicy(ui: RancherUI) {
98+
await ui.selectOption('Criteria*', 'containsAnyOf')
9899
await ui.button('Add').click()
99-
await ui.selectOption('Reject Operator', 'anyIn')
100-
await ui.editYaml((y) => {
101-
y.environmentVariables[0].name = 'novar'
102-
})
100+
await ui.page.getByPlaceholder('e.g. bar').fill('reqvar')
103101
}
104102

105103
async function setupUserGroupPSP(ui: RancherUI) {

tests/playwright.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { execSync } from 'child_process'
1313
export default defineConfig({
1414
testDir : './e2e',
1515
forbidOnly : !!process.env.CI, /* Fail the build on CI if you accidentally left test.only in the source code. */
16-
retries : process.env.CI ? 1 : 0, /* Retry on CI only */
1716
workers : 1, /* Opt out of parallel tests */
1817
snapshotPathTemplate: '{testDir}/screenshots/{projectName}/{arg}{ext}', /* Use shared directory for screenshots instead of per-test dir */
1918
updateSnapshots : process.env.CI ? 'none' : 'missing', /* Don't generate snapshots by accident */

0 commit comments

Comments
 (0)