diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..687ab78f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +## v15.1 - Potomac Yard + +Potomac Yard station is now open, so a few non-breaking changes are happening in `Station`. + +- `Station.allOpen` now returns all stations, so it is an alias for `Station.allCases` for now. +- `Station.open` always returns `true` since all stations are open. +- `Station.potomacYard.name` now returns `"Potomac Yard-VT"` instead of `"Potomac Yard"`, properly reflecting the official name of the station. diff --git a/Sources/WMATA/Station.swift b/Sources/WMATA/Station.swift index 042f8368..cbc425e0 100644 --- a/Sources/WMATA/Station.swift +++ b/Sources/WMATA/Station.swift @@ -244,7 +244,7 @@ public extension Station { return "Ronald Reagan Washington National Airport" case .potomacYard: - return "Potomac Yard" + return "Potomac Yard-VT" case .braddockRoad: return "Braddock Road" @@ -478,18 +478,18 @@ public extension Station { } } - /// Indicates if a station is open to the public. + /// Indicates if a station is open to the public. Currently, all stations are open. /// - /// - Returns: `false` if this station is Potomac Yard. Otherwise `true`. + /// - Returns: `true` var open: Bool { - Station.allOpen.contains(self) + true } - /// All stations that are currently open to the public. + /// All stations that are currently open to the public. Currently, all stations are open, so this is an alias for `Station.allCases`. /// - /// Potomac Yard is excluded. + /// - Returns: All stations. static var allOpen: [Station] { - [.metroCenterUpper, .farragutNorth, .dupontCircle, .woodleyPark, .clevelandPark, .vanNess, .tenleytown, .friendshipHeights, .bethesda, .medicalCenter, .grosvenor, .northBethesda, .twinbrook, .rockville, .shadyGrove, .galleryPlaceUpper, .judiciarySquare, .unionStation, .rhodeIslandAve, .brookland, .fortTottenUpper, .takoma, .silverSpring, .forestGlen, .wheaton, .glenmont, .noma, .metroCenterLower, .mcphersonSquare, .farragutWest, .foggyBottom, .rosslyn, .arlingtonCemetery, .pentagon, .pentagonCity, .crystalCity, .ronaldReaganWashingtonNationalAirport, .braddockRoad, .kingSt, .eisenhowerAvenue, .huntington, .federalTriangle, .smithsonian, .lenfantPlazaLower, .federalCenterSW, .capitolSouth, .easternMarket, .potomacAve, .stadium, .minnesotaAve, .deanwood, .cheverly, .landover, .newCarrollton, .mtVernonSq7thSt, .shaw, .uStreet, .columbiaHeights, .georgiaAve, .fortTottenLower, .westHyattsville, .hyattsvilleCrossing, .collegePark, .greenbelt, .galleryPlaceLower, .archives, .lenfantPlazaUpper, .waterfront, .navyYard, .anacostia, .congressHeights, .southernAvenue, .naylorRoad, .suitland, .branchAve, .benningRoad, .capitolHeights, .addisonRoad, .morganBoulevard, .downtownLargo, .vanDornStreet, .franconia, .courtHouse, .clarendon, .virginiaSquare, .ballston, .eastFallsChurch, .westFallsChurch, .dunnLoring, .vienna, .mcLean, .tysons, .greensboro, .springHill, .wiehle, .restonTownCenter, .herndon, .innovationCenter, .washingtonDullesInternationalAirport, .loudounGateway, .ashburn] + Station.allCases } /// The station located within the same physical station as this station. diff --git a/Tests/WMATATests/TestRail.swift b/Tests/WMATATests/TestRail.swift index 99cfc2aa..4ea14f52 100644 --- a/Tests/WMATATests/TestRail.swift +++ b/Tests/WMATATests/TestRail.swift @@ -110,8 +110,8 @@ final class RailTests: XCTestCase { case let .failure(error): print(error) } - - await waitForExpectations(timeout: 2) + + await fulfillment(of: [exp], timeout: 2) } func testAllEntrances() { @@ -458,7 +458,7 @@ final class RailTests: XCTestCase { } } - waitForExpectations(timeout: 2) + waitForExpectations(timeout: 4) } func testElevatorAndEscalatorIncidentsWithDelegate() { @@ -1192,7 +1192,7 @@ final class RailCombineTests: CombineTests { deferCancellable(cancellable) - waitForExpectations(timeout: 2) + waitForExpectations(timeout: 4) } func testPathPublisher() {