OUTDATED: QA Framework: Overview of Frontend Test Steps
To complete each Test, you will need to do the following within our main QA Framework Repo:
Create Your Feature File
Create a Feature File folder for the test you need. This Feature File will contain the Gherkin steps you write next): qaframework/tree/master/src/test/resources/features Look around the other folders for example ocl-client, refapp2.x and refapp3.x(microfrontends). Make sure your Feature File is in a folder structure that makes logical sense so it will be easy for someone else to find this in the future.
Write out the steps in Gherkin Syntax and add these to the Feature File in the correct location here
Guidance here: https://cucumber.io/docs/gherkin/reference/ (steps in the feature file should be in the Gherkin BDD language, using "Given" "When") and more detailed guidance here: https://automationpanda.com/2017/01/30/bdd-101-writing-good-gherkin/
Example 1: RefApp 2.x Login Test written in Gherkin syntax
Example 2: Using Gherkin with a Cypress test
Automate these Steps with Cypress
Define where you're writing the Automation steps (e.g. Example])
See more detailed guidance at QA Framework Technical documentation (Cucumber-Selenium & Cucumber-Cypress Set up)
Other Helpful Links
Tips for Cypress tests for React Apps: https://css-tricks.com/using-cypress-to-write-tests-for-a-react-application/
Sample commit using Cypress + Cucumber: https://github.com/openmrs/openmrs-ocl-client/pull/595/files
General demo of using Cypress (without using the Cucumber Framework): https://iu.mediaspace.kaltura.com/media/t/1_mnruasd8?st=665