From a16548bdde535b1c9d2c44a03ab792a29bd69e9d Mon Sep 17 00:00:00 2001 From: John DeAngelis Date: Thu, 5 Dec 2024 10:45:35 -0500 Subject: [PATCH 1/3] fix: update user test data with ids Signed-off-by: John DeAngelis --- backend/data_tools/data/user_data.json5 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/data_tools/data/user_data.json5 b/backend/data_tools/data/user_data.json5 index ae24d9c158..7b897efd08 100644 --- a/backend/data_tools/data/user_data.json5 +++ b/backend/data_tools/data/user_data.json5 @@ -560,14 +560,16 @@ oidc_id: "00000000-0000-1111-a111-000000000026", status: "LOCKED" }, - { // 527 + { + id: 287, first_name: "Amare", last_name: "Beza", email: "amare.beza@acf.hhs.gov", roles: [{"tablename": "role", "id": 2}], status: "ACTIVE" }, - { // 528 + { + id: 68, first_name: "Sheila", last_name: "Celentano", email: "sheila.celentano@acf.hhs.gov", From 069f88a41863c3bcf4e56949b6da67a66cc66be5 Mon Sep 17 00:00:00 2001 From: John DeAngelis Date: Thu, 5 Dec 2024 11:21:13 -0500 Subject: [PATCH 2/3] test: fix be tests due to user reordering Signed-off-by: John DeAngelis --- backend/ops_api/tests/ops/users/test_users_get.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/ops_api/tests/ops/users/test_users_get.py b/backend/ops_api/tests/ops/users/test_users_get.py index 0dd1551f96..c6f0af7ab9 100644 --- a/backend/ops_api/tests/ops/users/test_users_get.py +++ b/backend/ops_api/tests/ops/users/test_users_get.py @@ -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] @@ -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 @@ -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] From 22e19ccc2a0b47023a9a5ef6de52920d57d8d411 Mon Sep 17 00:00:00 2001 From: John DeAngelis Date: Thu, 5 Dec 2024 13:13:04 -0500 Subject: [PATCH 3/3] test: fix fe e2e user order Signed-off-by: John DeAngelis --- frontend/cypress/e2e/agreementList.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/agreementList.cy.js b/frontend/cypress/e2e/agreementList.cy.js index 7ccfe3c5a7..7ee04c45c2 100644 --- a/frontend/cypress/e2e/agreementList.cy.js +++ b/frontend/cypress/e2e/agreementList.cy.js @@ -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");