Say remote not asked on the Companies line, show a failing search on its row, forget a removed search's record, and mark a read that asked nothing as not closing
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ad47605fd
commit
a63eed2e56
10 files changed
+66
-36
No files matched your search
@@ -53,7 +53,7 @@ def _row(client: TestClient) -> dict[str, object]:
|
||||
def test_a_company_row_says_what_its_board_is_asked_for(client: TestClient, bosch: int) -> None:
|
||||
row = _row(client)
|
||||
# SmartRecruiters cannot ask for remote, so only the country is asked.
|
||||
assert (row["reach"], row["reach_params"]) == ("follows agents: DK · all roles", {})
|
||||
assert (row["reach"], row["reach_params"]) == ("follows agents: DK · remote not asked on SmartRecruiters · all roles", {})
|
||||
|
||||
|
||||
def test_a_boards_own_reach_is_kept_in_its_params_and_wins(
|
||||
@@ -61,14 +61,14 @@ def test_a_boards_own_reach_is_kept_in_its_params_and_wins(
|
||||
res = client.post(f"/api/sources/{bosch}/reach",
|
||||
json={"mode": "own", "countries": ["de", "se"], "remote": True})
|
||||
assert res.status_code == 200, res.text
|
||||
assert res.json()["reach"] == "set here: DE, SE · all roles"
|
||||
assert res.json()["reach"] == "set here: DE, SE · remote not asked on SmartRecruiters · all roles"
|
||||
sub = store.subscription(bosch)
|
||||
assert sub is not None
|
||||
assert sub.params == {"note": "kept", "countries": ["DE", "SE"], "remote": True}
|
||||
assert _row(client)["reach_params"] == {"countries": ["DE", "SE"], "remote": True}
|
||||
|
||||
res = client.post(f"/api/sources/{bosch}/reach", json={"mode": "agents"})
|
||||
assert res.json()["reach"] == "follows agents: DK · all roles"
|
||||
assert res.json()["reach"] == "follows agents: DK · remote not asked on SmartRecruiters · all roles"
|
||||
assert store.subscription(bosch).params == {"note": "kept"} # type: ignore[union-attr]
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ def test_all_roles_is_its_own_switch_and_on_queues_a_pull(
|
||||
row = _row(client)
|
||||
# The narrow reach takes no terms, so on its own it changes nothing today.
|
||||
assert (row["all_countries"], row["all_roles"], row["reach"]) == (
|
||||
False, True, "follows agents: DK · all roles")
|
||||
False, True, "follows agents: DK · remote not asked on SmartRecruiters · all roles")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path, setter", [("all-countries", "set_all_countries"),
|
||||
@@ -136,7 +136,7 @@ def test_turning_an_override_off_queues_nothing(
|
||||
assert res.status_code == 200
|
||||
assert (res.json()["all_countries"], res.json()["all_roles"]) == (0, 0)
|
||||
assert app.state.queue.jobs.last("pull", states=_ANY_STATE) is None
|
||||
assert _row(client)["reach"] == "follows agents: DK · all roles"
|
||||
assert _row(client)["reach"] == "follows agents: DK · remote not asked on SmartRecruiters · all roles"
|
||||
assert client.post(f"/api/companies/nobody/{path}", json={"on": True}).status_code == 404
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user