60e2149072
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.
143 lines
2.9 KiB
JavaScript
143 lines
2.9 KiB
JavaScript
// src/jsx/dom/index.ts
|
|
import { isValidElement, reactAPICompatVersion, shallowEqual } from "../base.js";
|
|
import { Children } from "../children.js";
|
|
import { DOM_MEMO } from "../constants.js";
|
|
import { useContext } from "../context.js";
|
|
import {
|
|
createRef,
|
|
forwardRef,
|
|
startTransition,
|
|
startViewTransition,
|
|
use,
|
|
useCallback,
|
|
useDebugValue,
|
|
useDeferredValue,
|
|
useEffect,
|
|
useId,
|
|
useImperativeHandle,
|
|
useInsertionEffect,
|
|
useLayoutEffect,
|
|
useMemo,
|
|
useReducer,
|
|
useRef,
|
|
useState,
|
|
useSyncExternalStore,
|
|
useTransition,
|
|
useViewTransition
|
|
} from "../hooks/index.js";
|
|
import { ErrorBoundary, Suspense } from "./components.js";
|
|
import { createContext } from "./context.js";
|
|
import { useActionState, useFormStatus, useOptimistic } from "./hooks/index.js";
|
|
import { Fragment, jsx } from "./jsx-runtime.js";
|
|
import { createPortal, flushSync } from "./render.js";
|
|
import { render } from "./render.js";
|
|
var createElement = (tag, props, ...children) => {
|
|
const jsxProps = props ? { ...props } : {};
|
|
if (children.length) {
|
|
jsxProps.children = children.length === 1 ? children[0] : children;
|
|
}
|
|
let key = void 0;
|
|
if ("key" in jsxProps) {
|
|
key = jsxProps.key;
|
|
delete jsxProps.key;
|
|
}
|
|
return jsx(tag, jsxProps, key);
|
|
};
|
|
var cloneElement = (element, props, ...children) => {
|
|
return jsx(
|
|
element.tag,
|
|
{
|
|
...element.props,
|
|
...props,
|
|
children: children.length ? children : element.props.children
|
|
},
|
|
element.key
|
|
);
|
|
};
|
|
var memo = (component, propsAreEqual = shallowEqual) => {
|
|
const wrapper = ((props) => component(props));
|
|
wrapper[DOM_MEMO] = propsAreEqual;
|
|
return wrapper;
|
|
};
|
|
var dom_default = {
|
|
version: reactAPICompatVersion,
|
|
useState,
|
|
useEffect,
|
|
useRef,
|
|
useCallback,
|
|
use,
|
|
startTransition,
|
|
useTransition,
|
|
useDeferredValue,
|
|
startViewTransition,
|
|
useViewTransition,
|
|
useMemo,
|
|
useLayoutEffect,
|
|
useInsertionEffect,
|
|
useReducer,
|
|
useId,
|
|
useDebugValue,
|
|
createRef,
|
|
forwardRef,
|
|
useImperativeHandle,
|
|
useSyncExternalStore,
|
|
useFormStatus,
|
|
useActionState,
|
|
useOptimistic,
|
|
Suspense,
|
|
ErrorBoundary,
|
|
createContext,
|
|
useContext,
|
|
memo,
|
|
isValidElement,
|
|
createElement,
|
|
cloneElement,
|
|
Children,
|
|
Fragment,
|
|
StrictMode: Fragment,
|
|
flushSync,
|
|
createPortal
|
|
};
|
|
export {
|
|
Children,
|
|
ErrorBoundary,
|
|
Fragment,
|
|
Fragment as StrictMode,
|
|
Suspense,
|
|
cloneElement,
|
|
createContext,
|
|
createElement,
|
|
createPortal,
|
|
createRef,
|
|
dom_default as default,
|
|
flushSync,
|
|
forwardRef,
|
|
isValidElement,
|
|
createElement as jsx,
|
|
memo,
|
|
render,
|
|
startTransition,
|
|
startViewTransition,
|
|
use,
|
|
useActionState,
|
|
useCallback,
|
|
useContext,
|
|
useDebugValue,
|
|
useDeferredValue,
|
|
useEffect,
|
|
useFormStatus,
|
|
useId,
|
|
useImperativeHandle,
|
|
useInsertionEffect,
|
|
useLayoutEffect,
|
|
useMemo,
|
|
useOptimistic,
|
|
useReducer,
|
|
useRef,
|
|
useState,
|
|
useSyncExternalStore,
|
|
useTransition,
|
|
useViewTransition,
|
|
reactAPICompatVersion as version
|
|
};
|