Skip to content

Commit

Permalink
Add No Results Selectors to Brokers (#2912)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/72649045549333/1207603060301981/f
Tech Design URL:
CC:

**Description**:
Adds no results selectors to each broker JSON file, with the exception
of the following:
 - PeopleWhiz sites (covered in #2840 and #2849)
 - Inforver (redirects to persontrust, known)
 - Public Reports (redirects to persontrust, known)
 - pub360 (now redirects to plcom.net, **new**)

**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)

---------

Co-authored-by: Juan Manuel Pereira <[email protected]>
  • Loading branch information
brianhall and jotaemepereira authored Jun 27, 2024
1 parent 9600f84 commit f46502e
Show file tree
Hide file tree
Showing 35 changed files with 75 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ final class DataBrokerRunCustomJSONViewModel: ObservableObject {

var alert: AlertUI?
var selectedDataBroker: DataBroker?
var error: Error?

let brokers: [DataBroker]

Expand Down Expand Up @@ -342,6 +343,7 @@ final class DataBrokerRunCustomJSONViewModel: ObservableObject {
}

func runJSON(jsonString: String) {
self.error = nil
if let data = jsonString.data(using: .utf8) {
do {
let decoder = JSONDecoder()
Expand All @@ -367,13 +369,15 @@ final class DataBrokerRunCustomJSONViewModel: ObservableObject {
}
group.leave()
} catch {
print("Error when scanning: \(error)")
self.error = error
group.leave()
}
}
}
group.notify(queue: .main) {
if self.results.count == 0 {
if let error = self.error {
self.showAlert(for: error)
} else if self.results.count == 0 {
self.showNoResultsAlert()
}
}
Expand Down Expand Up @@ -578,7 +582,7 @@ extension DataBrokerProtectionError {
switch self {
case .httpError(let code):
if code == 404 {
return "No results."
return "No results (404)"
} else {
return "Error."
}
Expand All @@ -590,7 +594,7 @@ extension DataBrokerProtectionError {
switch self {
case .httpError(let code):
if code == 404 {
return "No results were found."
return "No results were found. (404 was returned)"
} else {
return "Failed with HTTP error code: \(code)"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "AdvancedBackgroundChecks",
"url": "advancedbackgroundchecks.com",
"version": "0.1.8",
"version": "0.2.0",
"parent": "peoplefinders.com",
"addedDatetime": 1678060800000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "d760163d-4a1f-476a-bc3e-4f3ccedc29f1",
"selector": ".card-block",
"noResultsSelector": "//div[@id='site-content']//p[contains(text(), 'We could not find any results')]",
"profile": {
"name": {
"selector": ".card-title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backgroundcheck.run",
"url": "backgroundcheck.run",
"version": "0.1.5",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1677736800000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "57dfbc89-94c8-49f0-9952-c58c92883ffd",
"selector": ".b-pfl-list",
"noResultsSelector": "//h3[@class='no-records-found'] | //div[@id='results_container' and contains(text(), 'Not found')]",
"profile": {
"name": {
"selector": ".name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Centeda",
"url": "centeda.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1677736800000,
"steps": [
Expand All @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "e779b827-702d-402d-ae79-f3681ad50008",
"selector": ".search-result > a",
"noResultsSelector": "//div[@class='no-phone-info'] | //h1[contains(text(), 'Oops')]",
"profile": {
"name": {
"selector": ".title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Clubset",
"url": "clubset.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1702965600000,
"steps": [
Expand All @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "dee8a12e-b8bd-4a37-b77d-8330d8eda4cb",
"selector": ".card",
"noResultsSelector": "//div[@class='page-404' and h1[starts-with(text(), 'Sorry')]]",
"profile": {
"name": {
"selector": ".card-title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ClustrMaps",
"url": "clustrmaps.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "neighbor.report",
"addedDatetime": 1692594000000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "f0e4f08c-c999-451c-b195-93f481c0a4de",
"selector": ".//div[@itemprop='Person']",
"noResultsSelector": "//div[h1[contains(text(), 'No results found')]]",
"profile": {
"name": {
"selector": "(.//a[@class='persons'])[1]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Councilon",
"url": "councilon.com",
"version": "0.1.6",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1702965600000,
"steps": [
Expand All @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "5629ad0b-1f33-480f-a6ec-5add91b2dce8",
"selector": ".card",
"noResultsSelector": "//div[@class='page-404' and h1[starts-with(text(), 'Sorry')]]",
"profile": {
"name": {
"selector": ".card-title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "CurAdvisor",
"url": "curadvisor.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1703052000000,
"steps": [
Expand All @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "c9babcb9-540e-48ac-900b-b32229e28124",
"selector": ".card",
"noResultsSelector": "//div[@class='page-404' and h1[starts-with(text(), 'Sorry')]]",
"profile": {
"name": {
"selector": ".card-title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Cyber Background Checks",
"url": "cyberbackgroundchecks.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "peoplefinders.com",
"addedDatetime": 1705644000000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "d6c07b68-7a33-45a4-9e8e-ae6f9262ef29",
"selector": ".card",
"noResultsSelector": "//h1[@class='total-records-label' and contains(., '0 results')]",
"profile": {
"name": {
"selector": ".name-given"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Dataveria",
"url": "dataveria.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1677736800000,
"steps": [
Expand All @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "441a4974-cc5a-401d-aec5-f597956327ff",
"selector": ".search-item",
"noResultsSelector": "//div[contains(@class, 'page-404')]//h1[contains(text(), 'Sorry')]",
"profile": {
"name": {
"selector": ".//div[@class='col-sm-24 col-md-19 col-text']"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "14dfda23-a4c3-483f-a67f-e89322636036",
"selector": ".person-container",
"noResultsSelector": "//h1[text()='Search Not Found']",
"profile": {
"name": {
"selector": ".text-xl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FastPeopleSearch",
"url": "fastpeoplesearch.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "peoplefinders.com",
"addedDatetime": 1675317600000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "f7a316c3-f4c0-46b5-be2d-b8df71852a26",
"selector": ".card",
"noResultsSelector": "#notfound_container",
"profile": {
"name": {
"selector": ".larger"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FreePeopleDirectory",
"url": "freepeopledirectory.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "spokeo.com",
"addedDatetime": 1674540000000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "cc77e311-7660-43a2-88ae-2c179840f6df",
"selector": ".whole-card",
"noResultsSelector": "//div[@class='results-content']//h2[contains(text(), 'No Result')]",
"profile": {
"name": {
"selector": ".card-title"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Kwold",
"url": "kwold.com",
"version": "0.1.6",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1702965600000,
"steps": [
Expand All @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "ec9f8ae6-199e-441b-9722-ffc6737b4595",
"selector": ".card",
"noResultsSelector": "//div[@class='page-404' and h1[starts-with(text(), 'Sorry')]]",
"profile": {
"name": {
"selector": ".card-title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mylife",
"url": "mylife.com",
"version": "0.0.1",
"version": "0.1.0",
"addedDatetime": 1715797497496,
"steps": [
{
Expand All @@ -17,6 +17,7 @@
"actionType": "extract",
"id": "9a08be56-d596-48e5-8745-0574b541e9df",
"selector": ".ais-InfiniteHits-item",
"noResultsSelector": "//h1[@class='search-result-heading' and contains(text(), \"We didn't find\")]",
"profile": {
"name": {
"selector": ".hit-name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Neighbor Report",
"url": "neighbor.report",
"version": "0.1.6",
"version": "0.2.0",
"addedDatetime": 1703570400000,
"steps": [
{
Expand All @@ -17,6 +17,7 @@
"actionType": "extract",
"id": "1ec79c67-40b0-4f91-baf8-996073109092",
"selector": ".lstd",
"noResultsSelector": "//h1[contains(text(), 'Error 404')]",
"profile": {
"name": {
"selector": "(.//a[@class='persons'])[1]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"actionType": "extract",
"id": "633a36d1-a68c-4435-93eb-de82d940e7f7",
"selector": ".b-pfl-list",
"noResultsSelector": "//h3[contains(text(), 'No people found')] | //div[@id='results_container' and contains(text(), 'Not found')]",
"profile": {
"name": {
"selector": ".name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "OfficialUSA",
"url": "officialusa.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "neighbor.report",
"addedDatetime": 1692594000000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "fd803889-7f13-4955-8cec-eac551f5c5f2",
"selector": ".person",
"noResultsSelector": "//h1[contains(text(), '404')]",
"profile": {
"name": {
"selector": ".//span[@itemprop='name']"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "People Background Check",
"url": "people-background-check.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "verecor.com",
"addedDatetime": 1702965600000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "06e575b5-ac64-4bf5-b5e7-6e39e5a474fb",
"selector": ".b-pfl-list",
"noResultsSelector": "//h3[contains(text(), 'No people found'] | //div[@id='results_container' and contains(text(), 'Not found')]",
"profile": {
"name": {
"selector": ".name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "PeopleFinders",
"url": "peoplefinders.com",
"version": "0.1.6",
"version": "0.2.0",
"addedDatetime": 1677132000000,
"steps": [
{
Expand All @@ -17,6 +17,7 @@
"actionType": "extract",
"id": "f35cbfda-053f-444c-93b7-36e9bed2612b",
"selector": ".record",
"noResultsSelector": ".no-results",
"profile": {
"name": {
"selector": ".//h4[@class='record__title']"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "People Search Now",
"url": "peoplesearchnow.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "peoplefinders.com",
"addedDatetime": 1705989600000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "79098855-0459-4f26-877b-039700e098b3",
"selector": ".result-search-block",
"noResultsSelector": ".no-results",
"profile": {
"name": {
"selector": ".//p[@class='ellipsis pull-left']"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Quick People Trace",
"url": "quickpeopletrace.com",
"version": "0.1.5",
"version": "0.2.0",
"parent": "peoplefinders.com",
"addedDatetime": 1674540000000,
"steps": [
Expand All @@ -18,6 +18,7 @@
"actionType": "extract",
"id": "54cdba05-95bd-4142-b97c-4cafc59059df",
"selector": "//table/tbody/tr[position() > 1]",
"noResultsSelector": "//div[contains(@class, 'alert') and contains(text(), 'no results')]",
"profile": {
"name": {
"selector": ".//td[2]"
Expand Down
Loading

0 comments on commit f46502e

Please sign in to comment.