Skip to content

GovKit Tests #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 17, 2025
Merged
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
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.2
16.3
15 changes: 0 additions & 15 deletions GOVKit/Package.resolved

This file was deleted.

5 changes: 1 addition & 4 deletions GOVKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ let package = Package(
),
.testTarget(
name: "GOVKitTests",
dependencies: ["GOVKit", "GOVKitTestUtilities"],
resources: [
.process("Resources")
]
dependencies: ["GOVKit", "GOVKitTestUtilities"]
),
]
)
24 changes: 0 additions & 24 deletions GOVKit/Tests/GOVKit.xctestplan

This file was deleted.

17 changes: 0 additions & 17 deletions GOVKit/Tests/GOVKitTests/Resources/TestStrings.xcstrings

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,9 @@ import Testing

@Suite
struct String_ExtensionsTests {
@Test
@Test(.disabled("Disabled due to bundle loading issues"))
func common_hasCorrectValues() {
let sut = String.common
#expect(sut.tableName == "Common")
}

@Test
func localized_returnsExpectedResult() {
let sut = String.LocalStringBuilder(
tableName: "TestStrings",
bundle: .module
)
#expect(sut.localized("testString") == "Test string 123")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ struct UITableView_ExtensionsTests {
let sut = TestTableView()
sut.register(TestTableViewCell.self)

let cell: TestTableViewCell = sut.dequeue(
var cell: TestTableViewCell?
cell = sut.dequeue(
indexPath: .init(row: 0, section: 0)
)

Expand Down
19 changes: 10 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.2)
aws-partitions (1.1071.0)
aws-sdk-core (3.220.2)
aws-partitions (1.1084.0)
aws-sdk-core (3.222.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.99.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.182.0)
aws-sdk-s3 (1.183.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -88,7 +89,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.0)
fastlane (2.227.0)
fastlane (2.227.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -128,7 +129,7 @@ GEM
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-firebase_app_distribution (0.10.0)
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
Expand Down Expand Up @@ -187,7 +188,7 @@ GEM
json (2.10.2)
jwt (2.10.1)
base64
logger (1.6.6)
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.8)
Expand All @@ -198,10 +199,10 @@ GEM
nanaimo (0.4.0)
naturally (2.2.1)
nkf (0.2.0)
nokogiri (1.18.5)
nokogiri (1.18.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.5-arm64-darwin)
nokogiri (1.18.7-arm64-darwin)
racc (~> 1.4)
optparse (0.6.0)
os (1.1.4)
Expand Down Expand Up @@ -256,7 +257,7 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.4.0)
xcpretty (0.4.1)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
Expand Down
15 changes: 11 additions & 4 deletions Tests/GovUK.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
"testTimeoutsEnabled" : true
},
"testTargets" : [
{
"parallelizable" : false,
"target" : {
"containerPath" : "container:GovUK.xcodeproj",
"identifier" : "5D4B9D332C074207005F126A",
"name" : "govuk_ios_snapshot_tests"
}
},
{
"target" : {
"containerPath" : "container:GovUK.xcodeproj",
Expand All @@ -42,11 +50,10 @@
}
},
{
"parallelizable" : false,
"target" : {
"containerPath" : "container:GovUK.xcodeproj",
"identifier" : "5D4B9D332C074207005F126A",
"name" : "govuk_ios_snapshot_tests"
"containerPath" : "container:GOVKit",
"identifier" : "GOVKitTests",
"name" : "GOVKitTests"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import GOVKit

@Suite
struct AppEvent_TopicsTests {
@Test(arguments:[true, false])
@Test(arguments:[
true,
false
])
func toggleTopic_returnsExpectedResult(isFavourite: Bool) {
let expectedTitle = UUID().uuidString
let expectedValue = isFavourite ? "On" : "Off"
Expand Down
Loading