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
5.1 KiB
JavaScript

import*as r from"react";import e,{PrimeReactContext as t}from"primereact/api";import{useMergeProps as n,useStyle as o,useMountEffect as i,useUpdateEffect as u,useUnmountEffect as c}from"primereact/hooks";import{ObjectUtils as a,classNames as l,DomHandler as p}from"primereact/utils";import{ComponentBase as s}from"primereact/componentbase";function f(){return f=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},f.apply(null,arguments)}function m(r){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},m(r)}function y(r,e){if("object"!=m(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}function d(r){var e=y(r,"string");return"symbol"==m(e)?e:e+""}function b(r,e,t){return(e=d(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function g(r){if(Array.isArray(r))return r}function v(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,u,c=[],a=!0,l=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(c.push(n.value),c.length!==e);a=!0);}catch(r){l=!0,o=r}finally{try{if(!a&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}function h(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function O(r,e){if(r){if("string"==typeof r)return h(r,e);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(r,e):void 0}}function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j=s.extend({defaultProps:{__TYPE:"Ripple",children:void 0},css:{styles:"\n@layer primereact {\n .p-ripple {\n overflow: hidden;\n position: relative;\n }\n \n .p-ink {\n display: block;\n position: absolute;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 100%;\n transform: scale(0);\n }\n \n .p-ink-active {\n animation: ripple 0.4s linear;\n }\n \n .p-ripple-disabled .p-ink {\n display: none;\n }\n}\n\n@keyframes ripple {\n 100% {\n opacity: 0;\n transform: scale(2.5);\n }\n}\n\n",classes:{root:"p-ink"}},getProps:function(r){return a.getMergedProps(r,j.defaultProps)},getOtherProps:function(r){return a.getDiffProps(r,j.defaultProps)}});function w(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function S(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){b(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var k=r.memo(r.forwardRef((function(a,s){var m,y,d=r.useState(!1),b=(y=2,g(m=d)||v(m,y)||O(m,y)||P()),h=b[0],w=b[1],k=r.useRef(null),x=r.useRef(null),E=n(),A=r.useContext(t),C=j.getProps(a,A),D=A&&A.ripple||e.ripple,T={props:C};o(j.css.styles,{name:"ripple",manual:!D});var I=j.setMetaData(S({},T)),R=I.ptm,H=I.cx,M=function(){return k.current&&k.current.parentElement},L=function(){x.current&&x.current.addEventListener("pointerdown",N)},N=function(r){var e=p.getOffset(x.current),t=r.pageX-e.left+document.body.scrollTop-p.getWidth(k.current)/2,n=r.pageY-e.top+document.body.scrollLeft-p.getHeight(k.current)/2;W(t,n)},W=function(r,e){k.current&&"none"!==getComputedStyle(k.current,null).display&&(p.removeClass(k.current,"p-ink-active"),Y(),k.current.style.top=e+"px",k.current.style.left=r+"px",p.addClass(k.current,"p-ink-active"))},Y=function(){if(k.current&&!p.getHeight(k.current)&&!p.getWidth(k.current)){var r=Math.max(p.getOuterWidth(x.current),p.getOuterHeight(x.current));k.current.style.height=r+"px",k.current.style.width=r+"px"}};if(r.useImperativeHandle(s,(function(){return{props:C,getInk:function(){return k.current},getTarget:function(){return x.current}}})),i((function(){w(!0)})),u((function(){h&&k.current&&(x.current=M(),Y(),L())}),[h]),u((function(){k.current&&!x.current&&(x.current=M(),Y(),L())})),c((function(){k.current&&(x.current=null,x.current&&x.current.removeEventListener("pointerdown",N))})),!D)return null;var _=E({"aria-hidden":!0,className:l(H("root"))},j.getOtherProps(C),R("root"));return r.createElement("span",f({role:"presentation",ref:k},_,{onAnimationEnd:function(r){p.removeClass(r.currentTarget,"p-ink-active")}}))})));k.displayName="Ripple";export{k as Ripple};