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

@@ -39,15 +39,20 @@ export function getToastLocator(
): Locator {
const { type } = options;
// Build selector using data-testid to avoid matching generic [role="alert"] elements
// Build selector with fallbacks for reliability
// Primary: data-testid (custom), Secondary: data-sonner-toast (Sonner), Tertiary: role="alert"
let baseLocator: Locator;
if (type) {
// Type-specific toast: match data-testid exactly
baseLocator = page.locator(`[data-testid="toast-${type}"]`);
// Type-specific toast: match data-testid with fallback to sonner
baseLocator = page.locator(`[data-testid="toast-${type}"]`)
.or(page.locator('[data-sonner-toast]'))
.or(page.getByRole('alert'));
} else {
// Any toast: match our custom toast container
baseLocator = page.locator('[data-testid^="toast-"]').first();
// Any toast: match our custom toast container with fallbacks
baseLocator = page.locator('[data-testid^="toast-"]')
.or(page.locator('[data-sonner-toast]'))
.or(page.getByRole('alert'));
}
// Filter by text if provided