Skip to content
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

Add New Cypress Test for Verifying Notice Board Functionality #9041

Closed
nihal467 opened this issue Nov 7, 2024 · 3 comments · Fixed by #9045
Closed

Add New Cypress Test for Verifying Notice Board Functionality #9041

nihal467 opened this issue Nov 7, 2024 · 3 comments · Fixed by #9045
Assignees

Comments

@nihal467
Copy link
Member

nihal467 commented Nov 7, 2024

Description

Add a new Cypress test to verify the notice board function for sending a message.

General Instruction

  • Use all reusable functions from the commands.ts file and other existing tests.
  • To understand if a custom function used in other existing tests exists, search using their element ID in the codebase.
  • Use the POM approach; refer to the Patient_Spec folder for guidance.
  • Add necessary API verifications and verify notifications and text to avoid flaky tests.
  • Add the new test in the FacilityHomepage.cy.ts file and create a new file FacilityNotify.ts in the pageobject folder

Context About Notice Board

This feature is used exclusively by the admin to send messages to facilities through the platform. The message will be received by all linked IDs, but they will not be able to reply to it.

Workflow Of the Notice Board

  • Log in as a district admin, load the page, and search for the facility "dummy facility 40".
  • Assert the text in the facility card for the facility name and the visibility of the notify board button.
  • Click on the notify button and verify the pop-up displays the facility name from the card.
  • Without typing anything, click on the notify button and verify it throws a front-end error since the field is blank.
  • Click the cancel button and verify the pop-up is closed.
  • Click the notify button again, type a message, and send it.
  • Once the message is sent, verify the necessary API is triggered using cy.intercept, and verify a notification is shown using cy.verifyNotification.
  • Log out, log in as dummynurse1, load the page, and open the notice board from the sidebar.
  • Verify the sent message is present in the notice board, then click on notifications from the sidebar and verify the message is present there as well.

Note: Note: Once the test is built, remove the two lines where we verify the notify button redirection in the existing test, "Verify the facility card button function."

@JavidSumra
Copy link
Contributor

Hey @nihal467 I would like to work on this issue can you please assign this issue to me

@JavidSumra
Copy link
Contributor

Hey @nihal467 can you please guide about the folder structure for this test suit?

@nihal467
Copy link
Member Author

nihal467 commented Nov 7, 2024

write the test file in the cypress/e2e/facility_spec/FacilityHomepage.cy.ts file and related new function you are creating, create a new file name FacilityNotify.ts in the folder cypress/pageobject/Facility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants