chore: save WIP before workstation switch

This commit is contained in:
2026-05-18 17:33:31 -07:00
parent 98b18de00a
commit 2c5666e419
30 changed files with 765 additions and 395 deletions
+12 -11
View File
@@ -18,6 +18,7 @@
import { test, expect } from '@playwright/test';
import { prisma } from '@/lib/prisma';
const BASE_URL = process.env.CI ? 'https://euchre-ci.notsosm.art' : 'http://localhost:3000';
function getTestCredentials() {
const timestamp = Date.now();
@@ -41,11 +42,11 @@ test.describe.serial('Tournament with 10 Participants and Variable Team Durabili
const timestamp = Date.now();
// Create admin user via API
const response = await fetch('http://localhost:3000/api/auth/sign-up/email', {
const response = await fetch(`${BASE_URL}/api/auth/sign-up/email`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Origin: 'http://localhost:3000',
Origin: BASE_URL,
},
body: JSON.stringify({
email: testEmail,
@@ -102,14 +103,14 @@ test.describe.serial('Tournament with 10 Participants and Variable Team Durabili
test('Tournament creation form shows variable team durability options', async ({ page }) => {
// Login
await page.goto('http://localhost:3000/auth/login');
await page.goto('/auth/login');
await page.fill('input[name="email"]', testEmail);
await page.fill('input[name="password"]', testPassword);
await page.click('button[type="submit"]');
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
// Navigate to tournament creation
await page.goto('http://localhost:3000/admin/tournaments/new');
await page.goto('/admin/tournaments/new');
// Select Round Robin format
await page.selectOption('select[name="format"]', 'round_robin');
@@ -132,14 +133,14 @@ test.describe.serial('Tournament with 10 Participants and Variable Team Durabili
test('Create tournament with 10 participants, variable teams, and minimize_repeat', async ({ page }) => {
// Login
await page.goto('http://localhost:3000/auth/login');
await page.goto('/auth/login');
await page.fill('input[name="email"]', testEmail);
await page.fill('input[name="password"]', testPassword);
await page.click('button[type="submit"]');
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
// Navigate to tournament creation
await page.goto('http://localhost:3000/admin/tournaments/new');
await page.goto('/admin/tournaments/new');
// Fill in tournament details
const tournamentName = `9 Participant Variable Tournament ${Date.now()}`;
@@ -238,7 +239,7 @@ test.describe.serial('Tournament with 10 Participants and Variable Team Durabili
test('Schedule generation for 10 participants creates correct number of matchups', async ({ page }) => {
// Navigate to Matchups tab (formerly Teams tab)
// The test is already authenticated via the chromium-admin project
await page.goto(`http://localhost:3000/admin/tournaments/${tournamentId}`);
await page.goto(`/admin/tournaments/${tournamentId}`);
// Wait for page to load and data to be fetched
await page.waitForLoadState('domcontentloaded');
@@ -280,14 +281,14 @@ test.describe.serial('Tournament with 10 Participants and Variable Team Durabili
test('Schedule displays correct matchups for 10 participants', async ({ page }) => {
// Login
await page.goto('http://localhost:3000/auth/login');
await page.goto('/auth/login');
await page.fill('input[name="email"]', testEmail);
await page.fill('input[name="password"]', testPassword);
await page.click('button[type="submit"]');
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
// Navigate to Schedule tab
await page.goto(`http://localhost:3000/admin/tournaments/${tournamentId}/schedule`);
await page.goto(`/admin/tournaments/${tournamentId}/schedule`);
// Verify rounds are displayed
await expect(page.locator('text=Round 1')).toBeVisible();
@@ -304,14 +305,14 @@ test.describe.serial('Tournament with 10 Participants and Variable Team Durabili
test('Matchup generation with minimize_repeat creates varied partnerships', async ({ page }) => {
// Login
await page.goto('http://localhost:3000/auth/login');
await page.goto('/auth/login');
await page.fill('input[name="email"]', testEmail);
await page.fill('input[name="password"]', testPassword);
await page.click('button[type="submit"]');
await page.waitForURL(/\/(admin|players)/, { timeout: 10000 });
// Navigate to Schedule tab
await page.goto(`http://localhost:3000/admin/tournaments/${tournamentId}/schedule`);
await page.goto(`/admin/tournaments/${tournamentId}/schedule`);
// Get all matchups from the database to verify partnership variety
const matchups = await prisma.bracketMatchup.findMany({