Skip to content

Commit

Permalink
fix: renaming slot
Browse files Browse the repository at this point in the history
  • Loading branch information
kiram15 committed Feb 12, 2025
1 parent 46a02dc commit ec8e31e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/containers/Dashboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { reduxHooks } from 'hooks';
import { RequestKeys } from 'data/constants/requests';
import SelectSessionModal from 'containers/SelectSessionModal';
import CoursesPanel from 'containers/CoursesPanel';
import EnterpriseDashboardModalSlot from 'plugin-slots/EnterpriseDashboardModalSlot';
import DashboardModalSlot from 'plugin-slots/DashboardModalSlot';

import LoadingView from './LoadingView';
import DashboardLayout from './DashboardLayout';
Expand All @@ -24,7 +24,7 @@ export const Dashboard = () => {
<h1 className="sr-only">{pageTitle}</h1>
{!initIsPending && (
<>
{hasAvailableDashboards && <EnterpriseDashboardModalSlot />}
{hasAvailableDashboards && <DashboardModalSlot />}
{(hasCourses && showSelectSessionModal) && <SelectSessionModal />}
</>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/containers/Dashboard/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { reduxHooks } from 'hooks';

import SelectSessionModal from 'containers/SelectSessionModal';
import CoursesPanel from 'containers/CoursesPanel';
import EnterpriseDashboardModalSlot from 'plugin-slots/EnterpriseDashboardModalSlot';
import DashboardModalSlot from 'plugin-slots/DashboardModalSlot';

import DashboardLayout from './DashboardLayout';
import LoadingView from './LoadingView';
Expand All @@ -20,7 +20,7 @@ jest.mock('hooks', () => ({
},
}));

jest.mock('plugin-slots/EnterpriseDashboardModalSlot', () => 'EnterpriseDashboardModalSlot');
jest.mock('plugin-slots/DashboardModalSlot', () => 'DashboardModalSlot');
jest.mock('containers/CoursesPanel', () => 'CoursesPanel');
jest.mock('./LoadingView', () => 'LoadingView');
jest.mock('./DashboardLayout', () => 'DashboardLayout');
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Dashboard', () => {
testContent(contentEl);
});
it(`${renderString(showEnterpriseModal)} dashbaord modal`, () => {
expect(wrapper.instance.findByType(EnterpriseDashboardModalSlot).length)
expect(wrapper.instance.findByType(DashboardModalSlot).length)
.toEqual(showEnterpriseModal ? 1 : 0);
});
it(`${renderString(showSelectSessionModal)} select session modal`, () => {
Expand Down
4 changes: 2 additions & 2 deletions src/plugin-slots/EnterpriseDashboardModalSlot/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Course Card Action Slot

### Slot ID: `enterprise_dashboard_modal_slot`
### Slot ID: `dashboard_modal_slot`

## Description

Expand All @@ -13,7 +13,7 @@ import { EnterpriseDashboardModal } from '@edx/frontend-plugin-learner-dashboard

const config = {
pluginSlots: {
enterprise_dashboard_modal_slot: {
dashboard_modal_slot: {
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
Expand Down
2 changes: 1 addition & 1 deletion src/plugin-slots/EnterpriseDashboardModalSlot/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { PluginSlot } from '@openedx/frontend-plugin-framework';

const EnterpriseDashboardModal = () => (
<PluginSlot id="enterprise_dashboard_modal_slot" />
<PluginSlot id="dashboard_modal_slot" />
);

export default EnterpriseDashboardModal;
2 changes: 1 addition & 1 deletion src/plugin-slots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* [`widget_sidebar_slot`](./WidgetSidebarSlot/)
* [`course_list_slot`](./CourseListSlot/)
* [`no_courses_view_slot`](./NoCoursesViewSlot/)
* [`enterprise_dashboard_modal_slot](./EnterpriseDashboardModalSlot)
* [`dashboard_modal_slot](./DashboardModalSlot)

0 comments on commit ec8e31e

Please sign in to comment.