diff --git a/cypress/e2e/course_creation.cy.js b/cypress/e2e/course_creation.cy.js index 28b97041..2530b3db 100644 --- a/cypress/e2e/course_creation.cy.js +++ b/cypress/e2e/course_creation.cy.js @@ -1,12 +1,15 @@ describe("Course Creation", () => { it("creates a new course", () => { cy.login(); - cy.wait(1000); + cy.wait(500); cy.visit("/lms/courses"); + // Close onboarding modal + cy.closeOnboardingModal(); + // Create a course cy.get("button").contains("New").click(); - cy.wait(1000); + cy.wait(500); cy.url().should("include", "/courses/new/edit"); cy.get("label").contains("Title").type("Test Course"); @@ -96,7 +99,8 @@ describe("Course Creation", () => { // View Course cy.wait(1000); cy.visit("/lms"); - cy.wait(500); + cy.closeOnboardingModal(); + cy.url().should("include", "/lms/courses"); cy.get(".grid a:first").within(() => { cy.get("div").contains("Test Course"); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c8dd5cd5..d32be479 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -25,6 +25,7 @@ // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) import "cypress-file-upload"; +import "cypress-real-events"; Cypress.Commands.add("login", (email, password) => { if (!email) { @@ -68,3 +69,11 @@ Cypress.Commands.add("paste", { prevSubject: true }, (subject, text) => { element.dispatchEvent(event); }); }); + +Cypress.Commands.add("closeOnboardingModal", () => { + cy.wait(500); + cy.get('[class*="z-50"]') + .find('button:has(svg[class*="feather-x"])') + .realClick(); + cy.wait(1000); +}); diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 7bdb98c6..ec2677b1 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -52,6 +52,7 @@ declare module 'vue' { Evaluators: typeof import('./src/components/Evaluators.vue')['default'] Event: typeof import('./src/components/Modals/Event.vue')['default'] ExplanationVideos: typeof import('./src/components/Modals/ExplanationVideos.vue')['default'] + FeedbackModal: typeof import('./src/components/Modals/FeedbackModal.vue')['default'] FrappeCloudIcon: typeof import('./src/components/Icons/FrappeCloudIcon.vue')['default'] IconPicker: typeof import('./src/components/Controls/IconPicker.vue')['default'] IndicatorIcon: typeof import('./src/components/Icons/IndicatorIcon.vue')['default'] diff --git a/frontend/package.json b/frontend/package.json index 0a45681d..5c3c8bd2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -27,7 +27,7 @@ "codemirror-editor-vue3": "^2.8.0", "dayjs": "^1.11.6", "feather-icons": "^4.28.0", - "frappe-ui": "^0.1.143", + "frappe-ui": "^0.1.146", "highlight.js": "^11.11.1", "lucide-vue-next": "^0.383.0", "markdown-it": "^14.0.0", diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index 94a5b8f6..2d1508b6 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -181,7 +181,6 @@ import UserDropdown from '@/components/UserDropdown.vue' import CollapseSidebar from '@/components/Icons/CollapseSidebar.vue' import SidebarLink from '@/components/SidebarLink.vue' -import { useStorage } from '@vueuse/core' import { ref, onMounted, inject, watch, reactive, markRaw, h } from 'vue' import { getSidebarLinks } from '../utils' import { usersStore } from '@/stores/user' @@ -244,6 +243,7 @@ const iconProps = { onMounted(() => { addNotifications() setSidebarLinks() + setUpOnboarding() socket.on('publish_lms_notifications', (data) => { unreadNotifications.reload() }) @@ -388,10 +388,6 @@ const deletePage = (link) => { ) } -const getSidebarFromStorage = () => { - return useStorage('sidebar_is_collapsed', false) -} - const toggleSidebar = () => { sidebarStore.isSidebarCollapsed = !sidebarStore.isSidebarCollapsed localStorage.setItem( diff --git a/frontend/src/components/BatchFeedback.vue b/frontend/src/components/BatchFeedback.vue index 0ea90014..1ee5a7f3 100644 --- a/frontend/src/components/BatchFeedback.vue +++ b/frontend/src/components/BatchFeedback.vue @@ -1,44 +1,49 @@