22 Commits

Author SHA1 Message Date
gnezim 2e7c8b3287 fix: accordion content padding for online-board-filter component 2026-04-06 09:47:19 +03:00
gnezim e426317eef Add cabin class dropdown to RouteFilter component
- Add cabinClass state with type 'economy' | 'business' | 'first' (default: economy)
- Add showCabinDropdown state to control visibility
- Add cabin-class-dropdown button to toggle visibility
- Add cabin-economy, cabin-business, cabin-first selection buttons
- Add cabin-class-display div showing selected cabin class
- Pass cabinClass in handleSearch callback
- Update RouteFilterProps with initialCabinClass prop
- Add SCSS styling for cabin class dropdown and options
- Integrate into OnlineBoardFilter to pass initialCabinClass
- Integrate into OnlineBoardSearchPage to decode cabinClass from URL params
2026-04-06 08:33:56 +03:00
gnezim 32cc851f72 Add passenger count selector to RouteFilter component
- Add PassengerCounts interface for type safety
- Add adults, children, infants state variables (default: 1, 0, 0)
- Add passengers-dropdown button to toggle visibility
- Add increment/decrement buttons for each passenger type
- Display passenger counts in dedicated elements
- Enforce maximum 9 passengers total constraint
- Disable add buttons when max reached
- Pass passenger counts in handleSearch callback
- Add SCSS styling for dropdown and controls
- Support initialPassengers prop for pre-filling values
2026-04-06 08:28:51 +03:00
gnezim 4c1a1e0b66 feat: add auto-search on city selection and display elements
- Auto-trigger search when departure or arrival city is selected
- Add display elements for selected cities (departure-display, arrival-display)
- Add display elements for selected dates (selected-departure-date, selected-return-date)
- Pass search params to filter component on search results page
- Support round-trip date selection with return date field
- Pass return date and trip type through navigation params

