Skip to content

Commit

Permalink
closed context
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayaktorus committed May 8, 2024
1 parent 888e9f3 commit 5ceefb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openloginV4/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,11 @@ async function signInWithEmailWithTestEmailOnDemoApp(
await page.waitForSelector("text=Verify your email");
await delay(5000);
let inbox;
console.log(1);
// Setup our JSON API endpoint
const ENDPOINT = `https://api.testmail.app/api/json?apikey=${testEmailAppApiKey}&namespace=kelg8`;
const res = await axios.get(`${ENDPOINT}&tag=${tag}&livequery=true`);
console.log(2);
inbox = await res.data;
console.log(inbox);
const href = inbox.emails[0].html.match(/href="([^"]*)/)[1];
Expand All @@ -707,6 +709,7 @@ async function signInWithEmailWithTestEmailOnDemoApp(
}
);
await page2.close();
await context2.close();
return true;
} catch (err) {
console.error(err);
Expand Down

0 comments on commit 5ceefb6

Please sign in to comment.