-
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
#3729 - CAS Integration 3B - Create New Site (Supplier found, Multiple Sites / No matching address) #3884
Conversation
sources/packages/backend/libs/integrations/src/cas/cas.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/integrations/src/cas/cas.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/integrations/src/cas/cas.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/integrations/src/cas/models/cas-service.model.ts
Outdated
Show resolved
Hide resolved
...services/cas-supplier/cas-evaluation-result-processor/cas-active-supplier-found-processor.ts
Outdated
Show resolved
Hide resolved
...services/cas-supplier/cas-evaluation-result-processor/cas-active-supplier-found-processor.ts
Outdated
Show resolved
Hide resolved
...services/cas-supplier/cas-evaluation-result-processor/cas-active-supplier-found-processor.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/integrations/src/cas/models/cas-service.model.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/queue-consumers/test/helpers/mock-utils/cas-response.factory.ts
Outdated
Show resolved
Hide resolved
...processors/schedulers/cas-integration/_tests_/cas-supplier-integration.scheduler.e2e-spec.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/queue-consumers/test/helpers/mock-utils/cas-response.factory.ts
Outdated
Show resolved
Hide resolved
...processors/schedulers/cas-integration/_tests_/cas-supplier-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
...processors/schedulers/cas-integration/_tests_/cas-supplier-integration.scheduler.e2e-spec.ts
Show resolved
Hide resolved
Nice work. Please take a look at the comments. |
sources/packages/backend/libs/integrations/src/cas/cas.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/integrations/src/cas/cas.service.ts
Outdated
Show resolved
Hide resolved
...processors/schedulers/cas-integration/_tests_/cas-supplier-integration.scheduler.e2e-spec.ts
Outdated
Show resolved
Hide resolved
jest.resetAllMocks(); | ||
}); | ||
|
||
it("Should invoke CAS API createSiteForExistingSupplier with formatted payload when all data was provided as expected.", async () => { |
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 adding the unit test ❤️
Please use user friendly description. createSiteForExistingSupplier
-> create site for existing supplier
sources/packages/backend/apps/queue-consumers/test/helpers/mock-utils/cas-response.factory.ts
Show resolved
Hide resolved
sources/packages/backend/apps/queue-consumers/test/helpers/mock-utils/cas-response.factory.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/apps/queue-consumers/test/helpers/mock-utils/cas-response.factory.ts
Outdated
Show resolved
Hide resolved
let result: CreateExistingSupplierSiteResponse; | ||
try { | ||
const address = studentSupplier.address; | ||
result = await this.casService.createSiteForExistingSupplier({ |
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.
👍
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.
Nice work @lewischen-aot , please work on the comments given.
* Data used during the creation of a supplier and site on CAS for existing suppliers. | ||
*/ | ||
export class CreateExistingSupplierAndSiteSubmittedData { | ||
SupplierName?: string; |
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 believe supplier name is no more required here.
Promise.resolve( | ||
createFakeCASSupplierResponse({ | ||
initialValues: { | ||
status: "INACTIVE", // The status is set to "INACTIVE" to mismatch the address. |
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.
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.
One minor comment and a E2E test needs to be updated. Approving as main code doesn't have any blockers.
Please take care of the 2 last comments.
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, nice work @lewischen-aot. Approving ignoring the duplication
Quality Gate failedFailed conditions |
createExistingSupplierSite
call on CAS service.