Files
flights_web_raw/node_modules/primereact/deferredcontent/deferredcontent.esm.min.js
T
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
2.0 KiB
JavaScript

import*as t from"react";import{PrimeReactContext as r}from"primereact/api";import{useMergeProps as e,useEventListener as n,useMountEffect as o}from"primereact/hooks";import{ComponentBase as a}from"primereact/componentbase";function i(t){if(Array.isArray(t))return t}function u(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,a,i,u=[],l=!0,c=!1;try{if(a=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(u.push(n.value),u.length!==r);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}function l(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function c(t,r){if(t){if("string"==typeof t)return l(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?l(t,r):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(t,r){return i(t)||u(t,r)||c(t,r)||f()}var s=a.extend({defaultProps:{__TYPE:"DeferredContent",onload:null,children:void 0}}),d=t.forwardRef((function(a,i){var u=e(),l=t.useContext(r),c=s.getProps(a,l),f=m(t.useState(!1),2),d=f[0],p=f[1],y=t.useRef(null),v=m(n({target:"window",type:"scroll",listener:function(){w()&&(A(),g())}}),2),h=v[0],g=v[1],b=s.setMetaData({props:c,state:{loaded:d}}).ptm,w=function(){if(d)return!1;var t=y.current.getBoundingClientRect();return document.documentElement.clientHeight>=t.top},A=function(t){p(!0),c.onLoad&&c.onLoad(t)};t.useImperativeHandle(i,(function(){return{props:c,getElement:function(){return y.current}}})),o((function(){d||(w()?A():h())}));var S=u({ref:y},s.getOtherProps(c),b("root"));return t.createElement("div",S,d&&c.children)}));d.displayName="DeferredContent";export{d as DeferredContent};