sipher/tests/auth.test.ts
Nixyan 7049a40870 feat: enhance federation functionality by reworking the workers.
- Introduced single Redis connection for managing federation delivery jobs, improving reliability and performance.
- Updated environment configuration to include Redis connection details and allowed hostnames for CORS.
- Refactored existing code to streamline federation processes and improve error handling.
- Enhanced database schema to track acknowledgment status for follow requests.

This update aims to strengthen the federation's communication capabilities and ensure better handling of server interactions.

#3 #4
2026-04-08 10:35:59 -03:00

43 lines
No EOL
1.2 KiB
TypeScript

// NOTICE: Does not work, will fix it later
// test("create and login user", async ({ context, page }) => {
// const ctx = await auth.$context
// const testUtils = ctx.test
// // Go to home page
// await page.goto("/")
// // Check if we are redirected to the auth page
// await expect(page).toHaveURL("/auth")
// // Create and save user
// const user = testUtils.createUser({
// email: "e2e@example.com",
// name: "E2E User"
// })
// await testUtils.saveUser(user)
// // Get cookies and inject into browser
// const cookies = await testUtils.getCookies({
// userId: user.id,
// domain: "localhost"
// })
// await context.addCookies(cookies)
// // Login
// await testUtils.login({ userId: user.id })
// // Check if we got redirected to the home page
// await expect(page).toHaveURL("/")
// // Check if we are logged in
// const headers = await testUtils.getAuthHeaders({ userId: user.id })
// expect(headers).toBeDefined()
// expect(headers.get("Authorization")).toBeDefined()
// // Delete user
// await testUtils.deleteUser(user.id)
// // Check if user is deleted
// const deletedUser = await ctx.internalAdapter.findUserById(user.id)
// expect(deletedUser).toBeNull()
// })