Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BB-9109] Set active courses as default in studio home #63

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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
Loading