From 094869a6357370347f0d994d9e8b117336740e54 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 4 Feb 2022 10:13:55 +0100 Subject: [PATCH] Use `XCTExpectFailure` instead of skipping tests in scheme My concern with using the scheme (or a Test Plan) to skip tests is that the setting is tucked away behind multiple UI layers and mouse clicks. I worry that we'll forget about it. By still running these two tests and marking their failures as expected, we make the issue more visible. --- .../xcshareddata/xcschemes/MediaEditor.xcscheme | 8 -------- Tests/MediaEditorHubTests.swift | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/MediaEditor.xcodeproj/xcshareddata/xcschemes/MediaEditor.xcscheme b/MediaEditor.xcodeproj/xcshareddata/xcschemes/MediaEditor.xcscheme index 51aec26..9cfa3dd 100644 --- a/MediaEditor.xcodeproj/xcshareddata/xcschemes/MediaEditor.xcscheme +++ b/MediaEditor.xcodeproj/xcshareddata/xcschemes/MediaEditor.xcscheme @@ -37,14 +37,6 @@ BlueprintName = "Tests" ReferencedContainer = "container:MediaEditor.xcodeproj"> - - - - - - diff --git a/Tests/MediaEditorHubTests.swift b/Tests/MediaEditorHubTests.swift index 779ba71..13f0fe9 100644 --- a/Tests/MediaEditorHubTests.swift +++ b/Tests/MediaEditorHubTests.swift @@ -105,6 +105,7 @@ class MediaEditorHubTests: XCTestCase { hub.imagesCollectionView.reloadData() hub.loadingImage(at: 0) + XCTExpectFailure("We noticed this test failing in https://github.com/wordpress-mobile/MediaEditor-iOS/pull/28 but did not have the bandwidth to fix it") hub.collectionView(hub.thumbsCollectionView, didSelectItemAt: IndexPath(row: 1, section: 0)) expect(hub.activityIndicatorView.isHidden).to(beTrue()) @@ -118,6 +119,7 @@ class MediaEditorHubTests: XCTestCase { hub.loadingImage(at: 1) hub.loadingImage(at: 0) + XCTExpectFailure("We noticed this test failing in https://github.com/wordpress-mobile/MediaEditor-iOS/pull/28 but did not have the bandwidth to fix it") hub.collectionView(hub.thumbsCollectionView, didSelectItemAt: IndexPath(row: 1, section: 0)) expect(hub.activityIndicatorView.isHidden).to(beFalse())