-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1723 - E2E/Units Tests - Review Workers E2E Tests #1941
Conversation
...kers/src/controllers/application/_tests_/e2e/application.controller-updateStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...kers/src/controllers/application/_tests_/e2e/application.controller-updateStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...kers/src/controllers/application/_tests_/e2e/application.controller-updateStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...kers/src/controllers/application/_tests_/e2e/application.controller-updateStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...llers/application/_tests_/e2e/application.controller-verifyApplicationExceptions.e2e-spec.ts
Show resolved
Hide resolved
...llers/application/_tests_/e2e/application.controller-verifyApplicationExceptions.e2e-spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not part of the PR since the main goal was to start the E2E for workers but the scenario where "The exceptions were already processed for this application." is important to ensure the idempotency of the process.
We can add it to this PR os create a new ticket to capture the next ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a test for this case: "Should not create an application exception when there is already one for the application."
...kers/src/controllers/application/_tests_/e2e/application.controller-updateStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...es/backend/apps/workers/src/controllers/application/_tests_/e2e/update-application-status.ts
Show resolved
Hide resolved
|
||
describe("Disbursement Schedule Service - Create disbursement", () => { | ||
let userRepo: Repository<User>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great simplification. This one serves as an example of how the use of the E2EDataSources
can make the E2E code cleaner 😉
...llers/disbursement/_tests_/e2e/disbursement.controller.saveDisbursementSchedules.e2e-spec.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/workers/src/testHelpers/testing-modules/testing-modules-helper.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/test-utils/src/factories/supporting-user.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/test-utils/src/factories/supporting-user.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/test-utils/src/factories/supporting-user.ts
Outdated
Show resolved
Hide resolved
...info-request/_tests_/e2e/program-info-request.controller-updateApplicationStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...info-request/_tests_/e2e/program-info-request.controller-updateApplicationStatus.e2e-spec.ts
Outdated
Show resolved
Hide resolved
...lers/supporting-user/_test_/e2e/supporting-user.controller.createSupportingUsers.e2e-spec.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/test-utils/src/factories/supporting-user.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the changes. Please take a look at the last minor comments.
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the changes 👍 Good work @andrepestana-aot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the changes, looks good 👍
apps/workers/src/controllers/program-info-request/tests/e2e/program-info-request.controller-updateApplicationStatus.e2e-spec.ts
ProgramInfoRequestController(e2e)-updateApplicationStatus
✓ Should update application PIR status when not set. (67 ms)
✓ Should not update application PIR status when already set. (22 ms)
✓ Should have job error status when could not find the application. (2 ms)
apps/workers/src/controllers/supporting-user/test/e2e/supporting-user.controller.createSupportingUsers.e2e-spec.ts
SupportingUserController(e2e)-createSupportingUsers
✓ Should create parent supporting users when requested. (87 ms)
✓ Should create partner supporting user when requested. (39 ms)
✓ Should not create supporting users when application already has one. (45 ms)
apps/workers/src/controllers/application/tests/e2e/application.controller-updateStatus.e2e-spec.ts
ApplicationController(e2e)-updateStatus
✓ Should update application status when it receives the correct original status. (80 ms)
✓ Should not update application status and return error when it does not receive the correct original status. (35 ms)
✓ Should return error when it does not find the application. (2 ms)
apps/workers/src/controllers/application/tests/e2e/application.controller-verifyApplicationExceptions.e2e-spec.ts
ApplicationController(e2e)-verifyApplicationExceptions
✓ Should create and associate application exceptions when there are some exceptions for the application. (57 ms)
✓ Should not create any application exception when there is no application exception in application data. (13 ms)
✓ Should return error when it does not find the application. (3 ms)
apps/workers/test/app.e2e-spec.ts
WorkersController (e2e)
✓ Should be able to initialize workers module (564 ms)