Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/aircraft/aircraft.create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Feature: Create aircraft for operator
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 9,
"fleetTypes": ["A339", "B748"],
"fleetSize": 10,
"fleetTypes": ["A339", "A359", "B748"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down
25 changes: 25 additions & 0 deletions features/aircraft/aircraft.list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,31 @@ Feature: List aircraft
"lastAirportUpdatedAt": "2026-01-01T08:00:00.000Z",
"holdVariant": null,
"lastParkingPosition": null
},
{
"id": "915fb458-d587-4256-adec-3b07951aaf25",
"airframe": {
"type": "A359",
"iataType": "359",
"name": "Airbus A350-900",
"cruiseSpeed": { "value": 0.85, "unit": "mach" },
"serviceCeiling": 43100,
"performanceCode": "D",
"weightCategory": "heavy",
"serviceType": "passenger"
},
"registration": "D-AIXP",
"selcal": null,
"livery": "Lufthansa 2026",
"currentState": "idle",
"etopsThresholdMinutes": null,
"isConfirmed": false,
"cabinLayout": null,
"baseAirport": null,
"lastAirport": null,
"lastAirportUpdatedAt": null,
"holdVariant": null,
"lastParkingPosition": null
}
]
"""
Expand Down
4 changes: 2 additions & 2 deletions features/aircraft/aircraft.update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ Feature: Update aircraft
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down
16 changes: 8 additions & 8 deletions features/operator/operator.list-by-service-type.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: Filter operators by service type
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down Expand Up @@ -160,8 +160,8 @@ Feature: Filter operators by service type
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down Expand Up @@ -303,8 +303,8 @@ Feature: Filter operators by service type
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down Expand Up @@ -456,8 +456,8 @@ Feature: Filter operators by service type
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down
16 changes: 8 additions & 8 deletions features/operator/operator.list-recent.feature
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Feature: List recent operators
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down Expand Up @@ -103,8 +103,8 @@ Feature: List recent operators
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down Expand Up @@ -223,8 +223,8 @@ Feature: List recent operators
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down Expand Up @@ -404,8 +404,8 @@ Feature: List recent operators
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down
4 changes: 2 additions & 2 deletions features/operator/operator.list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Feature: List operators
"type": "legacy",
"serviceType": "both",
"hubs": ["FRA", "MUC"],
"fleetSize": 8,
"fleetTypes": ["A339"],
"fleetSize": 9,
"fleetTypes": ["A339", "A359"],
"avgFleetAge": 14.2,
"logoUrl": "https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png",
"backgroundUrl": null,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flight-tracker-api",
"version": "3.91.0",
"version": "3.92.0",
"private": true,
"homepage": "https://mypreflight.io",
"author": "mypreflight",
Expand Down
19 changes: 19 additions & 0 deletions prisma/seed/resource/aircrafts.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,24 @@ export async function loadAircraft(
lastParkingPositionId: null,
};

const a359unconfirmed: Aircraft = {
id: '915fb458-d587-4256-adec-3b07951aaf25',
type: 'A359',
registration: 'D-AIXP',
selcal: null,
livery: 'Lufthansa 2026',
cabinLayout: null,
holdVariant: null,
isConfirmed: false,
operatorId: DLH,
currentState: AircraftState.idle,
etopsThresholdMinutes: null,
baseAirportId: null,
lastAirportId: null,
lastAirportUpdatedAt: null,
lastParkingPositionId: null,
};

for (const aircraft of [
a330,
a321,
Expand All @@ -453,6 +471,7 @@ export async function loadAircraft(
a320af,
b752fi,
b738kl,
a359unconfirmed,
]) {
await tx.aircraft.create({ data: aircraft });
}
Expand Down
4 changes: 2 additions & 2 deletions prisma/seed/resource/operators.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export async function loadOperators(
type: OperatorType.legacy,
serviceType: OperatorServiceType.both,
hubs: ['FRA', 'MUC'] as Prisma.InputJsonValue,
fleetSize: 8,
fleetTypes: ['A339'] as Prisma.InputJsonValue,
fleetSize: 9,
fleetTypes: ['A339', 'A359'] as Prisma.InputJsonValue,
avgFleetAge: 14.2,
logoUrl:
'https://api-ninjas-data.s3.us-west-2.amazonaws.com/airline_logos/brandmark/lufthansa.png',
Expand Down
9 changes: 7 additions & 2 deletions src/modules/manifest/data/fleet-coverage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { findHoldLayoutByType } from './cargo-holds';

const SEEDS = ['aircrafts.seed.ts', 'cargo-flights.seed.ts'];
const DEGRADED_PATH_FIXTURE_TYPES = ['B762'];
const IMPORTED_UNCURATED_TYPES = ['A359'];
const UNCURATED_TYPES = [
...DEGRADED_PATH_FIXTURE_TYPES,
...IMPORTED_UNCURATED_TYPES,
];
const DESIGNATOR = /^\s+type: '([A-Z0-9]{3,4})',$/gm;

function fleetTypes(): string[] {
Expand All @@ -26,7 +31,7 @@ describe('curated hold data against the operated fleet', () => {

it('covers every airframe type an aircraft is recorded as', () => {
const uncovered = fleetTypes()
.filter((type) => !DEGRADED_PATH_FIXTURE_TYPES.includes(type))
.filter((type) => !UNCURATED_TYPES.includes(type))
.filter((type) => findHoldLayoutByType(type) === undefined);

expect(uncovered).toEqual([]);
Expand All @@ -42,7 +47,7 @@ describe('curated hold data against the operated fleet', () => {

it('gives every fleet type a default variant to fall back to', () => {
const withoutDefault = fleetTypes()
.filter((type) => !DEGRADED_PATH_FIXTURE_TYPES.includes(type))
.filter((type) => !UNCURATED_TYPES.includes(type))
.filter((type) => {
const layout = findHoldLayoutByType(type);

Expand Down
Loading