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
2 changes: 1 addition & 1 deletion src/commands/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const startSub = defineCommand({
'android-device': {
type: 'string',
description:
'[Android] Device profile to match a cloud run (options: pixel-6, pixel-6-pro, pixel-7, pixel-7-pro, pixel-8, pixel-10, pixel-10-pro, pixel-10-pro-xl, pixel-11)',
'[Android] Device profile to match a cloud run (options: pixel-6, pixel-8, pixel-10, pixel-10-pro, pixel-10-pro-xl, pixel-11)',
},
'android-api-level': {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/config/flags/device.flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const deviceFlags = {
},
'android-device-matrix': {
type: 'string',
description: `[Android only] Device-matrix cell as <device>:<apiLevel> (append :play for Google Play), e.g. pixel-7:34 or pixel-7:34:play. Repeatable — every flow runs once per cell (no cross-product). Cannot be combined with --ios-device-matrix.`,
description: `[Android only] Device-matrix cell as <device>:<apiLevel> (append :play for Google Play), e.g. pixel-8:34 or pixel-8:34:play. Repeatable — every flow runs once per cell (no cross-product). Cannot be combined with --ios-device-matrix.`,
},
orientation: {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/mcp/tools/run-cloud-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function registerRunCloudTest(server: McpServer): void {
iosVersion: z.string().optional().describe('iOS version, e.g. "17"'),
iosDevice: z.string().optional().describe('iOS device, e.g. "iphone-14"'),
androidApiLevel: z.string().optional().describe('Android API level, e.g. "34"'),
androidDevice: z.string().optional().describe('Android device, e.g. "pixel-7"'),
androidDevice: z.string().optional().describe('Android device, e.g. "pixel-10"'),
googlePlay: z.boolean().optional().describe('Use a Google Play-enabled Android image'),
name: z.string().optional().describe('A name for this run'),
env: z
Expand Down
2 changes: 1 addition & 1 deletion src/services/device-validation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class DeviceValidationService {
// Mirrors the API, which applies these same global defaults to a
// request that omits either half (execution-planner.service.ts)
// and then rejects an incompatible pair.
defaultDevice: 'pixel-7',
defaultDevice: 'pixel-10',
defaultVersion: '36',
device,
deviceArg: argNames.androidDevice,
Expand Down
2 changes: 0 additions & 2 deletions src/types/domain/device.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export enum EiOSDevices {
export enum EAndroidDevices {
'generic-tablet' = 'generic-tablet',
'pixel-6' = 'pixel-6',
'pixel-6-pro' = 'pixel-6-pro',
'pixel-7' = 'pixel-7',
'pixel-7-pro' = 'pixel-7-pro',
'pixel-8' = 'pixel-8',
'pixel-10' = 'pixel-10',
'pixel-10-pro' = 'pixel-10-pro',
Expand Down
2 changes: 1 addition & 1 deletion src/utils/device-matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function parseDeviceMatrix(
(parts.length === 3 && parts[2] !== 'play')
) {
throw new CliError(
`Invalid --android-device-matrix "${raw}". Expected <device>:<apiLevel> or <device>:<apiLevel>:play, e.g. pixel-7:34 or pixel-7:34:play.`,
`Invalid --android-device-matrix "${raw}". Expected <device>:<apiLevel> or <device>:<apiLevel>:play, e.g. pixel-8:34 or pixel-8:34:play.`,
);
}
configs.push({
Expand Down
21 changes: 13 additions & 8 deletions test/unit/device-validation.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('DeviceValidationService', () => {
});

// The API fills an omitted half from the same global defaults (iphone-14 /
// iOS 17, pixel-7 / API 36) and rejects an incompatible pair, so the CLI
// iOS 17, pixel-10 / API 36) and rejects an incompatible pair, so the CLI
// mirrors that — but must tell the user to pass the other half.
describe('requests that rely on a default', () => {
it('tells a device-only iOS request to pass the version explicitly', () => {
Expand Down Expand Up @@ -174,25 +174,30 @@ describe('DeviceValidationService', () => {
expect(() => ios('99')).to.throw(
/No iOS device was given, so the default \(iphone-14\) was checked: no iOS device offers iOS 99$/,
);
expect(() => android('36', undefined, true)).to.throw(
/no Google Play device offers API level 36$/,
// The default device (pixel-10) has Play images, as it does in the API.
const playDefault = {
...compat,
androidPlay: { ...compat.androidPlay, 'pixel-10': ['36', '37'] },
};
expect(() => android('35', undefined, true, playDefault)).to.throw(
/no Google Play device offers API level 35$/,
);
});

it('leaves a version-only request to the API once the API no longer offers the assumed default device', () => {
// The API has moved its default on; checking against the CLI's stale
// assumption would refuse a request the API accepts.
const withoutPixel7 = {
const withoutPixel10 = {
...compat,
android: { 'pixel-10': ['36', '37'] },
android: { 'pixel-12': ['38'] },
};
expect(() => android('36', undefined, false, withoutPixel7)).to.not.throw();
expect(() => android('38', undefined, false, withoutPixel10)).to.not.throw();
});
});

// With Google Play the API does not apply the global default to an omitted
// half — pixel-7 / API 36 has no Play image — but picks whichever value
// makes the pair a Play cell, and only rejects when there is none.
// half when that would miss a Play image, but picks whichever value makes
// the pair a Play cell, and only rejects when there is none.
describe('Google Play requests that name one half', () => {
const play36 = {
...compat,
Expand Down
Loading