Skip to content

Commit

Permalink
Change test name
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPxt committed Aug 20, 2024
1 parent eea2ad8 commit 83124ef
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions tests_zemu/tests/standard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('Standard', function () {
}
})

test.concurrent.each(models)('blind-sign', async function (m) {
test.concurrent.each(models)('sign tx normal', async function (m) {
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand All @@ -162,7 +162,7 @@ describe('Standard', function () {

// Wait until we are not in the main menu
await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot())
await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-blind-sign`)
await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_tx_normal`)

const signatureResponse = await signatureRequest
console.log(signatureResponse)
Expand All @@ -178,38 +178,4 @@ describe('Standard', function () {
await sim.close()
}
})

/*
test.concurrent.each(models)('sign tx1 normal', async function (m) {
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
const app = new KadenaApp(sim.getTransport())
const txBlob = Buffer.from(txBlobExample)
const responseAddr = await app.getAddressAndPubKey(accountId)
const pubKey = responseAddr.publicKey
// do not wait here.. we need to navigate
const signatureRequest = app.sign(accountId, txBlob)
// Wait until we are not in the main menu
await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot())
await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_asset_freeze`,50000)
const signatureResponse = await signatureRequest
console.log(signatureResponse)
expect(signatureResponse.return_code).toEqual(0x9000)
expect(signatureResponse.error_message).toEqual('No errors')
// Now verify the signature
const prehash = Buffer.concat([Buffer.from('TX'), txBlob]);
const valid = ed25519.verify(signatureResponse.signature, prehash, pubKey)
expect(valid).toEqual(true)
} finally {
await sim.close()
}
})
*/
})

1 comment on commit 83124ef

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 15 file(s) not formatted
  • app/src/items_format.c
  • app/src/parser_impl.c
  • app/src/items.c
  • app/src/parser.c
  • app/src/jsmn/jsmn.c
  • app/src/json/json_parser.c
  • app/src/items_defs.h
  • app/src/coin.h
  • app/src/items_format.h
  • app/src/items.h
  • app/src/parser_txdef.h
  • app/src/parser_impl.h
  • app/src/jsmn/jsmn.h
  • app/src/common/parser_common.h
  • app/src/json/json_parser.h

Have any feedback or feature suggestions? Share it here.

Please sign in to comment.