Remove Spirit Airlines (defunct — merged into Frontier)
Spirit ceased operations, so the fetchSpiritStatus path and all NK references are dead code. Pulled out: - AirlineLoadService: drop `case "NK"` from the router, delete fetchSpiritStatus (the GetFlightInfoBI POST that was returning 403 even after our APIM key was accepted). - FlightLoadDetailView: drop the `schedule.airline.iata == "NK"` branch and the spiritUnavailableView placeholder. - FlightLoad model: update the airlineCode comment. - AirlineLoadIntegrationTests: remove test_NK_spirit and drop "NK" from statusOnlyAirlines / knownDailyFlights fallback table. - AIRLINE_INTEGRATION_GUIDE.md: tombstone the Spirit section and remove it from the cheat-sheets and recommendations. Test suite now: 6 airlines passing (AA, AS, B6, EK, KE, UA), 1 skipped (XE — WKWebView host required), 0 failures, runs in ~10s. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,6 @@ import XCTest
|
||||
/// Pre-existing limitations (NOT bugs in these tests):
|
||||
/// - JSX (XE) uses a WKWebView path and can't run from unit tests on the
|
||||
/// simulator without a host scene. Skipped with a `XCTSkip`.
|
||||
/// - Spirit (NK) intentionally returns an empty FlightLoad — they have no
|
||||
/// standby/load program. Test just asserts non-nil.
|
||||
/// - Some carriers (notably AA, AS waitlist) only open the load endpoint
|
||||
/// close to departure. Tests prefer flights leaving < 24h out and skip
|
||||
/// with a helpful message if nothing's findable.
|
||||
@@ -39,16 +37,15 @@ final class AirlineLoadIntegrationTests: XCTestCase {
|
||||
/// Airlines whose load endpoint deliberately returns only flight
|
||||
/// status (no seat/standby data). We assert non-nil for these and
|
||||
/// stop short of the "must have data" check.
|
||||
private static let statusOnlyAirlines: Set<String> = ["NK", "B6", "EK"]
|
||||
private static let statusOnlyAirlines: Set<String> = ["B6", "EK"]
|
||||
|
||||
/// Hardcoded daily flights used as fallbacks when route-explorer's
|
||||
/// `/departures` data doesn't include the carrier we're looking for
|
||||
/// (notably ULCCs like NK and some international carriers like EK/KE
|
||||
/// that aren't in route-explorer's schedule feed). Each entry is a
|
||||
/// well-known daily operation that's been stable over time; if any
|
||||
/// of these stop operating, update the entry.
|
||||
/// (notably some international carriers like EK/KE that aren't in
|
||||
/// route-explorer's schedule feed). Each entry is a well-known daily
|
||||
/// operation that's been stable over time; if any of these stop
|
||||
/// operating, update the entry.
|
||||
private static let knownDailyFlights: [String: (flightNumber: String, origin: String, destination: String)] = [
|
||||
"NK": ("401", "LAS", "FLL"), // Spirit Las Vegas → Fort Lauderdale, daily
|
||||
"EK": ("201", "JFK", "DXB"), // Emirates JFK → Dubai, daily flagship
|
||||
"KE": ("82", "JFK", "ICN"), // Korean Air JFK → Incheon, daily
|
||||
]
|
||||
@@ -83,13 +80,6 @@ final class AirlineLoadIntegrationTests: XCTestCase {
|
||||
)
|
||||
}
|
||||
|
||||
func test_NK_spirit() async throws {
|
||||
try await runAirlineLoadTest(
|
||||
carrier: "NK",
|
||||
hubs: ["FLL", "MCO", "LAS", "DTW", "ORD"]
|
||||
)
|
||||
}
|
||||
|
||||
func test_KE_koreanAir() async throws {
|
||||
try await runAirlineLoadTest(
|
||||
carrier: "KE",
|
||||
|
||||
Reference in New Issue
Block a user