diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0b8f7a4..bfe2b8b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: pull_request: {} jobs: tests: + name: Server Tests runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/cypress/e2e/batch_creation.cy.js b/cypress/e2e/batch_creation.cy.js index 12a50d3a..f0fe6ed1 100644 --- a/cypress/e2e/batch_creation.cy.js +++ b/cypress/e2e/batch_creation.cy.js @@ -54,25 +54,21 @@ describe("Batch Creation", () => { cy.get("button").contains("Create").click(); cy.get("span").contains("New Batch").click(); cy.wait(500); - cy.url().should("include", "/batches/new/edit"); cy.get("label").contains("Title").type("Test Batch"); - cy.get("label").contains("Start Date").type("2030-10-01"); cy.get("label").contains("End Date").type("2030-10-31"); cy.get("label").contains("Start Time").type("10:00"); cy.get("label").contains("End Time").type("11:00"); cy.get("label").contains("Timezone").type("IST"); cy.get("label").contains("Seat Count").type("10"); - cy.get("label").contains("Published").click(); cy.get("label") - .contains("Short Description") + .contains("Description") .type("Test Batch Short Description to test the UI"); cy.get("div[contenteditable=true").invoke( "text", "Test Batch Description. I need a very big description to test the UI. This is a very big description. It contains more than once sentence. Its meant to be this long as this is a UI test. Its unbearably long and I'm not sure why I'm typing this much. I'm just going to keep typing until I feel like its long enough. I think its long enough now. I'm going to stop typing now." ); - /* Instructor */ cy.get("label") .contains("Instructors") @@ -90,13 +86,14 @@ describe("Batch Creation", () => { cy.get("[id^=headlessui-combobox-option-").first().click(); }); }); - + cy.button("Save").click(); + cy.get("label").contains("Published").click(); cy.button("Save").click(); cy.wait(1000); let batchName; cy.url().then((url) => { console.log(url); - batchName = url.split("/").pop(); + batchName = url.split("/").pop().split("#")[0]; cy.wrap(batchName).as("batchName"); }); cy.wait(500); @@ -115,7 +112,7 @@ describe("Batch Creation", () => { .click(); cy.get("@batchName").then((batchName) => { - cy.get(`a[href='/lms/batches/details/${batchName}'`).within(() => { + cy.get(`a[href='/lms/batches/${batchName}'`).within(() => { cy.get("div").contains("Test Batch").should("be.visible"); cy.get("div") .contains("Test Batch Short Description to test the UI") @@ -132,7 +129,7 @@ describe("Batch Creation", () => { "be.visible" ); }); - cy.get(`a[href='/lms/batches/details/${batchName}'`).click(); + cy.get(`a[href='/lms/batches/${batchName}'`).click(); }); cy.get("div").contains("Test Batch").should("be.visible"); @@ -154,14 +151,14 @@ describe("Batch Creation", () => { "Test Batch Description. I need a very big description to test the UI. This is a very big description. It contains more than once sentence. Its meant to be this long as this is a UI test. Its unbearably long and I'm not sure why I'm typing this much. I'm just going to keep typing until I feel like its long enough. I think its long enough now. I'm going to stop typing now." ) .should("be.visible"); - cy.get("button:visible").contains("Manage Batch").click(); + cy.get("button:visible").contains("Dashboard").click(); /* Add student to batch */ - cy.get("button").contains("Students").click(); - cy.get("button").contains("Add").click(); + cy.get("button").contains("Enroll").click(); cy.get('div[role="dialog"]') .first() - .find("input[id^='headlessui-combobox-input-v-']") + .find("div[label='Student']") + .find("div") .first() .click(); cy.get("input[placeholder='Search']").type(randomEmail); @@ -169,7 +166,7 @@ describe("Batch Creation", () => { cy.get("button").contains("Submit").click(); // Verify Seat Count - cy.get("span").contains("Details").click(); + cy.get("button:visible").contains("Overview").click(); cy.contains("div:visible", "9 Seats Left").should("be.visible"); }); }); diff --git a/cypress/e2e/course_creation.cy.js b/cypress/e2e/course_creation.cy.js index de0113fe..b5f5ae73 100644 --- a/cypress/e2e/course_creation.cy.js +++ b/cypress/e2e/course_creation.cy.js @@ -53,7 +53,7 @@ describe("Course Creation", () => { }); }); - cy.button("Create").last().click(); + cy.button("Save").last().click(); // Edit Course Details cy.wait(500); @@ -65,12 +65,9 @@ describe("Course Creation", () => { .contains("Category") .parent() .within(() => { - cy.get("input").click(); + cy.get("button").click(); }); - cy.get("[id^=headlessui-combobox-option-") - .should("be.visible") - .first() - .click(); + cy.get("div").contains("Business").click(); cy.get("label").contains("Published").click(); cy.get("label").contains("Published On").type("2021-01-01"); diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 2ce38f23..42b89f05 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -8,14 +8,10 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { - AdminBatchDashboard: typeof import('./src/components/AdminBatchDashboard.vue')['default'] - Annoucements: typeof import('./src/components/Annoucements.vue')['default'] - AnnouncementModal: typeof import('./src/components/Modals/AnnouncementModal.vue')['default'] Apps: typeof import('./src/components/Sidebar/Apps.vue')['default'] AppSidebar: typeof import('./src/components/Sidebar/AppSidebar.vue')['default'] AssessmentModal: typeof import('./src/components/Modals/AssessmentModal.vue')['default'] AssessmentPlugin: typeof import('./src/components/AssessmentPlugin.vue')['default'] - Assessments: typeof import('./src/components/Assessments.vue')['default'] Assignment: typeof import('./src/components/Assignment.vue')['default'] AssignmentForm: typeof import('./src/components/Modals/AssignmentForm.vue')['default'] AudioBlock: typeof import('./src/components/AudioBlock.vue')['default'] @@ -24,16 +20,8 @@ declare module 'vue' { BadgeAssignments: typeof import('./src/components/Settings/BadgeAssignments.vue')['default'] BadgeForm: typeof import('./src/components/Settings/BadgeForm.vue')['default'] Badges: typeof import('./src/components/Settings/Badges.vue')['default'] - BatchCard: typeof import('./src/components/BatchCard.vue')['default'] BatchCourseModal: typeof import('./src/components/Modals/BatchCourseModal.vue')['default'] - BatchCourses: typeof import('./src/components/BatchCourses.vue')['default'] - BatchDashboard: typeof import('./src/components/BatchDashboard.vue')['default'] - BatchFeedback: typeof import('./src/components/BatchFeedback.vue')['default'] - BatchOverlay: typeof import('./src/components/BatchOverlay.vue')['default'] - BatchStudentProgress: typeof import('./src/components/Modals/BatchStudentProgress.vue')['default'] - BatchStudents: typeof import('./src/components/BatchStudents.vue')['default'] BrandSettings: typeof import('./src/components/Settings/BrandSettings.vue')['default'] - BulkCertificates: typeof import('./src/components/Modals/BulkCertificates.vue')['default'] Categories: typeof import('./src/components/Settings/Categories.vue')['default'] CertificationLinks: typeof import('./src/components/CertificationLinks.vue')['default'] ChapterModal: typeof import('./src/components/Modals/ChapterModal.vue')['default'] @@ -82,7 +70,6 @@ declare module 'vue' { LessonContent: typeof import('./src/components/LessonContent.vue')['default'] LessonHelp: typeof import('./src/components/LessonHelp.vue')['default'] Link: typeof import('./src/components/Controls/Link.vue')['default'] - LiveClass: typeof import('./src/components/LiveClass.vue')['default'] LiveClassAttendance: typeof import('./src/components/Modals/LiveClassAttendance.vue')['default'] LiveClassModal: typeof import('./src/components/Modals/LiveClassModal.vue')['default'] LMSLogo: typeof import('./src/components/Icons/LMSLogo.vue')['default'] diff --git a/frontend/package.json b/frontend/package.json index c12ee444..fc19b151 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -51,12 +51,12 @@ "vuedraggable": "4.1.0" }, "devDependencies": { - "@vitejs/plugin-vue": "5.0.3", + "@vitejs/plugin-vue": "5.0.3", "autoprefixer": "10.4.2", "postcss": "8.4.5", "tailwindcss": "^3.4.15", "unplugin-auto-import": "^20.3.0", "vite": "5.0.11", - "vite-plugin-pwa": "0.15.0" + "vite-plugin-pwa": "^1.2.0" } } diff --git a/frontend/src/components/AdminBatchDashboard.vue b/frontend/src/components/AdminBatchDashboard.vue deleted file mode 100644 index 4ed419d9..00000000 --- a/frontend/src/components/AdminBatchDashboard.vue +++ /dev/null @@ -1,118 +0,0 @@ - - diff --git a/frontend/src/components/Annoucements.vue b/frontend/src/components/Annoucements.vue deleted file mode 100644 index 16ca3e41..00000000 --- a/frontend/src/components/Annoucements.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/frontend/src/components/AssessmentPlugin.vue b/frontend/src/components/AssessmentPlugin.vue index 53b51392..6f6a15f6 100644 --- a/frontend/src/components/AssessmentPlugin.vue +++ b/frontend/src/components/AssessmentPlugin.vue @@ -64,8 +64,8 @@ import { Dialog, FormControl } from 'frappe-ui' import { nextTick, onMounted, ref } from 'vue' import { useRoute } from 'vue-router' -import { Link } from 'frappe-ui/frappe' import { getLmsRoute } from '@/utils/basePath' +import Link from '@/components/Controls/Link.vue' const show = ref(false) const quiz = ref(null) diff --git a/frontend/src/components/Assignment.vue b/frontend/src/components/Assignment.vue index 356da1bf..80611b05 100644 --- a/frontend/src/components/Assignment.vue +++ b/frontend/src/components/Assignment.vue @@ -16,8 +16,8 @@ {{ __('Submission by') }} {{ submissionResource.doc?.member_name }} -
- {{ __('Question') }}: +
+ {{ __('Assignment Question') }}
{{ submissionResource.doc?.status }} -
@@ -73,12 +77,14 @@ }}
- diff --git a/frontend/src/components/Modals/EvaluationModal.vue b/frontend/src/components/Modals/EvaluationModal.vue index cbc86f99..afb1916d 100644 --- a/frontend/src/components/Modals/EvaluationModal.vue +++ b/frontend/src/components/Modals/EvaluationModal.vue @@ -55,6 +55,9 @@ +
+ {{ __('Please select a course to view available slots.') }} +
{{ __('No slots available for the selected course.') }}
diff --git a/frontend/src/components/Modals/FeedbackModal.vue b/frontend/src/components/Modals/FeedbackModal.vue index c7318e48..b69d6615 100644 --- a/frontend/src/components/Modals/FeedbackModal.vue +++ b/frontend/src/components/Modals/FeedbackModal.vue @@ -7,7 +7,7 @@ > diff --git a/frontend/src/components/Modals/VideoStatistics.vue b/frontend/src/components/Modals/VideoStatistics.vue index 9b72d96b..19929634 100644 --- a/frontend/src/components/Modals/VideoStatistics.vue +++ b/frontend/src/components/Modals/VideoStatistics.vue @@ -3,7 +3,7 @@ v-model="show" :options="{ size: '4xl', - title: __('Video Statistics for {0}').format(lessonTitle), + title: __('Video Statistics'), }" > -
+ diff --git a/frontend/src/components/Modals/AnnouncementModal.vue b/frontend/src/pages/Batches/components/AnnouncementModal.vue similarity index 100% rename from frontend/src/components/Modals/AnnouncementModal.vue rename to frontend/src/pages/Batches/components/AnnouncementModal.vue diff --git a/frontend/src/pages/Batches/components/Announcements.vue b/frontend/src/pages/Batches/components/Announcements.vue new file mode 100644 index 00000000..7b0a65af --- /dev/null +++ b/frontend/src/pages/Batches/components/Announcements.vue @@ -0,0 +1,58 @@ + + + diff --git a/frontend/src/components/Assessments.vue b/frontend/src/pages/Batches/components/Assessments.vue similarity index 90% rename from frontend/src/components/Assessments.vue rename to frontend/src/pages/Batches/components/Assessments.vue index f8b71c76..7e2c7200 100644 --- a/frontend/src/components/Assessments.vue +++ b/frontend/src/pages/Batches/components/Assessments.vue @@ -1,7 +1,7 @@