feat(ui): hide Telegram/VK link buttons on the native build
The native (Capacitor) sign-in surface is guest + email only: VK ID web-login is a full-page redirect to id.vk.com that cannot return into the WebView, and the Telegram Login Widget is unreliable there. Profile now gates telegramLinkable/vkLinkable on !nativeShell (clientChannel android/ ios), hiding both LINK buttons on native; email and account management — including an existing link's redirect-free UNLINK — stay. Native tg/vk login (native SDKs / deep-link OAuth) is a separate later stage. Covered by e2e/native.spec.ts (the reconcile test opens Profile and asserts no Link Telegram / Link VK buttons, email present).
This commit is contained in:
@@ -73,6 +73,17 @@ test.describe('native offline-first', () => {
|
||||
await expect(page.locator('header.nav.offline')).toHaveCount(0);
|
||||
await expect(page.getByText('Ann', { exact: false }).first()).toBeVisible({ timeout: 15000 });
|
||||
await expect(page.locator('button.tab').nth(1)).toBeEnabled();
|
||||
|
||||
// The native sign-in surface is guest + email only: on Profile the Telegram + VK LINK buttons are
|
||||
// hidden (their login widget / full-page redirect cannot return into the WebView), while email account
|
||||
// management stays. loginWidgetAvailable/vkWebLinkAvailable are true under the mock, so on web these
|
||||
// buttons DO show (social.spec links Telegram there) — a count of 0 here proves the native gate, not a
|
||||
// merely-absent button.
|
||||
await page.getByRole('button', { name: /Settings/ }).click();
|
||||
await page.getByRole('button', { name: 'Profile', exact: true }).click();
|
||||
await expect(page.getByRole('button', { name: /Link Telegram/i })).toHaveCount(0);
|
||||
await expect(page.getByRole('button', { name: /Link VK/i })).toHaveCount(0);
|
||||
await expect(page.getByText('you@example.com')).toBeVisible();
|
||||
});
|
||||
|
||||
test('starts a 2-player hotseat game as an offline guest', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user