Skip to content

Conversation

@Pikalot
Copy link
Collaborator

@Pikalot Pikalot commented Jul 31, 2025

frontend-test:
image

===================================================================================

api-test:
image

@Pikalot Pikalot changed the base branch from dev to devTA_mocking_branch July 31, 2025 06:56
@Pikalot Pikalot force-pushed the devTA_mocking_branch branch from f32e7b2 to 55a53dc Compare July 31, 2025 06:59
@Pikalot Pikalot force-pushed the devTA_audit_log branch 2 times, most recently from b5b7c47 to 90afe4d Compare July 31, 2025 07:22
@Pikalot Pikalot requested a review from evanugarte July 31, 2025 07:26
@Pikalot Pikalot changed the base branch from devTA_mocking_branch to dev July 31, 2025 07:28
@Pikalot Pikalot changed the base branch from dev to devTA_mocking_branch July 31, 2025 07:32
@Pikalot Pikalot requested review from adarshm11 and weslayer July 31, 2025 07:36
@Pikalot Pikalot force-pushed the devTA_audit_log branch 3 times, most recently from 01c3cc7 to 311d4a6 Compare July 31, 2025 07:59
@Pikalot Pikalot changed the base branch from devTA_mocking_branch to dev July 31, 2025 17:45
describe('When token and access level is valid - status code 200', () => {
beforeEach(() => {
setTokenStatus(true, { accessLevel: MEMBERSHIP_STATE.OFFICER });
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a beforeEach inside the test

Copy link
Collaborator Author

@Pikalot Pikalot Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid it won't work without this block, since the beforeEach in the outer loop overrides all token setup. If this approach slows down the performance badly, we can consider restructuring the test.

Copy link
Collaborator Author

@Pikalot Pikalot Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Removed the beforeEach() block and moved all 200-status-code test cases into the same describe block with other test cases.

details: {email: newUser.email },
});
}
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are these loops for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The loops create 63 records. The test checks that, when the query is empty, the route returns at most 50 records from the first page.

@Pikalot Pikalot force-pushed the devTA_audit_log branch 3 times, most recently from 95b0963 to 92b35b9 Compare August 1, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants