Skip to content

Commit

Permalink
[RFR] Download questionnaire template (#777)
Browse files Browse the repository at this point in the history
* Download questionnaire template

Signed-off-by: Nandini Chandra <[email protected]>

* Format files

Signed-off-by: Nandini Chandra <[email protected]>

* Minor changes

Signed-off-by: Nandini Chandra <[email protected]>

* Cleanup downloaded file

Signed-off-by: Nandini Chandra <[email protected]>

---------

Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr authored Oct 30, 2023
1 parent 7dc9bc9 commit 41884bb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { AssessmentQuestionnaire } from "../../../models/administration/assessment_questionnaire/assessment_questionnaire";
import { cleanupDownloads, click, login } from "../../../../utils/utils";
import { downloadYamlTemplate } from "../../../views/assessmentquestionnaire.view";

describe(["@tier3"], "Miscellaneous Questinnaire tests", () => {
before("Login", function () {
login();
});

it("Download YAML template", function () {
AssessmentQuestionnaire.open();
click(downloadYamlTemplate);
cy.readFile("cypress/downloads/questionnaire-template.yaml").should(
"contain",
"Test questionnaire (SAMPLE)"
);
});

after("Cleaning up", function () {
cleanupDownloads();
});
});
1 change: 1 addition & 0 deletions cypress/e2e/views/assessmentquestionnaire.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export const questionnaireUpload = "input#yamlFile-file-upload-filename";
export const confirmDeletion = "#confirm-deletion-input";
export const importQuestionnaire = "#import-questionnaire";
export const switchToggle = ".pf-v5-c-switch__toggle";
export const downloadYamlTemplate = "#download-yaml-template";

0 comments on commit 41884bb

Please sign in to comment.