ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
249 stars 431 forks source link

Add Cypress test to verify error thrown for duplicate bed name #7206

Closed nihal467 closed 8 months ago

nihal467 commented 9 months ago

Describe the test Follow-up: https://github.com/coronasafe/care/pull/1783

Currently, the backend throws an error, if we create a duplicate bed name for the same location, so verify the same

Check-list

konavivekramakrishna commented 9 months ago

@nihal467 can you please assign me

konavivekramakrishna commented 8 months ago

@sainak

image

when creating bed with same name getting 500 instead of 4xx

konavivekramakrishna commented 8 months ago

https://care.ohc.network/facility/6762fa68-0f86-4135-a436-09d8c9e61073/location/6b5bbacc-4700-4655-a24f-65dc4287b564/beds/add

sainak commented 8 months ago

fixed in https://github.com/coronasafe/care/pull/1894

konavivekramakrishna commented 8 months ago

@nihal467

how is this new Cypress test different from the already existing Cypress test for verifying the creation of duplicate beds?

https://github.com/coronasafe/care_fe/blob/develop/cypress/e2e/facility_spec/locations.cy.ts#L87-L94

nihal467 commented 8 months ago

@konavivekramakrishna Sorry, my bad, the test already exist, so closing this issue and feel free to assign other open issue