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.
88 lines
2.0 KiB
TypeScript
88 lines
2.0 KiB
TypeScript
import { PluginFunc } from 'dayjs'
|
|
import { OpUnitType, UnitTypeLongPlural } from 'dayjs';
|
|
|
|
declare const plugin: PluginFunc
|
|
export as namespace plugin;
|
|
export = plugin
|
|
|
|
declare namespace plugin {
|
|
/**
|
|
* @deprecated Please use more strict types
|
|
*/
|
|
type DurationInputType = string | number | object
|
|
/**
|
|
* @deprecated Please use more strict types
|
|
*/
|
|
type DurationAddType = number | object | Duration
|
|
|
|
type DurationUnitsObjectType = Partial<{
|
|
[unit in Exclude<UnitTypeLongPlural, "dates"> | "weeks"]: number
|
|
}>;
|
|
type DurationUnitType = Exclude<OpUnitType, "date" | "dates">
|
|
type CreateDurationType =
|
|
((units: DurationUnitsObjectType) => Duration)
|
|
& ((time: number, unit?: DurationUnitType) => Duration)
|
|
& ((ISO_8601: string) => Duration)
|
|
type AddDurationType = CreateDurationType & ((duration: Duration) => Duration)
|
|
|
|
interface Duration {
|
|
new (input: string | number | object, unit?: string, locale?: string): Duration
|
|
|
|
clone(): Duration
|
|
|
|
humanize(withSuffix?: boolean): string
|
|
|
|
milliseconds(): number
|
|
asMilliseconds(): number
|
|
|
|
seconds(): number
|
|
asSeconds(): number
|
|
|
|
minutes(): number
|
|
asMinutes(): number
|
|
|
|
hours(): number
|
|
asHours(): number
|
|
|
|
days(): number
|
|
asDays(): number
|
|
|
|
weeks(): number
|
|
asWeeks(): number
|
|
|
|
months(): number
|
|
asMonths(): number
|
|
|
|
years(): number
|
|
asYears(): number
|
|
|
|
as(unit: DurationUnitType): number
|
|
|
|
get(unit: DurationUnitType): number
|
|
|
|
add: AddDurationType
|
|
|
|
subtract: AddDurationType
|
|
|
|
toJSON(): string
|
|
|
|
toISOString(): string
|
|
|
|
format(formatStr?: string): string
|
|
|
|
locale(locale: string): Duration
|
|
}
|
|
}
|
|
|
|
declare module 'dayjs' {
|
|
interface Dayjs {
|
|
add(duration: plugin.Duration): Dayjs
|
|
subtract(duration: plugin.Duration): Dayjs
|
|
}
|
|
|
|
/**
|
|
* @param time If unit is not present, time treated as number of milliseconds
|
|
*/
|
|
export const duration: plugin.CreateDurationType;
|
|
export function isDuration(d: any): d is plugin.Duration
|
|
} |