Skip to content

Commit

Permalink
Support min/max values in the JSON for random number generation (#3177)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1208188892446269/f
Tech Design URL:
CC:

**Description**:

**Steps to test this PR**:
1.

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Definition of Done**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
  • Loading branch information
brianhall authored Aug 30, 2024
1 parent ca75397 commit 8e1c851
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ struct PageElement: Codable, Sendable {
let selector: String
let parent: ParentElement?
let multiple: Bool?
let min: String?
let max: String?
}

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)], 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)], 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)], 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)], dataSource: nil)
let step = Step(type: .optOut, actions: [fillFormAction])
let sut = OptOutJob(
privacyConfig: PrivacyConfigurationManagingMock(),
Expand Down

0 comments on commit 8e1c851

Please sign in to comment.