Skip to content

Commit

Permalink
Merge pull request #3183 from HHS/update-user-ids-for-stg
Browse files Browse the repository at this point in the history
fix: update user test data with ids
  • Loading branch information
johndeange authored Dec 5, 2024
2 parents d025186 + 22e19cc commit 881b2b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions backend/data_tools/data/user_data.json5
Original file line number Diff line number Diff line change
Expand Up @@ -560,14 +560,16 @@
oidc_id: "00000000-0000-1111-a111-000000000026",
status: "LOCKED"
},
{ // 527
{
id: 287,
first_name: "Amare",
last_name: "Beza",
email: "[email protected]",
roles: [{"tablename": "role", "id": 2}],
status: "ACTIVE"
},
{ // 528
{
id: 68,
first_name: "Sheila",
last_name: "Celentano",
email: "[email protected]",
Expand Down
7 changes: 3 additions & 4 deletions backend/ops_api/tests/ops/users/test_users_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,12 @@ def test_get_all_users(auth_client, loaded_db):
response = auth_client.get(url_for("api.users-group"))
assert response.status_code == 200
assert len(response.json) > 1
expected_user = loaded_db.get(User, 500)
expected_user = loaded_db.get(User, 68)
assert response.json[0]["id"] == expected_user.id
assert response.json[0]["status"] == expected_user.status.name
assert response.json[0]["display_name"] == expected_user.display_name
assert response.json[0]["division"] == expected_user.division
assert response.json[0]["email"] == expected_user.email
assert response.json[0]["oidc_id"] == str(expected_user.oidc_id)
assert response.json[0]["first_name"] == expected_user.first_name
assert response.json[0]["last_name"] == expected_user.last_name
assert response.json[0]["roles"] == [role.name for role in expected_user.roles]
Expand Down Expand Up @@ -213,7 +212,7 @@ def test_get_all_users_by_status(auth_client, loaded_db):

@pytest.mark.usefixtures("app_ctx")
def test_get_all_users_by_role(auth_client, loaded_db):
expected_user = loaded_db.get(User, 500)
expected_user = loaded_db.get(User, 68)
response = auth_client.get(url_for("api.users-group", roles=[role.name for role in expected_user.roles]))
assert response.status_code == 200
assert len(response.json) > 1
Expand Down Expand Up @@ -258,7 +257,7 @@ def test_get_all_users_safe_user(client, loaded_db, test_non_admin_user):
response = client.get(url_for("api.users-group"), headers={"Authorization": f"Bearer {str(access_token)}"})
assert response.status_code == 200
assert len(response.json) > 1
expected_user = loaded_db.get(User, 500)
expected_user = loaded_db.get(User, 68)
assert response.json[0]["id"] == expected_user.id
assert response.json[0]["full_name"] == expected_user.full_name
assert "status" not in response.json[0]
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/agreementList.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ it("the filter button works as expected", () => {
// check that the correct tags are displayed
cy.get("div").contains("Upcoming Need By Date: Current FY").should("exist");
cy.get("div").contains("Project: Human Services Interoperability Support").should("exist");
cy.get("div").contains("Project Officer: Chris Fortunato").should("exist");
cy.get("div").contains("Project Officer: Sheila Celentano").should("exist");
cy.get("div").contains("Type: Contract").should("exist");
cy.get("div").contains("Procurement Shop: Product Service Center").should("exist");
cy.get("div").contains("Budget Line Status: Draft").should("exist");
Expand Down

0 comments on commit 881b2b3

Please sign in to comment.