hotfix(api): add UUID support to access list endpoints

This commit is contained in:
GitHub Actions
2026-01-29 03:15:06 +00:00
parent 069f3ba027
commit 05a33c466b
15 changed files with 1383 additions and 409 deletions

View File

@@ -79,23 +79,27 @@ export async function waitForToast(
): Promise<void> {
const { timeout = 10000, type } = options;
// Build selectors prioritizing our custom toast system which uses data-testid
// This avoids matching generic [role="alert"] elements like security notices
let selector: string;
// Build reliable toast locator with multiple fallback selectors
// Primary: data-testid (custom), Secondary: data-sonner-toast (Sonner), Tertiary: role="alert"
let toast;
if (type) {
// Type-specific toast: match data-testid exactly
selector = `[data-testid="toast-${type}"]`;
// Type-specific toast with fallbacks
toast = page.locator(`[data-testid="toast-${type}"]`)
.or(page.locator('[data-sonner-toast]'))
.or(page.getByRole('alert'))
.filter({ hasText: text })
.first();
} else {
// Any toast: match our custom toast container or react-hot-toast
// Avoid matching static [role="alert"] elements by being more specific
selector = '[data-testid^="toast-"]:not([data-testid="toast-container"])';
// Any toast with fallbacks
toast = page.locator('[data-testid^="toast-"]:not([data-testid="toast-container"])')
.or(page.locator('[data-sonner-toast]'))
.or(page.getByRole('alert'))
.filter({ hasText: text })
.first();
}
// Use .first() to handle cases where multiple toasts are visible (e.g., after rapid toggles)
// The first matching toast is typically the most recent one we care about
const toast = page.locator(selector).first();
await expect(toast).toContainText(text, { timeout });
await expect(toast).toBeVisible({ timeout });
}
/**