feat/bun-transition #21
@@ -79,7 +79,7 @@ test.describe('CSV Upload Player Deduplication', () => {
|
|||||||
formData.append('eventId', testTournamentId.toString());
|
formData.append('eventId', testTournamentId.toString());
|
||||||
|
|
||||||
const response = await request.post('http://localhost:3000/api/matches/upload', {
|
const response = await request.post('http://localhost:3000/api/matches/upload', {
|
||||||
data: formData,
|
multipart: formData,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(response.ok()).toBeTruthy();
|
expect(response.ok()).toBeTruthy();
|
||||||
@@ -133,7 +133,7 @@ test.describe('CSV Upload Player Deduplication', () => {
|
|||||||
formData.append('eventId', testTournamentId.toString());
|
formData.append('eventId', testTournamentId.toString());
|
||||||
|
|
||||||
const response = await request.post('http://localhost:3000/api/matches/upload', {
|
const response = await request.post('http://localhost:3000/api/matches/upload', {
|
||||||
data: formData,
|
multipart: formData,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(response.ok()).toBeTruthy();
|
expect(response.ok()).toBeTruthy();
|
||||||
@@ -190,7 +190,7 @@ test.describe('CSV Upload Player Deduplication', () => {
|
|||||||
formData.append('eventId', testTournamentId.toString());
|
formData.append('eventId', testTournamentId.toString());
|
||||||
|
|
||||||
const response = await request.post('http://localhost:3000/api/matches/upload', {
|
const response = await request.post('http://localhost:3000/api/matches/upload', {
|
||||||
data: formData,
|
multipart: formData,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(response.ok()).toBeTruthy();
|
expect(response.ok()).toBeTruthy();
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ test.describe('Tournament Edit - allowTies functionality', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should display allowTies checkbox on edit form', async ({ page }) => {
|
test('should display allowTies checkbox on edit form @chromium-admin', async ({ page }) => {
|
||||||
// Navigate to tournament edit page
|
// Navigate to tournament edit page
|
||||||
await page.goto(`/admin/tournaments/${tournamentId}/edit`);
|
await page.goto(`/admin/tournaments/${tournamentId}/edit`);
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ test.describe('Tournament Edit - allowTies functionality', () => {
|
|||||||
await expect(allowTiesCheckbox).not.toBeChecked();
|
await expect(allowTiesCheckbox).not.toBeChecked();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should save allowTies when toggled to true', async ({ page }) => {
|
test('should save allowTies when toggled to true @chromium-admin', async ({ page }) => {
|
||||||
// Navigate to tournament edit page
|
// Navigate to tournament edit page
|
||||||
await page.goto(`/admin/tournaments/${tournamentId}/edit`);
|
await page.goto(`/admin/tournaments/${tournamentId}/edit`);
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ test.describe('Tournament Edit - allowTies functionality', () => {
|
|||||||
expect(updatedTournament?.allowTies).toBe(true);
|
expect(updatedTournament?.allowTies).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should save allowTies when toggled to false', async ({ page }) => {
|
test('should save allowTies when toggled to false @chromium-admin', async ({ page }) => {
|
||||||
// First, set allowTies to true
|
// First, set allowTies to true
|
||||||
await prisma.event.update({
|
await prisma.event.update({
|
||||||
where: { id: tournamentId },
|
where: { id: tournamentId },
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export const auth = betterAuth({
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
autoSignIn: true, // Automatically sign in after registration
|
autoSignIn: true, // Automatically sign in after registration
|
||||||
requireEmailVerification: false, // Don't require email verification for tests
|
requireEmailVerification: false, // Don't require email verification for tests
|
||||||
|
minPasswordLength: 8, // Set minimum password length
|
||||||
|
maxPasswordLength: 128, // Set maximum password length
|
||||||
},
|
},
|
||||||
secret: process.env.BETTER_AUTH_SECRET || process.env.NEXTAUTH_SECRET,
|
secret: process.env.BETTER_AUTH_SECRET || process.env.NEXTAUTH_SECRET,
|
||||||
baseURL: process.env.BETTER_AUTH_URL || process.env.NEXTAUTH_URL || "http://localhost:3000",
|
baseURL: process.env.BETTER_AUTH_URL || process.env.NEXTAUTH_URL || "http://localhost:3000",
|
||||||
|
|||||||
Reference in New Issue
Block a user