Fix favorite sign-in copy and pale text-secondary contrast.
CI / skip-ci-check (pull_request) Successful in 30s
CI / python-lint (pull_request) Successful in 31s
CI / docker-ci (pull_request) Successful in 33s
CI / secret-scan (pull_request) Successful in 35s
CI / viewer-unit (pull_request) Successful in 2m53s
CI / e2e (pull_request) Failing after 3m4s
CI / admin-unit (pull_request) Successful in 3m7s

Logged-out favorite/report share a reason-aware SignInRequiredDialog so
favorites no longer show report messaging. Replace misplaced text-secondary
(light wash token) with foreground/primary on labels, auth, and menus.
This commit is contained in:
2026-08-05 10:33:29 -04:00
parent 6e79384dc1
commit 0b4162de5f
18 changed files with 215 additions and 141 deletions
+35
View File
@@ -0,0 +1,35 @@
import { test, expect } from '../fixtures';
test.describe('favorite sign-in copy @smoke', () => {
test('logged-out favorite opens sign-in dialog with favorites messaging', async ({
page,
playkitConfig,
}) => {
await page.goto(`${playkitConfig.baseUrl}/`);
await expect(
page.getByRole('button', { name: /Sign in/i }).or(page.getByLabel('Account menu')).first(),
).toBeVisible({ timeout: 20_000 });
// Prefer grid heart; fall back to opening a photo then using the viewer heart.
const gridFavorite = page.getByRole('button', { name: 'Add to favorites' }).first();
if (await gridFavorite.isVisible().catch(() => false)) {
await gridFavorite.click({ force: true });
} else {
const photoButton = page.locator('main .aspect-square button').first();
await expect(photoButton).toBeVisible({ timeout: 15_000 });
await photoButton.click();
await expect(page.getByRole('dialog', { name: /Photo viewer/i })).toBeVisible({
timeout: 15_000,
});
await page
.getByRole('dialog', { name: /Photo viewer/i })
.getByRole('button', { name: 'Add to favorites' })
.click();
}
const signInDialog = page.getByRole('dialog').filter({ hasText: 'Sign In Required' });
await expect(signInDialog).toBeVisible({ timeout: 10_000 });
await expect(signInDialog).toContainText(/save favorites|favorite photos/i);
await expect(signInDialog).not.toContainText(/report photos/i);
});
});