refactor: move mailer test (#4328)

This commit is contained in:
Alex Yang authored and GitHub committed 2023-09-13 05:11:19 +00:00
1 parent bdc2695caf
commit 74faee887e
8 files changed
+29 -42

No files matched your search

+12
View File
@@ -12,6 +12,18 @@ import { hash } from '@node-rs/argon2';
import type { BrowserContext, Cookie, Page } from '@playwright/test';
import { z } from 'zod';
export async function getCurrentMailMessageCount() {
const response = await fetch('http://localhost:8025/api/v2/messages');
const data = await response.json();
return data.total;
}
export async function getLatestMailMessage() {
const response = await fetch('http://localhost:8025/api/v2/messages');
const data = await response.json();
return data.items[0];
}
export async function getLoginCookie(
context: BrowserContext
): Promise<Cookie | undefined> {