Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test: preserve selected plugin notification recipient

Alfredo Lopez8673bd1b2dca
diff --git a/control-ui/e2e/plugin-workload-sdk-operator-journey.spec.ts b/control-ui/e2e/plugin-workload-sdk-operator-journey.spec.ts
index 966532287..717b4833d 100644
--- a/control-ui/e2e/plugin-workload-sdk-operator-journey.spec.ts
+++ b/control-ui/e2e/plugin-workload-sdk-operator-journey.spec.ts
@@ -408,9 +408,25 @@ test.describe('Plugin Workload SDK — operator journey (installed plugin → gr
await page.getByPlaceholder('Search by name or email…').fill(USER_EMAIL)
const userOption = page.getByRole('option').filter({ hasText: USER_EMAIL })
await expect(userOption.first()).toBeVisible({ timeout: 10_000 })
+ const targetOption = userOption.first()
+ const targetLabel = await targetOption.getAttribute('aria-label')
+ expect(targetLabel, `recipient option has no accessible label for ${USER_EMAIL}`).toBeTruthy()
+
+ // SelectionDropdown can reopen with previously selected users. Remove
+ // every other visible chip first; clicking an already-selected target
+ // would toggle it off and silently authorize the wrong recipient.
+ const selectedUsers = page.locator('[aria-label="Selected users"]')
+ const selectedChips = selectedUsers.getByRole('button', { name: /^Remove / })
+ for (const chip of await selectedChips.all()) {
+ const chipLabel = await chip.getAttribute('aria-label')
+ if (chipLabel !== `Remove ${targetLabel}`) await chip.click()
+ }
+ if ((await targetOption.getAttribute('aria-selected')) !== 'true') {
+ await targetOption.click()
+ }
+ await expect(targetOption).toHaveAttribute('aria-selected', 'true')
if (EVIDENCE_DIR)
await page.screenshot({ path: `${EVIDENCE_DIR}/operator-1-pick-user-by-email.png` })
- await userOption.first().click()
await usersDropdown.click() // collapse the menu before saving
await page.getByRole('button', { name: 'Save grant' }).click()
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 0cf325b55..10ff25070 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.381",
+ "version": "0.1.382",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.381",
+ "version": "0.1.382",
"dependencies": {
"@clerum/llm-providers": "file:../packages/llm-providers",
"@clerum/workflow-recipe-capability-policy": "file:../packages/workflow-recipe-capability-policy",
diff --git a/control-ui/package.json b/control-ui/package.json
index ea18ac732..0a9dd53ed 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.381",
+ "version": "0.1.382",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",