e2e: exercise favorite sign-in via photo viewer path
CI / skip-ci-check (pull_request) Successful in 30s
CI / docker-ci (pull_request) Successful in 32s
CI / python-lint (pull_request) Successful in 34s
CI / secret-scan (pull_request) Successful in 38s
CI / admin-unit (pull_request) Successful in 1m41s
CI / viewer-unit (pull_request) Successful in 2m17s
CI / e2e (pull_request) Successful in 2m14s
CI / skip-ci-check (pull_request) Successful in 30s
CI / docker-ci (pull_request) Successful in 32s
CI / python-lint (pull_request) Successful in 34s
CI / secret-scan (pull_request) Successful in 38s
CI / admin-unit (pull_request) Successful in 1m41s
CI / viewer-unit (pull_request) Successful in 2m17s
CI / e2e (pull_request) Successful in 2m14s
This commit is contained in:
@@ -10,22 +10,14 @@ test.describe('favorite sign-in copy @smoke', () => {
|
||||
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();
|
||||
}
|
||||
// Open photo viewer (matches the reported bug path) then click the heart.
|
||||
const photoButton = page.locator('main .aspect-square button').first();
|
||||
await expect(photoButton).toBeVisible({ timeout: 15_000 });
|
||||
await photoButton.click();
|
||||
const viewer = page.getByRole('dialog', { name: /Photo viewer/i });
|
||||
await expect(viewer).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
await viewer.getByRole('button', { name: 'Add to favorites' }).click();
|
||||
|
||||
const signInDialog = page.getByRole('dialog').filter({ hasText: 'Sign In Required' });
|
||||
await expect(signInDialog).toBeVisible({ timeout: 10_000 });
|
||||
|
||||
Reference in New Issue
Block a user