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.
This commit is contained in:
gnezim
2026-04-06 03:13:17 +03:00
parent 1a3256147a
commit 4c1a1e0b66
35 changed files with 277 additions and 25 deletions
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 KiB

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 KiB

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 KiB

After

Width:  |  Height:  |  Size: 211 KiB

+44
View File
@@ -0,0 +1,44 @@
DevTools listening on ws://127.0.0.1:50234/devtools/browser/07717738-d524-4147-9900-ce7f220b5268
Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
Opening `/dev/tty` failed (6): Device not configured
================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 13.17.0 │
│ Browser: Chrome 146 (headless) │
│ Node Version: v22.22.2 (/opt/homebrew/Cellar/node@22/22.22.2/bin/node) │
│ Specs: 1 found (search-filter.cy.ts) │
│ Searched: cypress/integration/online-board/search-filter.cy.ts │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: search-filter.cy.ts (1 of 1)
Online Board - Search & Filter
Happy Path - Search Functionality
1) should search flights by departure city
2) should search flights by arrival city
3) should search flights with round trip dates
4) should perform search with all filters applied
✓ should clear search filters (747ms)
Filter - Departure Cities
5) should filter by single departure city
6) should validate departure city input
7) should show autocomplete suggestions for departure
8) should select departure from autocomplete
Filter - Arrival Cities
9) should filter by single arrival city
10) should show different suggestions for arrival vs departure
11) should validate arrival city not same as departure
Filter - Passenger Count
12) should select single adult passenger
13) should add multiple adult passengers
14) should add children passengers
15) should add infant passengers