Open in Google Play Console deep-links the app: Play developer id per credential profile (accounts play-developer, desktop Accounts), shared playAppUrl builder for desktop, CLI and watch; developer chooser instead of the console root
This commit is contained in:
parent
7c769c18f4
commit
4a74989a95
33 changed files with 311 additions and 40 deletions
19
apps/desktop/tests/play-link.test.ts
Normal file
19
apps/desktop/tests/play-link.test.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// "Open in Google Play Console" from the desktop: the app's developer id comes from its status (config / profile) or
|
||||
// its Play account; the link is the shared console-links builder.
|
||||
import { expect, test } from 'bun:test';
|
||||
import { playUrlFor } from '../src/ui/app-menu';
|
||||
|
||||
const DEV = '5550000000000000001', APP = '4970000000000000002';
|
||||
const app = { key: 'p1', android: { account: 'play-acme', key: 'k', store: 'android', app: { id: 'com.example.app' } }, project: null } as never;
|
||||
const data = (status: unknown, devOnAccount: string | null) => ({ statusFor: () => status, accounts: [{ id: 'play-acme', kind: 'play', developerId: devOnAccount }] }) as never;
|
||||
|
||||
test('status ids: the app dashboard', () => {
|
||||
expect(playUrlFor(data({ app: { platforms: { android: { packageName: 'com.example.app', developerId: DEV, appId: APP } } } }, null), app))
|
||||
.toBe(`https://play.google.com/console/u/0/developers/${DEV}/app/${APP}/app-dashboard`);
|
||||
});
|
||||
test('the Play account\'s developer id: its app list', () => {
|
||||
expect(playUrlFor(data(null, DEV), app)).toBe(`https://play.google.com/console/u/0/developers/${DEV}/app-list`);
|
||||
});
|
||||
test('nothing known: the developer chooser', () => {
|
||||
expect(playUrlFor(data(null, null), app)).toBe('https://play.google.com/console/u/0/developers');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue