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.
60 lines
2.0 KiB
JavaScript
60 lines
2.0 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Timestamp = void 0;
|
|
const base_1 = require("./base");
|
|
const file_1 = require("./file");
|
|
const utils_1 = require("./utils");
|
|
/**
|
|
* A container for the signed part of timestamp metadata.
|
|
*
|
|
* A top-level that specifies the latest version of the snapshot role metadata file,
|
|
* and hence the latest versions of all metadata and targets on the repository.
|
|
*/
|
|
class Timestamp extends base_1.Signed {
|
|
type = base_1.MetadataKind.Timestamp;
|
|
snapshotMeta;
|
|
constructor(options) {
|
|
super(options);
|
|
this.snapshotMeta = options.snapshotMeta || new file_1.MetaFile({ version: 1 });
|
|
}
|
|
equals(other) {
|
|
if (!(other instanceof Timestamp)) {
|
|
return false;
|
|
}
|
|
return super.equals(other) && this.snapshotMeta.equals(other.snapshotMeta);
|
|
}
|
|
toJSON() {
|
|
return {
|
|
_type: this.type,
|
|
spec_version: this.specVersion,
|
|
version: this.version,
|
|
expires: this.expires,
|
|
meta: { 'snapshot.json': this.snapshotMeta.toJSON() },
|
|
...this.unrecognizedFields,
|
|
};
|
|
}
|
|
static fromJSON(data) {
|
|
const { unrecognizedFields, ...commonFields } = base_1.Signed.commonFieldsFromJSON(data);
|
|
const { meta, ...rest } = unrecognizedFields;
|
|
return new Timestamp({
|
|
...commonFields,
|
|
snapshotMeta: snapshotMetaFromJSON(meta),
|
|
unrecognizedFields: rest,
|
|
});
|
|
}
|
|
}
|
|
exports.Timestamp = Timestamp;
|
|
function snapshotMetaFromJSON(data) {
|
|
let snapshotMeta;
|
|
if (utils_1.guard.isDefined(data)) {
|
|
const snapshotData = data['snapshot.json'];
|
|
if (!utils_1.guard.isDefined(snapshotData) || !utils_1.guard.isObject(snapshotData)) {
|
|
throw new TypeError('missing snapshot.json in meta');
|
|
}
|
|
else {
|
|
snapshotMeta = file_1.MetaFile.fromJSON(snapshotData);
|
|
}
|
|
}
|
|
return snapshotMeta;
|
|
}
|