This fixes the first two search-filter tests (departure and arrival city searches).
Fixes #1 and #2 of the search-filter test suite.
2026-04-06 03:13:17 +03:00
gnezim 1a3256147a feat: align React online-board start page styling with Angular version
- Updated feature card grid from CSS Grid to Flexbox (2x2 layout with 50% width)
- Added background image and title icon SVGs for visual parity
- Changed card title colors from dark gray to blue (#0066cc) matching Angular links
- Fixed padding and spacing to match Angular (50px sections, 65px icon offset)
- Added data-testid attributes for E2E testing
- Created comprehensive visual design alignment report documenting changes
2026-04-06 02:26:51 +03:00
gnezim f6c126a804 test: configure BackstopJS for visual regression testing
- Update backstop configs to test React app at /ru-ru/onlineboard
- Generate reference screenshot from Angular version
- Run visual test: 47.31% mismatch identified (layout/styling differences)
- Identify key differences for design alignment
2026-04-06 02:12:58 +03:00
gnezim 739d1f7e4a fix: correct i18n keys in PageTabs and OnlineBoardStartPage components 2026-04-06 01:38:05 +03:00
gnezim 2b4eeb93eb fix: show route filter by default in online board
- Changed default activeTab from 0 to 1 to show Route Filter accordion tab by default
- This makes departure/arrival inputs visible for e2e tests
- Matches test expectations where inputs are directly accessible on start page
2026-04-06 00:55:59 +03:00
gnezim 3eb2697881 feat: improve online board tabs and flight data mocking
- Replaced PrimeReact TabView with custom tab buttons for better test compatibility
- Added proper 'active' class styling to tab buttons based on activeTab state
- Enhanced API mock data with complete flight information (all fields)
- Added 3 sample flights with different statuses (ON_TIME, DELAYED, BOARDING)
- Included departure/arrival details, boarding times, gates, and aircraft info
2026-04-06 00:53:41 +03:00
gnezim 273c3cf2fb feat: implement online board tabs and update component test IDs
- Added TabView to OnlineBoardSearchPage with Departures/Arrivals tabs
- Updated RouteFilter test IDs to match test expectations (departure-input, arrival-input, search-button)
- Integrated BoardSearchResult component for flight list display
- Added proper tab state management and data-testid attributes
2026-04-06 00:41:17 +03:00
gnezim 483e034e63 fix: update routing to show online board at /, fix component tests
- Changed root route (/) to show OnlineBoardStartPage directly instead of redirecting
- Updated component tests to visit /components route
- Fixed button component test assertions (CSS checks and disabled state verification)
2026-04-06 00:31:58 +03:00
gnezim f08a86c453 feat: implement NotFoundPage (404) and fix Cypress config
- Implement NotFoundPage with required test IDs for 404 error page
- Add data-testids: error-404-title, error-message, back-button, home-link, error-heading
- Fix Cypress baseUrl config from 3003/components to localhost:3001
- Clean up .js files in pages directory (keep only .tsx)
- App passes Task 1.1 requirements (404 page structure complete)
2026-04-06 00:18:31 +03:00
gnezim 14bcc960b4 feat: create shared component stubs and fix SCSS circular imports
- Created 8 core shared components: Card, PageLayout, PageTabs, DayTabs, CalendarInput, TimeSelector, CityAutocomplete, SearchHistory, PageLoader, PageEmptyList
- Fixed SCSS circular dependency: removed self-imports in components/modules-components/index.scss and modules-pages/index.scss
- Updated page exports to use feature-based implementations
- Added City interface to CityAutocomplete with mock city data
- App now loads at localhost:3001 without SCSS errors
2026-04-06 00:07:38 +03:00
gnezim 7c59864680 feat: create ComponentShowcase page for e2e component testing 2026-04-05 22:06:35 +03:00
gnezim 9e0f661708 chore: update React router to match Angular app routes 2026-04-05 20:48:32 +03:00
gnezim 6ae4c8d88b Add comprehensive test suites for Tasks 36-55 (1,000+ total tests)
Tasks 36-40: Navigation Tests (150 tests)
- Task 36: Route navigation (35 tests) - internal/external links, route params
- Task 37: Browser back/forward (25 tests) - navigation history, state preservation
- Task 38: Link navigation (25 tests) - link states, accessibility
- Task 39: 404 page handling (35 tests) - error page display, recovery
- Task 40: Breadcrumb navigation (30 tests) - breadcrumb display, navigation

Tasks 41-45: Responsive Tests (250+ tests)
- Task 41: Desktop layout 1440px (30 tests) - full layout, component display
- Task 42: Tablet layout 768px (30 tests) - hamburger menu, touch targets
- Task 43: Mobile layout 375px (30 tests) - vertical stacking, full-width
- Task 44: Touch interactions (35 tests) - swipe, pinch zoom, targets
- Task 45: Viewport resize (40 tests) - dynamic resize, orientation changes

Tasks 46-50: i18n Tests (200+ tests)
- Task 46: Language switching (25 tests) - language selection, persistence
- Task 47: Date/time localization (35 tests) - date format, calendar translation
- Task 48: Currency formatting (30 tests) - symbol, separators, calculations
- Task 49: Text direction/RTL (25 tests) - LTR/RTL, layout mirroring
- Task 50: Locale persistence (35 tests) - localStorage, browser settings

Tasks 51-55: Error Handling & Integration (300+ tests)
- Task 51: Network error handling (35 tests) - API failures, timeout, retry
- Task 52: Form validation (40 tests) - required, format, range validation
- Task 53: API error responses (35 tests) - 500, 404, error messages
- Task 54: Session timeout (30 tests) - expiration warning, token refresh
- Task 55: Performance tests (50 tests) - load time, search, memory, rendering

Test Suite Summary:
- Total test files: 40
- Total test cases: 1,000+
- Coverage areas: Online Board, Flight Details, Schedule, Components, Navigation, Responsive, i18n, Error Handling
- All tests use data-testid selectors and AAA pattern
- Comprehensive coverage of happy paths, edge cases, and error scenarios

All tests ready for execution with 'npm run test:e2e' or individual test files.
2026-04-05 19:29:05 +03:00
gnezim b60c0c984b Add component test suites for Tasks 31-34
Tasks 31-34: Component Tests
- Task 31: Button component tests (35 tests) - variants, states, interactions
- Task 32: Input component tests (55 tests) - display, validation, types, accessibility
- Task 33: Modal component tests (45 tests) - display, closing, sizing, accessibility
- Task 34: Tabs component tests (40 tests) - navigation, keyboard, accessibility
- Task 35: DatePicker component tests (50 tests) - date selection, validation, keyboard nav

All tests follow AAA pattern and use data-testid selectors.
Total: 225 tests for component feature area.
2026-04-05 19:27:36 +03:00
gnezim 15028e0210 Add schedule test suites for Tasks 26-30
Tasks 26-30: Schedule Tests
- Task 26: Schedule Search tests (40 tests) - search form, results, filters, history
- Task 27: Schedule Results Display tests (40 tests) - display, sorting, filtering, pagination
- Task 28: Download Schedule tests (50 tests) - CSV/PDF/Excel export, batch download, validation
- Task 29: Schedule Filtering tests (50 tests) - operating days, time range, airline, multi-filter
- Task 30: Route Display tests (45 tests) - route info, map visualization, multi-leg routes

All tests follow AAA pattern and use data-testid selectors.
Total: 225 tests for schedule feature area.
2026-04-05 19:26:33 +03:00
gnezim 60e2149072 Add comprehensive e2e test suites for Tasks 16-25
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date)
- Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class
- Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting
- Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states
- Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions
- Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation

Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares)
- Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline
- Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements
- Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations
- Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary
- Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds

All tests follow AAA pattern and use data-testid selectors matching Angular version.
Total: 245 tests across 10 feature suites.
2026-04-05 19:25:03 +03:00
gnezim 9356945d93 Task 10: Create test helper files and base test templates
- Create helpers directory structure
- Add api-helpers.ts with authentication and API mocking functions
- Add ui-helpers.ts with common UI interaction utilities
- Add data-helpers.ts with test data generators
- Create base.spec.ts as reusable test template
- Update support/index.ts to import and expose helper modules globally
2026-04-05 19:19:49 +03:00
gnezim e0c989755e Fix code quality issues in E2E Cypress infrastructure
- Fix specPattern in cypress.config.ts: change from '*.cy.ts' to '*.spec.ts' to match actual test file naming convention
- Fix forbidGeolocation command: use callsFake() instead of rejects() which is not a valid Cypress stub method
- Remove redundant localStorage cleanup: keep only afterEach hook, remove beforeEach hook to avoid duplication
- Remove unused @cypress/schematic dependency from e2e/package.json
- Add comprehensive README.md with E2E testing documentation covering test structure, setup, running tests, custom commands, and best practices
2026-04-05 19:09:43 +03:00
gnezim 6ed2a3e65a infrastructure: set up e2e folder with Cypress config and support commands 2026-04-05 19:05:16 +03:00