Files
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

2 lines
3.7 KiB
JavaScript

import e from"react";import{PrimeReactContext as t}from"primereact/api";import{useStyle as r,useMountEffect as n}from"primereact/hooks";import{ObjectUtils as o,DomHandler as c}from"primereact/utils";import{ComponentBase as u}from"primereact/componentbase";function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function i(e){var t=s(e,"string");return"symbol"==a(t)?t:t+""}function l(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=u.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return o.getMergedProps(e,f.defaultProps)},getOtherProps:function(e){return o.getDiffProps(e,f.defaultProps)}});function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m=e.memo(e.forwardRef((function(o,u){var a=e.useRef(null),s=e.useRef(null),i=e.useRef(null),l=e.useContext(t),p=f.getProps(o,l),m={props:p};r(f.css.styles,{name:"focustrap"});f.setMetaData(d({},m));e.useImperativeHandle(u,(function(){return{props:p,getInk:function(){return s.current},getTarget:function(){return a.current}}})),n((function(){p.disabled||(a.current=P(),O(a.current))}));var b,y,g,v,h,P=function(){return s.current&&s.current.parentElement},O=function(e){var t=p||{},r=t.autoFocusSelector,n=t.firstFocusableSelector,o=void 0===n?"":n,u=t.autoFocus,a=void 0!==u&&u,s="".concat(_(void 0===r?"":r)),i="[autofocus]".concat(s,", [data-pc-autofocus='true']").concat(s),l=c.getFirstFocusableElement(e,i);a&&!l&&(l=c.getFirstFocusableElement(e,_(o))),c.focus(l)},_=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},j=function(e){var t,r=e.currentTarget,n=e.relatedTarget,o=n!==r.$_pfocustrap_firsthiddenfocusableelement&&null!==(t=a.current)&&void 0!==t&&t.contains(n)?r.$_pfocustrap_firsthiddenfocusableelement:c.getLastFocusableElement(r.parentElement,_(r.$_pfocustrap_focusableselector));c.focus(o)};return y=void 0===(b=(p||{}).tabIndex)?0:b,v=(g=function(t,r,n){return e.createElement("span",{ref:t,className:"p-hidden-accessible p-hidden-focusable",tabIndex:y,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:r,"data-pc-section":n})})(s,(function(e){var t,r=e.currentTarget,n=e.relatedTarget,o=n!==r.$_pfocustrap_lasthiddenfocusableelement&&null!==(t=a.current)&&void 0!==t&&t.contains(n)?r.$_pfocustrap_lasthiddenfocusableelement:c.getFirstFocusableElement(r.parentElement,_(r.$_pfocustrap_focusableselector));c.focus(o)}),"firstfocusableelement"),h=g(i,j,"lastfocusableelement"),s.current&&i.current&&(s.current.$_pfocustrap_lasthiddenfocusableelement=i.current,i.current.$_pfocustrap_firsthiddenfocusableelement=s.current),e.createElement(e.Fragment,null,v,p.children,h)})));export{m as FocusTrap,m as default};