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.
118 lines
2.8 KiB
JavaScript
118 lines
2.8 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const shared = (root) => {
|
|
const sch = {
|
|
nullable: { type: "boolean" },
|
|
metadata: {
|
|
optionalProperties: {
|
|
union: { elements: { ref: "schema" } },
|
|
},
|
|
additionalProperties: true,
|
|
},
|
|
};
|
|
if (root)
|
|
sch.definitions = { values: { ref: "schema" } };
|
|
return sch;
|
|
};
|
|
const emptyForm = (root) => ({
|
|
optionalProperties: shared(root),
|
|
});
|
|
const refForm = (root) => ({
|
|
properties: {
|
|
ref: { type: "string" },
|
|
},
|
|
optionalProperties: shared(root),
|
|
});
|
|
const typeForm = (root) => ({
|
|
properties: {
|
|
type: {
|
|
enum: [
|
|
"boolean",
|
|
"timestamp",
|
|
"string",
|
|
"float32",
|
|
"float64",
|
|
"int8",
|
|
"uint8",
|
|
"int16",
|
|
"uint16",
|
|
"int32",
|
|
"uint32",
|
|
],
|
|
},
|
|
},
|
|
optionalProperties: shared(root),
|
|
});
|
|
const enumForm = (root) => ({
|
|
properties: {
|
|
enum: { elements: { type: "string" } },
|
|
},
|
|
optionalProperties: shared(root),
|
|
});
|
|
const elementsForm = (root) => ({
|
|
properties: {
|
|
elements: { ref: "schema" },
|
|
},
|
|
optionalProperties: shared(root),
|
|
});
|
|
const propertiesForm = (root) => ({
|
|
properties: {
|
|
properties: { values: { ref: "schema" } },
|
|
},
|
|
optionalProperties: {
|
|
optionalProperties: { values: { ref: "schema" } },
|
|
additionalProperties: { type: "boolean" },
|
|
...shared(root),
|
|
},
|
|
});
|
|
const optionalPropertiesForm = (root) => ({
|
|
properties: {
|
|
optionalProperties: { values: { ref: "schema" } },
|
|
},
|
|
optionalProperties: {
|
|
additionalProperties: { type: "boolean" },
|
|
...shared(root),
|
|
},
|
|
});
|
|
const discriminatorForm = (root) => ({
|
|
properties: {
|
|
discriminator: { type: "string" },
|
|
mapping: {
|
|
values: {
|
|
metadata: {
|
|
union: [propertiesForm(false), optionalPropertiesForm(false)],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
optionalProperties: shared(root),
|
|
});
|
|
const valuesForm = (root) => ({
|
|
properties: {
|
|
values: { ref: "schema" },
|
|
},
|
|
optionalProperties: shared(root),
|
|
});
|
|
const schema = (root) => ({
|
|
metadata: {
|
|
union: [
|
|
emptyForm,
|
|
refForm,
|
|
typeForm,
|
|
enumForm,
|
|
elementsForm,
|
|
propertiesForm,
|
|
optionalPropertiesForm,
|
|
discriminatorForm,
|
|
valuesForm,
|
|
].map((s) => s(root)),
|
|
},
|
|
});
|
|
const jtdMetaSchema = {
|
|
definitions: {
|
|
schema: schema(false),
|
|
},
|
|
...schema(true),
|
|
};
|
|
exports.default = jtdMetaSchema;
|
|
//# sourceMappingURL=jtd-schema.js.map
|