From 9eaed52ba99b8897a6050bacdad04909eef09b6a Mon Sep 17 00:00:00 2001 From: Afzal Khan Date: Thu, 4 Jul 2024 14:30:54 +0530 Subject: [PATCH] [GSoC'24] M1.3 and M1.6: Add acceptance test for curriculum admin and logged-out user CUJ (#20584) * Fix part of #19849: Add acceptance test for classroom admin and classrooms * fix test * fix test * minor fixes * add topic with name * remove extra module * remove duplicate e2e test * add test for M1.6 * fix test * fix test * fix mapping * fix test * fix linter * fix test * fix mapping * fix linter * remove 2 test case * fix linter * remove unused code * fix classroom test * fix goto --- .eslintrc | 1 - .../classroom-admin-page.component.html | 5 +- .../create-new-classroom-modal.component.html | 2 +- ...ete-classroom-confirm-modal.component.html | 4 +- ...-dependency-graph-viz-modal.component.html | 6 +- .../classroom-page.component.html | 4 +- .../error-pages/error-page.component.html | 8 +- .../ci-test-suite-configs/acceptance.json | 8 + core/tests/ci-test-suite-configs/e2e.json | 4 - .../data/classroom-banner.png | Bin 0 -> 272097 bytes .../create-edit-and-delete-classroom.spec.ts | 98 +++++++ .../visit-classroom-index-page.spec.ts | 53 ++++ .../utilities/common/test-constants.ts | 5 + .../utilities/user/curriculum-admin.ts | 250 +++++++++++++++++- .../utilities/user/logged-out-user.ts | 90 +++++++ .../test-to-modules-matcher.ts | 2 +- .../create-edit-and-delete-classroom.txt | 5 + .../visit-classroom-index-page.txt | 1 + core/tests/wdio.conf.js | 4 - .../classroomPageFileUploadFeatures.js | 126 --------- .../webdriverio_utils/DiagnosticTestPage.js | 2 +- scripts/common.py | 2 + 22 files changed, 528 insertions(+), 152 deletions(-) create mode 100644 core/tests/puppeteer-acceptance-tests/data/classroom-banner.png create mode 100644 core/tests/puppeteer-acceptance-tests/specs/curriculum-admin/create-edit-and-delete-classroom.spec.ts create mode 100644 core/tests/puppeteer-acceptance-tests/specs/logged-out-user/visit-classroom-index-page.spec.ts create mode 100644 core/tests/test-modules-mappings/acceptance/curriculum-admin/create-edit-and-delete-classroom.txt create mode 100644 core/tests/test-modules-mappings/acceptance/logged-out-user/visit-classroom-index-page.txt delete mode 100644 core/tests/webdriverio_desktop/classroomPageFileUploadFeatures.js diff --git a/.eslintrc b/.eslintrc index e8865a8e0616..cf9e7d18c95f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -75,7 +75,6 @@ "additionalPlayerFeatures.js", "adminTabFeatures.js", "classroomPage.js", - "classroomPageFileUploadFeatures.js", "collections.js", "contributorDashboard.js", "coreEditorAndPlayerFeatures.js", diff --git a/core/templates/pages/classroom-admin-page/classroom-admin-page.component.html b/core/templates/pages/classroom-admin-page/classroom-admin-page.component.html index be8fdf59768b..646e47cabcf6 100644 --- a/core/templates/pages/classroom-admin-page/classroom-admin-page.component.html +++ b/core/templates/pages/classroom-admin-page/classroom-admin-page.component.html @@ -17,7 +17,7 @@

Classroom details

- + {{ classroom.value }} @@ -27,6 +27,7 @@

Classroom details

[New Classroom]
-
diff --git a/core/templates/pages/classroom-admin-page/modals/topic-dependency-graph-viz-modal.component.html b/core/templates/pages/classroom-admin-page/modals/topic-dependency-graph-viz-modal.component.html index bca6251cdf85..790580971975 100644 --- a/core/templates/pages/classroom-admin-page/modals/topic-dependency-graph-viz-modal.component.html +++ b/core/templates/pages/classroom-admin-page/modals/topic-dependency-graph-viz-modal.component.html @@ -1,4 +1,4 @@ -