Skip to content
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

Add the ability to click actions to fail silently #3805

Merged
merged 6 commits into from
Jan 31, 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct PageElement: Codable, Sendable {
let multiple: Bool?
let min: String?
let max: String?
let failSilently: Bool?
}

struct ProfileMatch: Codable, Sendable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ final class DataBrokerOperationActionTests: XCTestCase {
}

func testWhenActionNeedsEmail_thenExtractedProfileEmailIsSet() async {
let fillFormAction = FillFormAction(id: "1", actionType: .fillForm, selector: "#test", elements: [.init(type: "email", selector: "#email", parent: nil, multiple: nil, min: nil, max: nil)], dataSource: nil)
let fillFormAction = FillFormAction(id: "1", actionType: .fillForm, selector: "#test", elements: [.init(type: "email", selector: "#email", parent: nil, multiple: nil, min: nil, max: nil, failSilently: nil)], dataSource: nil)
let step = Step(type: .optOut, actions: [fillFormAction])
let sut = OptOutJob(
privacyConfig: PrivacyConfigurationManagingMock(),
Expand All @@ -152,7 +152,7 @@ final class DataBrokerOperationActionTests: XCTestCase {
}

func testWhenGetEmailServiceFails_thenOperationThrows() async {
let fillFormAction = FillFormAction(id: "1", actionType: .fillForm, selector: "#test", elements: [.init(type: "email", selector: "#email", parent: nil, multiple: nil, min: nil, max: nil)], dataSource: nil)
let fillFormAction = FillFormAction(id: "1", actionType: .fillForm, selector: "#test", elements: [.init(type: "email", selector: "#email", parent: nil, multiple: nil, min: nil, max: nil, failSilently: nil)], dataSource: nil)
let step = Step(type: .optOut, actions: [fillFormAction])
let sut = OptOutJob(
privacyConfig: PrivacyConfigurationManagingMock(),
Expand Down
Loading