Skip to content

Commit

Permalink
fix cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
emyl3 committed Jun 23, 2023
1 parent 3d35210 commit a91fcd7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cypress/e2e/03-add_devices.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ describe("Adding covid only and multiplex devices", () => {
});

context("Manage facilities - add devices", () => {
let covidDeviceName, multiplexDeviceName;

before(() => {
cy.task("getCovidOnlyDeviceName").then((name) => {
covidDeviceName = name;
});
cy.task("getMultiplexDeviceName").then((name) => {
multiplexDeviceName = name;
});
})
beforeEach(() => {
cy.makePOSTRequest({
operationName: "GetManagedFacilities",
Expand All @@ -85,11 +95,10 @@ describe("Adding covid only and multiplex devices", () => {
cy.contains("Manage devices");
cy.injectSRAxe();
cy.checkA11y();
cy.get('input[role="combobox"]').first().type(covidOnlyDevice.name);
cy.get('input[role="combobox"]').first().type(covidDeviceName);
cy.get('li[id="multi-select-deviceTypes-list--option-0"]').click();
cy.get('input[role="combobox"]').first().type(multiplexDevice.name);
cy.get('input[role="combobox"]').first().type(multiplexDeviceName);
cy.get('li[id="multi-select-deviceTypes-list--option-0"]').click();
cy.contains("Save changes").click();
cy.get(".modal__content")
.find("fieldset")
.each((fieldset) => {
Expand Down

0 comments on commit a91fcd7

Please sign in to comment.