test(e2e): update all E2E specs for latest API and fixtures
Update 17 E2E test files including admin, auth, inquiries, listings, payments, search, subscriptions, and MCP specs. Update listings fixture and global setup to align with latest schema changes. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -2,7 +2,7 @@ import { test, expect } from '../fixtures';
|
||||
|
||||
test.describe('GET /auth/profile/agent', () => {
|
||||
test('returns agent profile or null for authenticated user', async ({ authedRequest }) => {
|
||||
const res = await authedRequest.get('/auth/profile/agent');
|
||||
const res = await authedRequest.get('auth/profile/agent');
|
||||
|
||||
expect(res.status()).toBe(200);
|
||||
const text = await res.text();
|
||||
@@ -15,13 +15,13 @@ test.describe('GET /auth/profile/agent', () => {
|
||||
});
|
||||
|
||||
test('rejects unauthenticated requests', async ({ request }) => {
|
||||
const res = await request.get('/auth/profile/agent');
|
||||
const res = await request.get('auth/profile/agent');
|
||||
|
||||
expect(res.status()).toBe(401);
|
||||
});
|
||||
|
||||
test('rejects requests with invalid token', async ({ request }) => {
|
||||
const res = await request.get('/auth/profile/agent', {
|
||||
const res = await request.get('auth/profile/agent', {
|
||||
headers: { Authorization: 'Bearer invalid.jwt.token' },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user