Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/android-beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export const androidBeta = {
playOptInUrl: "https://play.google.com/apps/testing/com.typewhisper.android",
feedbackEmail: "hello@typewhisper.com",
/**
* Whether the footer and the release status link the beta page. Stays false until the closed
* test is published on Google Play; before that the opt-in link leads nowhere.
* Whether the footer and the release status link the beta page and the page offers the Play
* opt-in. The closed test is published on Google Play since 2026-10-08.
*/
listed: false,
listed: true,
} as const;
17 changes: 9 additions & 8 deletions tests/android-beta.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ for (const locale of ["en", "de"] as const) {
"href",
groupUrl,
);
// The Play opt-in is only offered once the closed test is published (androidBeta.listed).
await expect(page.getByTestId("android-beta-step2")).toHaveCount(0);
await expect(page.getByTestId("android-beta-step2-soon")).toBeVisible();
await expect(page.locator(`a[href="${playUrl}"]`)).toHaveCount(0);
await expect(page.getByTestId("android-beta-step2")).toHaveAttribute(
"href",
playUrl,
);
await expect(page.getByTestId("android-beta-step2-soon")).toHaveCount(0);
await expect(page.locator('meta[name="robots"][content*="noindex"]')).toHaveCount(0);
const notice = page.getByTestId("android-beta-notice");
await expect(notice).toContainText("14");
await expect(
Expand Down Expand Up @@ -66,7 +68,7 @@ for (const locale of ["en", "de"] as const) {
).toBeVisible();
});

test("privacy and footer link the deletion page; the beta stays unlisted", async ({
test("privacy and footer link the deletion page; footer and release status list the beta", async ({
page,
}) => {
await page.goto(`/${locale}/privacy/`);
Expand All @@ -75,17 +77,16 @@ for (const locale of ["en", "de"] as const) {
page.locator(`.site-prose a[href="/${locale}/delete-account/"]`),
).toBeVisible();

// The beta page is not linked until the closed test is published (androidBeta.listed).
const footer = page.locator("footer");
await expect(
footer.getByRole("link", { name: copy[locale].android }),
).toHaveCount(0);
).toHaveAttribute("href", `/${locale}/android/`);
await expect(
footer.getByRole("link", { name: copy[locale].deleteLink }),
).toHaveAttribute("href", `/${locale}/delete-account/`);

await page.goto(`/${locale}/release-status/`);
await expect(page.getByTestId("release-status-android")).toHaveCount(0);
await expect(page.getByTestId("release-status-android")).toBeVisible();
});
});
}
Expand Down
Loading