mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
fix: allow swipe on ios physical devices (#84)
This commit is contained in:
committed by
GitHub
parent
44c966b4b4
commit
40283f5c27
@@ -33,13 +33,19 @@ test('iOS simulator-only commands reject iOS devices and Android', () => {
|
||||
});
|
||||
|
||||
test('simulator-only iOS commands with Android support reject iOS devices', () => {
|
||||
for (const cmd of ['record', 'settings', 'swipe']) {
|
||||
for (const cmd of ['record', 'settings']) {
|
||||
assert.equal(isCommandSupportedOnDevice(cmd, iosSimulator), true, `${cmd} on iOS sim`);
|
||||
assert.equal(isCommandSupportedOnDevice(cmd, iosDevice), false, `${cmd} on iOS device`);
|
||||
assert.equal(isCommandSupportedOnDevice(cmd, androidDevice), true, `${cmd} on Android`);
|
||||
}
|
||||
});
|
||||
|
||||
test('swipe supports iOS simulator, iOS device, and Android', () => {
|
||||
assert.equal(isCommandSupportedOnDevice('swipe', iosSimulator), true, 'swipe on iOS sim');
|
||||
assert.equal(isCommandSupportedOnDevice('swipe', iosDevice), true, 'swipe on iOS device');
|
||||
assert.equal(isCommandSupportedOnDevice('swipe', androidDevice), true, 'swipe on Android');
|
||||
});
|
||||
|
||||
test('reinstall supports iOS simulator, iOS device, and Android', () => {
|
||||
assert.equal(isCommandSupportedOnDevice('reinstall', iosSimulator), true, 'reinstall on iOS sim');
|
||||
assert.equal(isCommandSupportedOnDevice('reinstall', iosDevice), true, 'reinstall on iOS device');
|
||||
|
||||
@@ -36,7 +36,7 @@ const COMMAND_CAPABILITY_MATRIX: Record<string, CommandCapability> = {
|
||||
screenshot: { ios: { simulator: true, device: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
scroll: { ios: { simulator: true, device: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
scrollintoview: { ios: { simulator: true, device: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
swipe: { ios: { simulator: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
swipe: { ios: { simulator: true, device: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
settings: { ios: { simulator: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
snapshot: { ios: { simulator: true, device: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
type: { ios: { simulator: true, device: true }, android: { emulator: true, device: true, unknown: true } },
|
||||
|
||||
Reference in New Issue
Block a user