fix: E2E select dropdown reliability and stale eslint-disable directives

- Fix Radix Select interaction in proxy host E2E helper: scroll trigger
  into view and wait for option visibility before clicking (fixes flaky
  access-control.spec.ts timeout)
- Apply same fix to certificate selector for consistency
- Remove stale eslint-disable directives from pre-existing test files
  (now covered by test-wide eslint config override)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-03-26 10:50:14 +01:00
parent d9806e84e6
commit 7a12ecf2fe
5 changed files with 13 additions and 13 deletions
+13 -5
View File
@@ -76,14 +76,22 @@ export async function createProxyHost(page: Page, config: ProxyHostConfig): Prom
}
if (config.certificateName) {
await page.getByRole('combobox', { name: /certificate/i }).click();
await page.getByRole('option', { name: config.certificateName, exact: true }).click();
const certTrigger = page.getByRole('combobox', { name: /certificate/i });
await certTrigger.scrollIntoViewIfNeeded();
await certTrigger.click();
const certOption = page.getByRole('option', { name: config.certificateName, exact: true });
await expect(certOption).toBeVisible({ timeout: 5_000 });
await certOption.click();
}
if (config.accessListName) {
// MUI TextField select — click to open dropdown, then pick the option
await page.getByRole('combobox', { name: /access list/i }).click();
await page.getByRole('option', { name: config.accessListName }).click();
// shadcn/Radix Select — click trigger to open portal dropdown, wait for option, then click
const accessListTrigger = page.getByRole('combobox', { name: /access list/i });
await accessListTrigger.scrollIntoViewIfNeeded();
await accessListTrigger.click();
const option = page.getByRole('option', { name: config.accessListName });
await expect(option).toBeVisible({ timeout: 5_000 });
await option.click();
}
if (config.mtlsCaNames?.length) {
-3
View File
@@ -18,11 +18,8 @@ import type { TestDb } from '../helpers/db';
// ---------------------------------------------------------------------------
const ctx = vi.hoisted(() => {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { mkdirSync } = require('node:fs');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { join } = require('node:path');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { tmpdir } = require('node:os');
const dir = join(tmpdir(), `instance-sync-test-${Date.now()}`);
mkdirSync(dir, { recursive: true });
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Integration tests for L4 Caddy config generation.
*
-3
View File
@@ -14,11 +14,8 @@ import type { TestDb } from '../helpers/db';
// ---------------------------------------------------------------------------
const ctx = vi.hoisted(() => {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { mkdirSync } = require('node:fs');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { join } = require('node:path');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { tmpdir } = require('node:os');
const dir = join(tmpdir(), `l4-ports-test-${Date.now()}`);
mkdirSync(dir, { recursive: true });
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Unit tests for L4 proxy host input validation.
*