import { test, expect } from '@playwright/test'; import { DP2FormPage } from './utils/page-objects'; test.describe('Test Select Fix', () => { let formPage: DP2FormPage; test.beforeEach(async ({ page }) => { formPage = new DP2FormPage(page); await formPage.goto(); }); test('should select theft correctly', async ({ page }) => { // Fill basic info await formPage.fillPlayerInfo('TestPlayer', 0); // Select item category await formPage.selectCrimeCategory('item'); // Select theft await formPage.selectSpecificOffense('theft'); // Check if offense details section appears await expect(formPage.offenseDetailsSection).toBeVisible(); // Take screenshot await page.screenshot({ path: 'debug-screenshots/theft-selected-fixed.png', fullPage: true }); console.log('Theft selection successful!'); }); test('should select grief correctly', async ({ page }) => { // Fill basic info await formPage.fillPlayerInfo('TestPlayer2', 0); // Select block category await formPage.selectCrimeCategory('block'); // Select grief await formPage.selectSpecificOffense('grief'); // Check if block count input appears await expect(formPage.blockCountInput).toBeVisible(); // Take screenshot await page.screenshot({ path: 'debug-screenshots/grief-selected-fixed.png', fullPage: true }); console.log('Grief selection successful!'); }); });