Skip to content

Commit

Permalink
fix: Set active courses as default in studio home
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulkark committed Sep 2, 2024
1 parent 735d978 commit 5969060
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ exports[`CoursesFilters snapshot 1`] = `
id="dropdown-toggle-course-type-menu"
type="button"
>
All courses
Active
</button>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`CoursesTypesFilterMenu snapshot 1`] = `
id="dropdown-toggle-course-type-menu"
type="button"
>
All courses
Active
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const CoursesTypesFilterMenu = ({ onItemMenuSelected }) => {
id="dropdown-toggle-course-type-menu"
menuItems={courseTypes}
onItemMenuSelected={handleCourseTypeSelected}
defaultItemSelectedText={intl.formatMessage(messages.coursesTypesFilterMenuAllCurses)}
defaultItemSelectedText={intl.formatMessage(messages.coursesTypesFilterMenuActiveCurses)}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ describe('CoursesTypesFilterMenu', () => {
const { defaultMessage: activeCoursesMenuText } = message.coursesTypesFilterMenuActiveCurses;
const { defaultMessage: allCoursesMenuText } = message.coursesTypesFilterMenuAllCurses;
const { defaultMessage: archiveCoursesMenuText } = message.coursesTypesFilterMenuArchivedCurses;
const activeCoursesMenuItem = screen.getByText(activeCoursesMenuText);
const allCoursesMenuItem = screen.getByTestId('item-menu-all-courses');
const activeCoursesMenuItem = screen.getByTestId('item-menu-active-courses');
const allCoursesMenuItem = screen.getByText(allCoursesMenuText);
const archiveCoursesMenuItem = screen.getByText(archiveCoursesMenuText);
expect(activeCoursesMenuItem).toBeInTheDocument();
expect(allCoursesMenuItem.textContent).toContain(allCoursesMenuText);
expect(activeCoursesMenuItem.textContent).toContain(activeCoursesMenuText);
expect(allCoursesMenuItem).toBeInTheDocument();
expect(archiveCoursesMenuItem).toBeInTheDocument();
});

Expand Down

0 comments on commit 5969060

Please sign in to comment.