Skip to content

Commit

Permalink
Tests: add tests for GET_PUBLIC_KEY instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmer25 committed Oct 11, 2023
1 parent 0dfb103 commit 2a834bf
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/integration/nanos/test_get_pk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
start_speculos "$seed"
sleep 0.2
expect_full_text "ready for" "safe signing"
send_apdu 8002000011048000002c800006c18000000080000000
expect_apdu_return 2102747884d9abdf16b3ab745158925f567e222f71225501826fa83347f6cbe9c3939000
press_button right
press_button right
press_button both
expect_exited
9 changes: 9 additions & 0 deletions tests/integration/nanosp/test_get_pk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
start_speculos "$seed"
sleep 0.2
expect_full_text "Tezos Wallet" "ready for" "safe signing"
send_apdu 8002000011048000002c800006c18000000080000000
expect_apdu_return 2102747884d9abdf16b3ab745158925f567e222f71225501826fa83347f6cbe9c3939000
press_button right
press_button right
press_button both
expect_exited
9 changes: 9 additions & 0 deletions tests/integration/nanox/test_get_pk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
start_speculos "$seed"
sleep 0.2
expect_full_text "Tezos Wallet" "ready for" "safe signing"
send_apdu 8002000011048000002c800006c18000000080000000
expect_apdu_return 2102747884d9abdf16b3ab745158925f567e222f71225501826fa83347f6cbe9c3939000
press_button right
press_button right
press_button both
expect_exited
27 changes: 27 additions & 0 deletions tests/integration/stax/test_get_pk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
# Copyright 2023 Functori <[email protected]>

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from utils import *

if __name__ == "__main__":
app = stax_app()

app.assert_screen(SCREEN_HOME_DEFAULT)

app.send_apdu("8002000011048000002c800006c18000000080000000")
app.expect_apdu_return("2102747884d9abdf16b3ab745158925f567e222f71225501826fa83347f6cbe9c3939000")

app.assert_screen(SCREEN_HOME_DEFAULT)
app.welcome.quit()

0 comments on commit 2a834bf

Please sign in to comment.