Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel committed Jan 14, 2025
1 parent 62a81c1 commit cab45a8
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ final class PrivacyDashboardControllerTests: XCTestCase {
toggleReportingManagerMock = ToggleReportingManagerMock()
privacyDashboardController = PrivacyDashboardController(privacyInfo: privacyInfo,
entryPoint: entryPoint,
variant: .control,
toggleReportingManager: toggleReportingManagerMock,
eventMapping: EventMapping<PrivacyDashboardEvents> { _, _, _, _ in })
webView = WKWebView()
Expand All @@ -51,16 +50,12 @@ final class PrivacyDashboardControllerTests: XCTestCase {
let entryPoints: [PrivacyDashboardEntryPoint] = [
.dashboard,
.report,
.afterTogglePrompt(category: "apple", didToggleProtectionsFixIssue: false),
.toggleReport(completionHandler: { _ in })
]
for entryPoint in entryPoints {
makePrivacyDashboardController(entryPoint: entryPoint)
let currentURL = privacyDashboardController.webView!.url
XCTAssertEqual(currentURL?.getParameter(named: "screen"), entryPoint.screen(for: .control).rawValue)
if case .afterTogglePrompt = entryPoint {
XCTAssertEqual(currentURL?.getParameter(named: "category"), "apple")
}
XCTAssertEqual(currentURL?.getParameter(named: "screen"), "breakageForm")

Check failure on line 58 in Tests/PrivacyDashboardTests/PrivacyDashboardControllerTests.swift

View workflow job for this annotation

GitHub Actions / Run unit tests (macOS)

testOpenCorrectURL, XCTAssertEqual failed: ("Optional("primaryScreen")") is not equal to ("Optional("breakageForm")")

Check failure on line 58 in Tests/PrivacyDashboardTests/PrivacyDashboardControllerTests.swift

View workflow job for this annotation

GitHub Actions / Run unit tests (macOS)

testOpenCorrectURL, XCTAssertEqual failed: ("Optional("toggleReport")") is not equal to ("Optional("breakageForm")")
if case .toggleReport = entryPoint {
XCTAssertEqual(currentURL?.getParameter(named: "opener"), "menu")
}
Expand Down

0 comments on commit cab45a8

Please sign in to comment.