diff --git a/backend/src/__tests__/events.test.js b/backend/src/__tests__/events.test.js index 3ae9b28..59e243d 100644 --- a/backend/src/__tests__/events.test.js +++ b/backend/src/__tests__/events.test.js @@ -13,9 +13,9 @@ let checkinToken; // Setup test data beforeAll(async () => { // Clean up only specific test data (not all tables) - const testUsernames = ['john_dancer', 'sarah_swings', 'mike_blues']; - const testEmails = ['john@example.com', 'sarah@example.com', 'mike@example.com']; - const testEventSlugs = ['test-dance-festival-2025', 'test-another-event-2025']; + const testUsernames = ['events_john_dancer', 'events_sarah_swings', 'events_mike_blues']; + const testEmails = ['events_john@example.com', 'events_sarah@example.com', 'events_mike@example.com']; + const testEventSlugs = ['events-test-dance-festival-2025', 'events-test-another-event-2025']; // Find test users const testUsers = await prisma.user.findMany({ @@ -71,8 +71,8 @@ beforeAll(async () => { // Create test users testUser1 = await prisma.user.create({ data: { - username: 'john_dancer', - email: 'john@example.com', + username: 'events_john_dancer', + email: 'events_john@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'John', @@ -82,8 +82,8 @@ beforeAll(async () => { testUser2 = await prisma.user.create({ data: { - username: 'sarah_swings', - email: 'sarah@example.com', + username: 'events_sarah_swings', + email: 'events_sarah@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'Sarah', @@ -93,8 +93,8 @@ beforeAll(async () => { testUser3 = await prisma.user.create({ data: { - username: 'mike_blues', - email: 'mike@example.com', + username: 'events_mike_blues', + email: 'events_mike@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'Mike', @@ -135,24 +135,24 @@ beforeAll(async () => { testEvent = await prisma.event.create({ data: { name: 'Test Dance Festival 2025', - slug: 'test-dance-festival-2025', + slug: 'events-test-dance-festival-2025', location: 'Test City', startDate: new Date('2025-06-01'), endDate: new Date('2025-06-03'), description: 'Test event description', - worldsdcId: 'test-2025', + worldsdcId: 'events-test-2025', }, }); testEvent2 = await prisma.event.create({ data: { name: 'Another Dance Event', - slug: 'another-dance-event', + slug: 'events-test-another-event-2025', location: 'Another City', startDate: new Date('2025-07-15'), endDate: new Date('2025-07-17'), description: 'Another test event', - worldsdcId: 'another-2025', + worldsdcId: 'events-another-2025', }, }); @@ -183,9 +183,9 @@ beforeAll(async () => { afterAll(async () => { // Clean up - only delete test data, not all data - const testUsernames = ['john_dancer', 'sarah_swings', 'mike_blues']; - const testEmails = ['john@example.com', 'sarah@example.com', 'mike@example.com']; - const testEventSlugs = ['test-dance-festival-2025', 'test-another-event-2025']; + const testUsernames = ['events_john_dancer', 'events_sarah_swings', 'events_mike_blues']; + const testEmails = ['events_john@example.com', 'events_sarah@example.com', 'events_mike@example.com']; + const testEventSlugs = ['events-test-dance-festival-2025', 'events-test-another-event-2025']; // Find test events const testEvents = await prisma.event.findMany({ diff --git a/backend/src/__tests__/matches.test.js b/backend/src/__tests__/matches.test.js index 6e7668c..896014e 100644 --- a/backend/src/__tests__/matches.test.js +++ b/backend/src/__tests__/matches.test.js @@ -10,9 +10,9 @@ let testMatch; // Setup test data beforeAll(async () => { // Clean up only specific test data (not all tables) - const testUsernames = ['john_dancer', 'sarah_swings', 'mike_moves']; - const testEmails = ['john@example.com', 'sarah@example.com', 'mike@example.com']; - const testEventSlugs = ['test-dance-festival']; + const testUsernames = ['matches_john_dancer', 'matches_sarah_swings', 'matches_mike_moves']; + const testEmails = ['matches_john@example.com', 'matches_sarah@example.com', 'matches_mike@example.com']; + const testEventSlugs = ['matches-test-dance-festival']; // Find test users const testUsers = await prisma.user.findMany({ @@ -66,8 +66,8 @@ beforeAll(async () => { // Create test users testUser1 = await prisma.user.create({ data: { - username: 'john_dancer', - email: 'john@example.com', + username: 'matches_john_dancer', + email: 'matches_john@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'John', @@ -77,8 +77,8 @@ beforeAll(async () => { testUser2 = await prisma.user.create({ data: { - username: 'sarah_swings', - email: 'sarah@example.com', + username: 'matches_sarah_swings', + email: 'matches_sarah@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'Sarah', @@ -88,8 +88,8 @@ beforeAll(async () => { testUser3 = await prisma.user.create({ data: { - username: 'mike_moves', - email: 'mike@example.com', + username: 'matches_mike_moves', + email: 'matches_mike@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'Mike', @@ -106,7 +106,7 @@ beforeAll(async () => { testEvent = await prisma.event.create({ data: { name: 'Test Dance Festival', - slug: 'test-dance-festival', + slug: 'matches-test-dance-festival', location: 'Test City', startDate: new Date('2025-06-01'), endDate: new Date('2025-06-03'), @@ -127,9 +127,9 @@ beforeAll(async () => { afterAll(async () => { // Clean up - only delete test data, not all data - const testUsernames = ['john_dancer', 'sarah_swings', 'mike_moves', 'outsider']; - const testEmails = ['john@example.com', 'sarah@example.com', 'mike@example.com', 'outsider@example.com']; - const testEventSlugs = ['test-dance-festival']; + const testUsernames = ['matches_john_dancer', 'matches_sarah_swings', 'matches_mike_moves', 'matches_outsider']; + const testEmails = ['matches_john@example.com', 'matches_sarah@example.com', 'matches_mike@example.com', 'matches_outsider@example.com']; + const testEventSlugs = ['matches-test-dance-festival']; // Find test users const testUsers = await prisma.user.findMany({ diff --git a/backend/src/__tests__/users.test.js b/backend/src/__tests__/users.test.js index 6cd48fb..a4b7720 100644 --- a/backend/src/__tests__/users.test.js +++ b/backend/src/__tests__/users.test.js @@ -10,8 +10,8 @@ let testToken1, testToken2; // Setup test data beforeAll(async () => { // Clean up only specific test data (not all tables) - const testUsernames = ['john_dancer', 'sarah_swings']; - const testEmails = ['john@example.com', 'sarah@example.com']; + const testUsernames = ['users_john_dancer', 'users_sarah_swings']; + const testEmails = ['users_john@example.com', 'users_sarah@example.com']; // Find test users const testUsers = await prisma.user.findMany({ @@ -53,8 +53,8 @@ beforeAll(async () => { // Create test users testUser1 = await prisma.user.create({ data: { - username: 'john_dancer', - email: 'john@example.com', + username: 'users_john_dancer', + email: 'users_john@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'John', @@ -69,8 +69,8 @@ beforeAll(async () => { testUser2 = await prisma.user.create({ data: { - username: 'sarah_swings', - email: 'sarah@example.com', + username: 'users_sarah_swings', + email: 'users_sarah@example.com', passwordHash: await hashPassword('password123'), emailVerified: true, firstName: 'Sarah', @@ -85,8 +85,8 @@ beforeAll(async () => { afterAll(async () => { // Clean up only specific test data - const testUsernames = ['john_dancer', 'sarah_swings']; - const testEmails = ['john@example.com', 'sarah@example.com']; + const testUsernames = ['users_john_dancer', 'users_sarah_swings']; + const testEmails = ['users_john@example.com', 'users_sarah@example.com']; const testUsers = await prisma.user.findMany({ where: {