diff --git a/tests_zemu/snapshots/fl-get-fvk/00003.png b/tests_zemu/snapshots/fl-get-fvk/00003.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-get-fvk/00003.png differ diff --git a/tests_zemu/snapshots/fl-get-ivk/00003.png b/tests_zemu/snapshots/fl-get-ivk/00003.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-get-ivk/00003.png differ diff --git a/tests_zemu/snapshots/fl-get-ovk/00003.png b/tests_zemu/snapshots/fl-get-ovk/00003.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-get-ovk/00003.png differ diff --git a/tests_zemu/snapshots/fl-show_address_shielded/00002.png b/tests_zemu/snapshots/fl-show_address_shielded/00002.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-show_address_shielded/00002.png differ diff --git a/tests_zemu/snapshots/fl-show_address_shielded_with_div/00002.png b/tests_zemu/snapshots/fl-show_address_shielded_with_div/00002.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-show_address_shielded_with_div/00002.png differ diff --git a/tests_zemu/snapshots/fl-show_address_unshielded/00002.png b/tests_zemu/snapshots/fl-show_address_unshielded/00002.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-show_address_unshielded/00002.png differ diff --git a/tests_zemu/snapshots/fl-show_nullifier-0x1/00003.png b/tests_zemu/snapshots/fl-show_nullifier-0x1/00003.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-show_nullifier-0x1/00003.png differ diff --git a/tests_zemu/snapshots/fl-show_nullifier-0xFF/00003.png b/tests_zemu/snapshots/fl-show_nullifier-0xFF/00003.png new file mode 100644 index 00000000..1b062f5f Binary files /dev/null and b/tests_zemu/snapshots/fl-show_nullifier-0xFF/00003.png differ diff --git a/tests_zemu/snapshots/st-get-fvk/00003.png b/tests_zemu/snapshots/st-get-fvk/00003.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-get-fvk/00003.png differ diff --git a/tests_zemu/snapshots/st-get-ivk/00003.png b/tests_zemu/snapshots/st-get-ivk/00003.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-get-ivk/00003.png differ diff --git a/tests_zemu/snapshots/st-get-ovk/00003.png b/tests_zemu/snapshots/st-get-ovk/00003.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-get-ovk/00003.png differ diff --git a/tests_zemu/snapshots/st-show_address_shielded/00002.png b/tests_zemu/snapshots/st-show_address_shielded/00002.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-show_address_shielded/00002.png differ diff --git a/tests_zemu/snapshots/st-show_address_shielded_with_div/00002.png b/tests_zemu/snapshots/st-show_address_shielded_with_div/00002.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-show_address_shielded_with_div/00002.png differ diff --git a/tests_zemu/snapshots/st-show_address_unshielded/00002.png b/tests_zemu/snapshots/st-show_address_unshielded/00002.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-show_address_unshielded/00002.png differ diff --git a/tests_zemu/snapshots/st-show_nullifier-0x1/00003.png b/tests_zemu/snapshots/st-show_nullifier-0x1/00003.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-show_nullifier-0x1/00003.png differ diff --git a/tests_zemu/snapshots/st-show_nullifier-0xFF/00003.png b/tests_zemu/snapshots/st-show_nullifier-0xFF/00003.png new file mode 100644 index 00000000..dc1e5da1 Binary files /dev/null and b/tests_zemu/snapshots/st-show_nullifier-0xFF/00003.png differ diff --git a/tests_zemu/tests/addresses.test.ts b/tests_zemu/tests/addresses.test.ts index 432da429..f98ff93f 100644 --- a/tests_zemu/tests/addresses.test.ts +++ b/tests_zemu/tests/addresses.test.ts @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************* */ -import Zemu, { ButtonKind } from '@zondax/zemu' +import Zemu, {ButtonKind, isTouchDevice} from '@zondax/zemu' import { defaultOptions as commonOpts, models } from './_config' import ZCashApp from '@zondax/ledger-zcash' @@ -46,7 +46,12 @@ describe('Addresses', function () { test.concurrent.each(models)('show_unshielded_address', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Confirm' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const expectedAddrRaw = '026f27818e7426a10773226b3553d0afe50a3697bd02652f1b57d67bf648577d11' @@ -67,7 +72,12 @@ describe('Addresses', function () { test.concurrent.each(models)('get_shielded_address', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Confirm' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 1000 + 0x80000000 @@ -99,7 +109,12 @@ describe('Addresses', function () { test.concurrent.each(models)('show shielded address', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Confirm' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 1000 + 0x80000000 @@ -123,7 +138,12 @@ describe('Addresses', function () { test.concurrent.each(models)('show_shielded_address_with_div', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Confirm' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 1000 + 0x80000000 diff --git a/tests_zemu/tests/keys.test.ts b/tests_zemu/tests/keys.test.ts index e1e719c9..0d5ea3e2 100644 --- a/tests_zemu/tests/keys.test.ts +++ b/tests_zemu/tests/keys.test.ts @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************* */ -import Zemu, { ButtonKind, DEFAULT_START_OPTIONS } from '@zondax/zemu' +import Zemu, { ButtonKind, DEFAULT_START_OPTIONS, isTouchDevice } from '@zondax/zemu' import ZCashApp from '@zondax/ledger-zcash' import { APP_SEED, defaultOptions as commonOpts, models } from './_config' @@ -28,7 +28,12 @@ describe('Nullifier', function () { test.concurrent.each(models)('get nullifier account 0x01', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 0x01 + 0x80000000 @@ -53,7 +58,12 @@ describe('Nullifier', function () { test.concurrent.each(models)('get_nullifier_account_0xFF', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const path = 0xff + 0x80000000 @@ -80,7 +90,12 @@ describe('Get_keys', function () { test.concurrent.each(models)('get ivk', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 1000 + 0x80000000 @@ -108,7 +123,12 @@ describe('Get_keys', function () { test.concurrent.each(models)('get ovk', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 1000 + 0x80000000 @@ -131,7 +151,12 @@ describe('Get_keys', function () { test.concurrent.each(models)('Get fvk', async function (m) { const sim = new Zemu(m.path) try { - await sim.start(defaultOptions(m, true)) + await sim.start({ + ...defaultOptions(m, true), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton + }) + const app = new ZCashApp(sim.getTransport()) const zip32Account = 1000 + 0x80000000