mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-22 10:47:26 +02:00
✅ Add guest to user flow test (#1536)
This commit is contained in:
parent
a7b0c62040
commit
f7264a885d
6 changed files with 107 additions and 35 deletions
16
apps/web/tests/utils.ts
Normal file
16
apps/web/tests/utils.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { load } from "cheerio";
|
||||
|
||||
import { captureEmailHTML } from "./mailpit/mailpit";
|
||||
|
||||
/**
|
||||
* Get the 6-digit code from the email
|
||||
* @param email The email address to get the code for
|
||||
* @returns 6-digit code
|
||||
*/
|
||||
export const getCode = async (email: string) => {
|
||||
const html = await captureEmailHTML(email);
|
||||
|
||||
const $ = load(html);
|
||||
|
||||
return $("#code").text().trim();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue