mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-08-28 19:48:01 +08:00
fix: align mail state e2e with public routes
This commit is contained in:
@@ -72,7 +72,7 @@ test.describe('Mail Read Status', () => {
|
||||
flag: 0,
|
||||
}]);
|
||||
|
||||
const detailRes = await request.get(`${WORKER_URL}/api/mails/${results[0].id}`, {
|
||||
const detailRes = await request.get(`${WORKER_URL}/api/mail/${results[0].id}`, {
|
||||
headers: addressHeaders(first.jwt),
|
||||
});
|
||||
expect(detailRes.ok()).toBe(true);
|
||||
@@ -265,10 +265,10 @@ test.describe('Mail Read Status', () => {
|
||||
userId = payload.user_id;
|
||||
|
||||
addresses.push(
|
||||
await createTestAddress(request, 'mail-flags-user-a'),
|
||||
await createTestAddress(request, 'mail-flags-user-b'),
|
||||
await createTestAddress(request, 'mf-user-a'),
|
||||
await createTestAddress(request, 'mf-user-b'),
|
||||
);
|
||||
outsider = await createTestAddress(request, 'mail-flags-user-outsider');
|
||||
outsider = await createTestAddress(request, 'mf-outsider');
|
||||
|
||||
for (const mailbox of addresses) {
|
||||
const bindRes = await request.post(`${WORKER_URL}/user_api/bind_address`, {
|
||||
|
||||
@@ -77,7 +77,9 @@ test.describe('Mail state browser flow', () => {
|
||||
await stateSelect.click();
|
||||
await page.locator('.n-base-select-option').filter({ hasText: /^Unread$/ }).click();
|
||||
expect((await unreadFilterResponse).ok()).toBe(true);
|
||||
await expect(page.getByText('Your inbox is empty')).toBeVisible();
|
||||
for (const subject of subjects) {
|
||||
await expect(page.getByText(subject, { exact: true })).toHaveCount(0);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
if (jwt) await deleteAddress(request, jwt);
|
||||
|
||||
Reference in New Issue
Block a user