Files
flights_web_raw/node_modules/primereact/card/card.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

120 lines
4.4 KiB
JavaScript

this.primereact = this.primereact || {};
this.primereact.card = (function (exports, React, api, componentbase, hooks, utils) {
'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var classes = {
root: 'p-card p-component',
header: 'p-card-header',
title: 'p-card-title',
subTitle: 'p-card-subtitle',
content: 'p-card-content',
footer: 'p-card-footer',
body: 'p-card-body'
};
var styles = "\n@layer primereact {\n .p-card-header img {\n width: 100%;\n }\n}\n";
var CardBase = componentbase.ComponentBase.extend({
defaultProps: {
__TYPE: 'Card',
id: null,
header: null,
footer: null,
title: null,
subTitle: null,
style: null,
className: null,
children: undefined
},
css: {
classes: classes,
styles: styles
}
});
var Card = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
var mergeProps = hooks.useMergeProps();
var context = React__namespace.useContext(api.PrimeReactContext);
var props = CardBase.getProps(inProps, context);
var elementRef = React__namespace.useRef(ref);
var _CardBase$setMetaData = CardBase.setMetaData({
props: props
}),
ptm = _CardBase$setMetaData.ptm,
cx = _CardBase$setMetaData.cx,
isUnstyled = _CardBase$setMetaData.isUnstyled;
componentbase.useHandleStyle(CardBase.css.styles, isUnstyled, {
name: 'card'
});
var createHeader = function createHeader() {
var headerProps = mergeProps({
className: cx('header')
}, ptm('header'));
if (props.header) {
return /*#__PURE__*/React__namespace.createElement("div", headerProps, utils.ObjectUtils.getJSXElement(props.header, props));
}
return null;
};
var createBody = function createBody() {
var titleProps = mergeProps({
className: cx('title')
}, ptm('title'));
var title = props.title && /*#__PURE__*/React__namespace.createElement("div", titleProps, utils.ObjectUtils.getJSXElement(props.title, props));
var subTitleProps = mergeProps({
className: cx('subTitle')
}, ptm('subTitle'));
var subTitle = props.subTitle && /*#__PURE__*/React__namespace.createElement("div", subTitleProps, utils.ObjectUtils.getJSXElement(props.subTitle, props));
var contentProps = mergeProps({
className: cx('content')
}, ptm('content'));
var children = props.children && /*#__PURE__*/React__namespace.createElement("div", contentProps, props.children);
var footerProps = mergeProps({
className: cx('footer')
}, ptm('footer'));
var footer = props.footer && /*#__PURE__*/React__namespace.createElement("div", footerProps, utils.ObjectUtils.getJSXElement(props.footer, props));
var bodyProps = mergeProps({
className: cx('body')
}, ptm('body'));
return /*#__PURE__*/React__namespace.createElement("div", bodyProps, title, subTitle, children, footer);
};
React__namespace.useEffect(function () {
utils.ObjectUtils.combinedRefs(elementRef, ref);
}, [elementRef, ref]);
var rootProps = mergeProps({
id: props.id,
ref: elementRef,
style: props.style,
className: utils.classNames(props.className, cx('root'))
}, CardBase.getOtherProps(props), ptm('root'));
var header = createHeader();
var body = createBody();
return /*#__PURE__*/React__namespace.createElement("div", rootProps, header, body);
});
Card.displayName = 'Card';
exports.Card = Card;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;
})({}, React, primereact.api, primereact.componentbase, primereact.hooks, primereact.utils);