Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Jul 22, 2024
1 parent 281079d commit e3e819a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests_zemu/tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe("hash signing", () => {
await sim.waitForScreenChanges(events);
// accept risk
await acceptRisk(sim, dev.name, testCaseName);
await sim.waitForScreenChanges(events);
await sim.deleteEvents();

const textToFind = dev.name.startsWith("nano") ? "Sign Hash" : "Hold to";
await sim.navigateAndCompareUntilText(".", testCaseName, textToFind, true);
Expand Down Expand Up @@ -150,8 +150,7 @@ describe("hash signing", () => {

// accept risk
await acceptRisk(sim, dev.name, testCaseName);
await sim.waitForScreenChanges(events);

await sim.deleteEvents();
const textToFind = dev.name.startsWith("nano") ? "Reject" : "Hold to";
await sim.navigateAndCompareUntilText(".", testCaseName, textToFind, true);
if (dev.name == "stax" || dev.name == "flex") {
Expand Down Expand Up @@ -221,14 +220,14 @@ describe("transactions", () => {
// accept risk
if (testsNeedEnableCustomContracts.includes(c.caseName)) {
await acceptRisk(sim, dev.name, testCaseName);
await sim.deleteEvents();
}
await sim.waitForScreenChanges(events);

// TODO: If set to Sign, it will not pass the test. Is this a bug in Zemu?
const textToFind = dev.name.startsWith("nano") ? /\bSign\b/ : /\bHold to\b/;
await sim.navigateAndCompareUntilText(
".",
testCaseName,
"demo",
textToFind,
true,
undefined,
Expand Down Expand Up @@ -430,7 +429,7 @@ describe("soroban auth", () => {
await sim.waitForScreenChanges(events);
if (testsNeedEnableCustomContracts.includes(c.caseName)) {
await acceptRisk(sim, dev.name, testCaseName);
await sim.waitForScreenChanges(events);
await sim.deleteEvents();
}
const textToFind = dev.name.startsWith("nano") ? /\bSign\b/ : /\bHold to\b/;
await sim.navigateAndCompareUntilText(
Expand Down Expand Up @@ -468,7 +467,7 @@ describe("soroban auth", () => {
await sim.waitForScreenChanges(events);

await acceptRisk(sim, dev.name, testCaseName);
await sim.waitForScreenChanges(events);
await sim.deleteEvents();
const textToFind = dev.name.startsWith("nano") ? "Reject" : "Sign Soroban Auth?";
await sim.navigateAndCompareUntilText(
".",
Expand Down

0 comments on commit e3e819a

Please sign in to comment.