Skip to content

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

TypeScript

test(e2e): drive the credential picker and header the UI actually renders

Alfredo Lopeza93cddbeaa5d
diff --git a/tests/e2e/playwright/desktop/codex-subscription-approved-tools.spec.ts b/tests/e2e/playwright/desktop/codex-subscription-approved-tools.spec.ts
index de3ecb0a2..0cf46f97a 100644
--- a/tests/e2e/playwright/desktop/codex-subscription-approved-tools.spec.ts
+++ b/tests/e2e/playwright/desktop/codex-subscription-approved-tools.spec.ts
@@ -223,7 +223,15 @@ for (const scenario of cases) {
scenario.connectionKey = await prepareSubscriptionVisible(page, scenario)
await new ControlUiShell(page).openAgents()
await new AgentListPage(page).openNamed(scenario.agentName)
- await expect(page.getByText(`Agent: ${scenario.agentName}`, { exact: true })).toBeVisible()
+ // The detail header leads with the agent's display name, not the route
+ // slug: `control-ui/app/hosts/[name]/page.tsx:1201` renders
+ // `Agent: ${hostDisplaySaved || routeName}` since `313ddeb26`, and every
+ // fixture agent is created with a display name. Asserting the heading
+ // role also keeps this off the loading skeleton, which carries
+ // `role=progressbar` while the first Overview read is in flight.
+ await expect(
+ page.getByRole('heading', { name: `Agent: ${scenario.agentDisplayName}`, exact: true })
+ ).toBeVisible()
})
await test.step('Select the prepared subscription and persist its model binding', async () => {
const model = new AgentModelPage(page)
diff --git a/tests/e2e/playwright/package-lock.json b/tests/e2e/playwright/package-lock.json
index 2b15e957e..e36ea3dd5 100644
--- a/tests/e2e/playwright/package-lock.json
+++ b/tests/e2e/playwright/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-playwright-tests",
- "version": "0.1.57",
+ "version": "0.1.58",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-playwright-tests",
- "version": "0.1.57",
+ "version": "0.1.58",
"devDependencies": {
"@playwright/test": "^1.50.0",
"@types/node": "^22.0.0",
diff --git a/tests/e2e/playwright/package.json b/tests/e2e/playwright/package.json
index aaca5495d..0e0c1a9f3 100644
--- a/tests/e2e/playwright/package.json
+++ b/tests/e2e/playwright/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-playwright-tests",
- "version": "0.1.57",
+ "version": "0.1.58",
"private": true,
"description": "Playwright E2E tests for Control UI and Desktop App",
"scripts": {
diff --git a/tests/e2e/playwright/pages/codex-subscription.ts b/tests/e2e/playwright/pages/codex-subscription.ts
index dacf5d202..60d51aa95 100644
--- a/tests/e2e/playwright/pages/codex-subscription.ts
+++ b/tests/e2e/playwright/pages/codex-subscription.ts
@@ -88,8 +88,21 @@ export class AgentModelPage {
await expect(this.page.getByRole('button', { name: 'New subscription' })).toHaveCount(0)
}
+ // The credential picker stopped being a native <select> when LlmSecretSelect
+ // replaced it (`d34b7d5206`, 2026-08-27): it renders a button that opens a
+ // `role=listbox` of `role=option` buttons, so `selectOption` cannot drive it
+ // and fails with "Element is not a <select> element". The count assertion
+ // keeps the click off an ambiguous entry and doubles as the witness that the
+ // menu really opened carrying the subscription we asked for.
async chooseSubscription(displayName: string) {
- await this.credentialSelect().selectOption({ label: displayName })
+ await this.credentialSelect().click()
+ const option = this.page
+ .getByRole('listbox', { name: 'Credential', exact: true })
+ .getByRole('option')
+ .filter({ hasText: displayName })
+ await expect(option).toHaveCount(1)
+ await option.click()
+ await expect(this.credentialSelect()).toContainText(displayName)
}
async chooseSecret(secretName: string) {