const { test, expect } = require('@playwright/test'); const { HVACTestBase } = require('./page-objects/HVACTestBase'); /** * Comprehensive Integration Test Suite * * Tests complete end-to-end workflows combining all UI/UX enhancement features: * - Complete event creation workflow with all components * - Template application with enhanced features * - Form validation across all enhanced fields * - TEC integration with ticketing and security * - Responsive layout behavior * - Performance and accessibility validation * - Error recovery and edge cases */ test.describe('HVAC Event Creation - Comprehensive Integration', () => { let hvacTest; test.beforeEach(async ({ page }) => { hvacTest = new HVACTestBase(page); await hvacTest.loginAsTrainer(); await hvacTest.navigateToCreateEvent(); // Wait for all components to be ready await expect(page.locator('.event-form-container')).toBeVisible(); await page.waitForLoadState('networkidle'); }); test.describe('Complete Event Creation Workflow', () => { test('should create comprehensive event with all enhanced features', async ({ page }) => { // Step 1: Basic Event Information await page.fill('#event_title', 'Advanced HVAC Systems Training'); // Step 2: Rich Text Editor Description await page.click('#event-description-editor'); await page.keyboard.type('This comprehensive training covers advanced HVAC diagnostic techniques.'); // Apply formatting await page.keyboard.press('Control+a'); await page.click('[data-command="bold"]'); // Add more content await page.keyboard.press('ArrowRight'); await page.keyboard.press('Enter'); await page.keyboard.type('Topics include:'); await page.click('[data-command="insertUnorderedList"]'); await page.keyboard.type('System commissioning'); // Verify rich content const editorContent = await page.locator('#event-description-editor').innerHTML(); expect(editorContent).toContain(''); expect(editorContent).toContain('