Skip to content

Commit 906aa9b

Browse files
authored
Add some imports required to compile Keystone for testing (#24617)
* Configure the Keystone scheme to run tests * Add some `import`s required to compile Keystone for testing Unfortunately, there are many imports that we need to add. I am using a combination of brute force "build, see what failed, fix, repeat" and of strategic grepping like ``` grep -rlE '\bBlog\b' WordPress/Classes Sources \ --exclude-dir=Sources/WordPressData -I --null \ | xargs -0 grep -L 'WordPressData' ``` To identify usages of WordPressData types that don't have the required import. Interestingly, this exercise is revealing additional missing imports, such as for WordPressKit.
1 parent 90e979e commit 906aa9b

File tree

649 files changed

+707
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

649 files changed

+707
-2
lines changed

Tests/KeystoneTests/Helpers/AccountBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import WordPressData
23

34
@testable import WordPress
45

Tests/KeystoneTests/Helpers/BlogBuilder.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import CoreData
12
import Foundation
23
import XCTest
4+
import WordPressData
35

46
@testable import WordPress
57

Tests/KeystoneTests/Helpers/ModelTestHelper.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
22
import CoreData
3+
import WordPressData
34
@testable import WordPress
45

56
public class ModelTestHelper: NSObject {

Tests/KeystoneTests/Helpers/PageBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import CoreData
12
import Foundation
23

34
@testable import WordPress

Tests/KeystoneTests/Helpers/PostBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
import WordPressData
23

34
@testable import WordPress
45

Tests/KeystoneTests/Helpers/ReaderPostBuilder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import WordPressData
12
@testable import WordPress
23

34
/// Builds a `ReaderPost`

Tests/KeystoneTests/Helpers/SiteSuggestionsServiceMock.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import CoreData
12
import Foundation
23

34
@testable import WordPress

Tests/KeystoneTests/Tests/Features/Media/StockPhotos/MockStockPhotosService.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Foundation
12
@testable import WordPress
23

34
final class MockStockPhotosService: StockPhotosService {

Tests/KeystoneTests/Tests/Features/Notifications/ApproveCommentActionTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import XCTest
2+
import WordPressData
23
@testable import WordPress
34
@testable import FormattableContentKit
45

Tests/KeystoneTests/Tests/Features/Notifications/FormattableCommentContentTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import XCTest
2+
import WordPressData
23
@testable import WordPress
34
@testable import FormattableContentKit
45

0 commit comments

Comments
 (0)