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
5 changes: 2 additions & 3 deletions src/daemon/__tests__/providers-plugin-routing-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ test('providers.platformGatedResolvers facet is byte-identical to the former han
});

test('every family carries the providers facet with the resolvers it owns', () => {
// Apple owns ios + macos (SAME plugin instance). Unlike appLog/perf, EVERY family
// owns at least one platform-specific resolver, so all four carry the facet.
assert.equal(getPlugin('apple'), getPlugin('apple'));
// The exact-array form (not the membership scan above) is what catches a facet listing a
// resolver twice. Harmonyos carries no facet at all, so five families are asserted here.
assert.deepEqual([...getPlugin('apple').providers!.platformGatedResolvers].sort(), [
'appleRunnerProvider',
'appleToolProvider',
Expand Down
17 changes: 1 addition & 16 deletions src/daemon/__tests__/response-views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ const SNAPSHOT_DATA: DaemonResponseData = {
appName: 'Demo', // a non-cheap field that the digest intentionally drops
};

test('snapshot view is registered', () => {
expect(typeof snapshotView).toBe('function');
});

test('digest collapses the node tree to count + actionable refs + cheap signals', () => {
const digest = snapshotView!(SNAPSHOT_DATA, 'digest');
expect(digest).toEqual({
Expand Down Expand Up @@ -122,10 +118,6 @@ const SCREENSHOT_DATA: DaemonResponseData = {
], // cheap retrieval handle — preserved
};

test('screenshot view is registered', () => {
expect(typeof screenshotView).toBe('function');
});

test('digest collapses overlay geometry to count + leveled refs, keeps cheap fields', () => {
const digest = screenshotView!(SCREENSHOT_DATA, 'digest');
expect(digest).toEqual({
Expand Down Expand Up @@ -235,9 +227,7 @@ const COMPACT_NODE = {
hittable: true,
};

test('find and get views are registered (shared selector-read view)', () => {
expect(typeof findView).toBe('function');
expect(typeof getView).toBe('function');
test('find and get share one selector-read view', () => {
expect(findView).toBe(getView);
});

Expand Down Expand Up @@ -388,7 +378,6 @@ const SETTLE_DATA: DaemonResponseData = {
};

test('interaction settle views are registered for all four touch commands', () => {
expect(typeof RESPONSE_VIEWS.press).toBe('function');
expect(RESPONSE_VIEWS.press).toBe(RESPONSE_VIEWS.click);
expect(RESPONSE_VIEWS.press).toBe(RESPONSE_VIEWS.fill);
expect(RESPONSE_VIEWS.press).toBe(RESPONSE_VIEWS.longpress);
Expand Down Expand Up @@ -571,10 +560,6 @@ const NETWORK_DATA: DaemonResponseData = {
artifacts: [{ field: 'path', artifactType: 'app-log', artifactId: 'artifact-network-log' }],
};

test('network view is registered', () => {
expect(typeof networkView).toBe('function');
});

test('network digest keeps the whole dump + every entry identity, dropping only payload material', () => {
const digest = networkView!(NETWORK_DATA, 'digest');
// Top-level dump is preserved verbatim.
Expand Down
34 changes: 1 addition & 33 deletions src/daemon/handlers/__tests__/session-relaunch-guards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,39 +137,6 @@ test('open --relaunch rejects Android app binary paths for active sessions', asy
);
});

test('open --relaunch rejects Android app binary paths for active sessions before device refresh', async () => {
const sessionStore = makeSessionStore();
const session = makeSession('default', {
platform: 'android',
id: 'emulator-5554',
name: 'Pixel',
kind: 'emulator',
booted: true,
});
session.appName = 'com.example.app';
session.appBundleId = 'com.example.app';
sessionStore.set('default', session);

const response = await handleSessionCommands({
req: {
token: 't',
session: 'default',
command: 'open',
positionals: ['/tmp/app-debug.apk'],
flags: { relaunch: true, platform: 'android' },
},
sessionName: 'default',
logPath: path.join(mkdtempForTestSync('daemon'), 'daemon.log'),
sessionStore,
invoke: noopInvoke,
});

assertInvalidArgsMessage(
response,
'Android runtime hints require an installed package name, not "/tmp/app-debug.apk". Install or reinstall the app first, then relaunch by package.',
);
});

test('open --relaunch rejects Android app binary paths before resolving a new device', async () => {
const sessionStore = makeSessionStore();
const response = await handleSessionCommands({
Expand All @@ -190,6 +157,7 @@ test('open --relaunch rejects Android app binary paths before resolving a new de
response,
'Android runtime hints require an installed package name, not "/tmp/app-debug.apk". Install or reinstall the app first, then relaunch by package.',
);
expect(mockResolveTargetDevice).not.toHaveBeenCalled();
});

test('open on in-use device returns DEVICE_IN_USE before readiness checks', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,6 @@ const DELEGATING_CASES = `
return await dispatchFillViaRuntime(params);
`;

test('the dispatcher guard accepts a switch whose touch cases only delegate', () => {
assert.deepEqual(touchDispatchViolations(dispatcher(DELEGATING_CASES)), []);
});

test('the dispatcher guard rejects a hand-rolled responseData hidden behind a nested switch', () => {
const source = dispatcher(
DELEGATING_CASES.replace(
Expand Down
Loading