From 35e5067331d0d23223bf1e1c52221a45161eac93 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Tue, 16 Jul 2024 16:17:12 +0200 Subject: [PATCH] Add cypress tests --- cypress/e2e/dashboard/dashboardExport.cy.js | 16 ++++++++++++---- server/locale/fr/LC_MESSAGES/django.mo | Bin 2855 -> 2904 bytes server/locale/fr/LC_MESSAGES/django.po | 3 +-- server/locale/it/LC_MESSAGES/django.po | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/dashboard/dashboardExport.cy.js b/cypress/e2e/dashboard/dashboardExport.cy.js index 565955db..de0be194 100644 --- a/cypress/e2e/dashboard/dashboardExport.cy.js +++ b/cypress/e2e/dashboard/dashboardExport.cy.js @@ -26,7 +26,7 @@ function getCurrentDate() { function verifyExportFileExists(fileName) { const downloadsFolder = Cypress.config("downloadsFolder"); cy.readFile( - path.join(downloadsFolder, `${fileName}_${getCurrentDate()}.xlsx`) + path.join(downloadsFolder, `${fileName}_${getCurrentDate()}.xlsx`), ).should("exist"); } @@ -39,7 +39,7 @@ function testExport(url, fileName) { describe("dashboardExport.cy.js", () => { beforeEach(() => { 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", () => { testExport( "/statistic/test-lehrgang/assignment", - "export_kompetenznachweis_elemente" + "export_kompetenznachweis_elemente", ); }); it("should download the feedback export", () => { testExport("/statistic/test-lehrgang/feedback", "export_feedback"); }); + + it("should download the person export", () => { + testExport("/statistic/dashboard/persons", "export_personen"); + }); }); describe("as trainer", () => { @@ -76,12 +80,16 @@ describe("dashboardExport.cy.js", () => { it("should download the competence elements export", () => { testExport( "/statistic/test-lehrgang/assignment", - "export_kompetenznachweis_elemente" + "export_kompetenznachweis_elemente", ); }); it("should download the feedback export", () => { testExport("/statistic/test-lehrgang/feedback", "export_feedback"); }); + + it("should download the person export", () => { + testExport("/statistic/dashboard/persons", "export_personen"); + }); }); }); diff --git a/server/locale/fr/LC_MESSAGES/django.mo b/server/locale/fr/LC_MESSAGES/django.mo index 31cad5f5592e86e242942c10a9703903a3f25e9f..bc305be390a05cf0208370290b7a2d2789bf66f5 100644 GIT binary patch delta 628 zcmY+=F-SsD6oBF5Q!6vIBvdq{%!<3y!#w9Lj76)M%^Gs38}FATruoj25SG2##oo76;2EXo)~* zmF6f~8rveG#U&{SqA4NzfA|jW{oeQP-Fx5nJqN8IeDh;X;hEx1@n#|-bC|Ulc;3;) zE++6B2k;N$=tf0`(L;?>sQc3BV;=SY0(w})5iIxPPk_4xhmaj$<9iBot{e(TZ+SGk!$P@D;TypID$Pp53ox zjjVKk88yKj2JVnO)XJ;KRyjbe_z2V3F!2oz5kH{I{qkf!yr5RzMedXz)B}HwHhm0; zePl^yaT(_^hx@pJSGbKmtl%cuuHYS3(cu#9Obv57xnMGh_oxSVP&@Ep?BN7);&jm} PMWlUVHKXmkos9njRMRz? diff --git a/server/locale/fr/LC_MESSAGES/django.po b/server/locale/fr/LC_MESSAGES/django.po index 3498fd8e..89cf1fae 100644 --- a/server/locale/fr/LC_MESSAGES/django.po +++ b/server/locale/fr/LC_MESSAGES/django.po @@ -162,10 +162,9 @@ msgid "Lehrvertragsnummer" msgstr "Numéro de contrat d'apprentissage" #: vbv_lernwelt/dashboard/person_export.py:16 -#, fuzzy #| msgid "export_anwesenheit" msgid "export_personen" -msgstr "export_presence" +msgstr "export_personnes" #: vbv_lernwelt/dashboard/person_export.py:68 msgid "Telefon" diff --git a/server/locale/it/LC_MESSAGES/django.po b/server/locale/it/LC_MESSAGES/django.po index 8aa12dea..4e1712ac 100644 --- a/server/locale/it/LC_MESSAGES/django.po +++ b/server/locale/it/LC_MESSAGES/django.po @@ -165,7 +165,7 @@ msgstr "Numero di contratto di tirocinio" #, fuzzy #| msgid "export_anwesenheit" msgid "export_personen" -msgstr "esportazione_presenza" +msgstr "esportazione_persone" #: vbv_lernwelt/dashboard/person_export.py:68 msgid "Telefon"