Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pasindur2 committed Aug 30, 2022
1 parent c364b9f commit 5d7ab10
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
Expand Up @@ -23,10 +23,8 @@ When('the user search for {string}', patientName => {

Then('the result should be {string}', result => {
cy.contains(result);

});

after({tags: '@patient-involved'}, () => {
cy.deletePatient(patient_uuid);
});

@@ -1,9 +1,9 @@
import { Given, Before, When } from "cypress-cucumber-preprocessor/steps";
import { Given } from "cypress-cucumber-preprocessor/steps";

let identifier = null;
let patient = null;

Before({ tags: "@patient-conditions" }, () => {
before({ tags: "@patient-conditions" }, () => {
cy.generateIdentifier().then((generatedIdentifier) => {
identifier = generatedIdentifier;
cy.createPatient(identifier).then((generatedPatient) => {
Expand Down
@@ -1,9 +1,9 @@
import {Given} from 'cypress-cucumber-preprocessor/steps';
import { Given } from "cypress-cucumber-preprocessor/steps";

let identifier = null;
let patient = null;

before({tags: "@patient-allergies"}, () => {
before({ tags: "@patient-allergies" }, () => {
cy.generateIdentifier().then((generatedIdentifier) => {
identifier = generatedIdentifier;
cy.createPatient(identifier).then((generatedPatient) => {
Expand All @@ -12,20 +12,19 @@ before({tags: "@patient-allergies"}, () => {
});
});

Given("the user login to the Outpatient Clinic", () => {
Given("the user is logged in", () => {
cy.login();
});

Given("the user arrives on a patient’s summary page", () => {
cy.visit(`patient/${patient.uuid}/chart`);
});

When("the user clicks on Allergies tab", () => {
cy.contains("Allergies").click({force: true});
cy.contains("Allergies").click({ force: true });
});

Then('the empty allergies section should be displayed', () => {
Then("the empty allergies section should be displayed", () => {
cy.contains("There are no allergy intolerances to display for this patient");
//TODO: Allergies intolerances section is still under development.
//TODO: Record allergies intolerances test should be expand after the developments are over
});

// TODO: Record allergies
Expand Up @@ -3,6 +3,7 @@ Feature: Patient Search
Background:
Given the user login to the Outpatient Clinic

@patient-involved
Scenario Outline: Search for a patient
When the user search for "<patientName>"
Then the result should be "<result>"
Expand Down
@@ -1,13 +1,13 @@
Feature: User Logout
Feature: Patient Allergies

Background:
Given the user login to the Outpatient Clinic
Given the user is logged in
And the user arrives on a patient’s summary page

@patient-allergies
Scenario: able to view all recorders allergies and record a new allergy
When the user clicks on Allergies tab
Then the empty allergies section should be displayed
#Under development in O3
Scenario: Users are able to view all recorded allergies and record a new allergy
When the user clicks on Allergies tab
Then the empty allergies section should be displayed
#Todo
# When the user record an allergy intolerances
# Then the allergy should be recorded successfully

0 comments on commit 5d7ab10

Please sign in to comment.