ConceptPortal-public/rsconcept/frontend/tests/mocks/auth.ts

10 lines
268 B
TypeScript
Raw Normal View History

2025-02-22 14:04:01 +03:00
import { type Page } from '@playwright/test';
2025-01-27 16:12:41 +03:00
import { BACKEND_URL } from '../constants';
export async function authAnonymous(page: Page) {
await page.route(`${BACKEND_URL}/users/api/auth`, async route => {
await route.fulfill({ json: { id: null } });
});
}