Skip to content

Commit

Permalink
Attempt to make tutorial test more robust (#2601)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey authored Jul 29, 2024
1 parent c7db88b commit 27220ee
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,12 @@ async function runBasicTutorialTest(spyIde: SpyIDE) {
// Another sleep just in case
await sleepWithBackoff(50);

// We allow duplicate messages because they're idempotent. Not sure why some
// platforms get the init message twice but it doesn't matter.
const log = getTutorialWebviewEventLog();
const lastMessage = log[log.length - 1];
assert(
lastMessage.type === "messageSent" &&
lastMessage.data.preConditionsMet === false,
getTutorialWebviewEventLog().some(
(message) =>
message.type === "messageSent" &&
message.data.preConditionsMet === false,
),
);

// Test resuming tutorial
Expand Down

0 comments on commit 27220ee

Please sign in to comment.