Skip to content

Commit

Permalink
Add optional "multiple" property to PageElement (#2827)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1206873150423133/1207457690535593/f
Tech Design URL:
CC:

**Description**:
See https://app.asana.com/0/1206873150423133/1206998874293254 for more
context, allows multiple items to be clicked during a single "click"
action.
  • Loading branch information
brianhall authored Jun 3, 2024
1 parent 8990d1a commit 31ac5d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ struct PageElement: Codable, Sendable {
let type: String
let selector: String
let parent: ParentElement?
let multiple: 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)], dataSource: nil)
let fillFormAction = FillFormAction(id: "1", actionType: .fillForm, selector: "#test", elements: [.init(type: "email", selector: "#email", parent: nil, multiple: 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)], dataSource: nil)
let fillFormAction = FillFormAction(id: "1", actionType: .fillForm, selector: "#test", elements: [.init(type: "email", selector: "#email", parent: nil, multiple: nil)], dataSource: nil)
let step = Step(type: .optOut, actions: [fillFormAction])
let sut = OptOutJob(
privacyConfig: PrivacyConfigurationManagingMock(),
Expand Down

0 comments on commit 31ac5d3

Please sign in to comment.