Open nihal467 opened 1 week ago
@nihal467 Can I work on this? Please assign it me.
Hey @nihal467,
I have started working on the issue, and I have written the test as below (I am attaching an image of the code I have written so far, which performs the following):
Verifying Shift Request Creation
I have also attached a video of this test performing successfully.
I know this isn’t perfect, but it is a starting point. Without knowing exactly what you expect, I wouldn't know what to modify. Could you let me know if there are any improvements or changes you'd like me to make?
One thing to mention is that I have hardcoded "Dummy Patient 16". Should I replace that by creating a new patient dynamically for the test, or is it fine to reference an existing one? Your thoughts on this would help guide the next steps.
https://github.com/user-attachments/assets/d53c6bb2-1427-41f7-b8de-1884c6606c7e
@Ayush1404
Hey @nihal467 , i understand the corrections that you suggested , sorry for the inconvinience . Here are the screenshots of the modified test file and some functions that i have added . It seems pretty modular now , still let me know if anything can be improved
i am confused about the third point that you added
which way should i write test for ? Thank you for your quick attention !
Description
Add a new cypress test for new shifting requests for a patient
General Note
Follow the Page Object Model (POM) approach. : reference Refer to commands.ts in the Cypress folder to understand existing reusable components. Use proper function names for easier code review. Since there's nothing related to shifting requests is currently present, create a new file named ShiftingRequest.cy.ts under the shifting_spec folder.
Steps to Assign a Shifting Request
Make sure to verify the below things
Ensure the normal workflow is functional. Edit the request form and verify the modification are reflected properly