Add cypress tests
This commit is contained in:
parent
dc4af21e00
commit
35e5067331
|
|
@ -26,7 +26,7 @@ function getCurrentDate() {
|
||||||
function verifyExportFileExists(fileName) {
|
function verifyExportFileExists(fileName) {
|
||||||
const downloadsFolder = Cypress.config("downloadsFolder");
|
const downloadsFolder = Cypress.config("downloadsFolder");
|
||||||
cy.readFile(
|
cy.readFile(
|
||||||
path.join(downloadsFolder, `${fileName}_${getCurrentDate()}.xlsx`)
|
path.join(downloadsFolder, `${fileName}_${getCurrentDate()}.xlsx`),
|
||||||
).should("exist");
|
).should("exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ function testExport(url, fileName) {
|
||||||
describe("dashboardExport.cy.js", () => {
|
describe("dashboardExport.cy.js", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.manageCommand(
|
cy.manageCommand(
|
||||||
"cypress_reset --create-assignment-evaluation --create-feedback-responses --create-course-completion-performance-criteria --create-attendance-days"
|
"cypress_reset --create-assignment-evaluation --create-feedback-responses --create-course-completion-performance-criteria --create-attendance-days",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -55,13 +55,17 @@ describe("dashboardExport.cy.js", () => {
|
||||||
it("should download the competence elements export", () => {
|
it("should download the competence elements export", () => {
|
||||||
testExport(
|
testExport(
|
||||||
"/statistic/test-lehrgang/assignment",
|
"/statistic/test-lehrgang/assignment",
|
||||||
"export_kompetenznachweis_elemente"
|
"export_kompetenznachweis_elemente",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should download the feedback export", () => {
|
it("should download the feedback export", () => {
|
||||||
testExport("/statistic/test-lehrgang/feedback", "export_feedback");
|
testExport("/statistic/test-lehrgang/feedback", "export_feedback");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should download the person export", () => {
|
||||||
|
testExport("/statistic/dashboard/persons", "export_personen");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("as trainer", () => {
|
describe("as trainer", () => {
|
||||||
|
|
@ -76,12 +80,16 @@ describe("dashboardExport.cy.js", () => {
|
||||||
it("should download the competence elements export", () => {
|
it("should download the competence elements export", () => {
|
||||||
testExport(
|
testExport(
|
||||||
"/statistic/test-lehrgang/assignment",
|
"/statistic/test-lehrgang/assignment",
|
||||||
"export_kompetenznachweis_elemente"
|
"export_kompetenznachweis_elemente",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should download the feedback export", () => {
|
it("should download the feedback export", () => {
|
||||||
testExport("/statistic/test-lehrgang/feedback", "export_feedback");
|
testExport("/statistic/test-lehrgang/feedback", "export_feedback");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should download the person export", () => {
|
||||||
|
testExport("/statistic/dashboard/persons", "export_personen");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -162,10 +162,9 @@ msgid "Lehrvertragsnummer"
|
||||||
msgstr "Numéro de contrat d'apprentissage"
|
msgstr "Numéro de contrat d'apprentissage"
|
||||||
|
|
||||||
#: vbv_lernwelt/dashboard/person_export.py:16
|
#: vbv_lernwelt/dashboard/person_export.py:16
|
||||||
#, fuzzy
|
|
||||||
#| msgid "export_anwesenheit"
|
#| msgid "export_anwesenheit"
|
||||||
msgid "export_personen"
|
msgid "export_personen"
|
||||||
msgstr "export_presence"
|
msgstr "export_personnes"
|
||||||
|
|
||||||
#: vbv_lernwelt/dashboard/person_export.py:68
|
#: vbv_lernwelt/dashboard/person_export.py:68
|
||||||
msgid "Telefon"
|
msgid "Telefon"
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ msgstr "Numero di contratto di tirocinio"
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "export_anwesenheit"
|
#| msgid "export_anwesenheit"
|
||||||
msgid "export_personen"
|
msgid "export_personen"
|
||||||
msgstr "esportazione_presenza"
|
msgstr "esportazione_persone"
|
||||||
|
|
||||||
#: vbv_lernwelt/dashboard/person_export.py:68
|
#: vbv_lernwelt/dashboard/person_export.py:68
|
||||||
msgid "Telefon"
|
msgid "Telefon"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue