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.
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.spanAllZeroes = spanAllZeroes;
|
|
exports.spanAll = spanAll;
|
|
exports.spanLeadingZeroes = spanLeadingZeroes;
|
|
exports.simpleGroup = simpleGroup;
|
|
/**
|
|
* @returns {String} the string with all zeroes contained in a <span>
|
|
*/
|
|
function spanAllZeroes(s) {
|
|
return s.replace(/(0+)/g, '<span class="zero">$1</span>');
|
|
}
|
|
/**
|
|
* @returns {String} the string with each character contained in a <span>
|
|
*/
|
|
function spanAll(s, offset = 0) {
|
|
const letters = s.split('');
|
|
return letters
|
|
.map((n, i) => `<span class="digit value-${n} position-${i + offset}">${spanAllZeroes(n)}</span>`)
|
|
.join('');
|
|
}
|
|
function spanLeadingZeroesSimple(group) {
|
|
return group.replace(/^(0+)/, '<span class="zero">$1</span>');
|
|
}
|
|
/**
|
|
* @returns {String} the string with leading zeroes contained in a <span>
|
|
*/
|
|
function spanLeadingZeroes(address) {
|
|
const groups = address.split(':');
|
|
return groups.map((g) => spanLeadingZeroesSimple(g)).join(':');
|
|
}
|
|
/**
|
|
* Groups an address
|
|
* @returns {String} a grouped address
|
|
*/
|
|
function simpleGroup(addressString, offset = 0) {
|
|
const groups = addressString.split(':');
|
|
return groups.map((g, i) => {
|
|
if (/group-v4/.test(g)) {
|
|
return g;
|
|
}
|
|
return `<span class="hover-group group-${i + offset}">${spanLeadingZeroesSimple(g)}</span>`;
|
|
});
|
|
}
|
|
//# sourceMappingURL=helpers.js.map
|