Skip to content

Commit

Permalink
fix: 568 - merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
KristiBo committed Oct 15, 2024
2 parents e3952b7 + 9798b14 commit 9b94fec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/app/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ html {

body {
font-family: $font-primary;
text-wrap: pretty;
}

* {
Expand Down
15 changes: 5 additions & 10 deletions src/widgets/upcoming-courses/ui/upcoming-courses.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,8 @@ const height = 900;
const widthMobile = tabletScreenBreakPoint;
const widthDesktop = widthMobile + 100;

vi.mock('@/app/hooks/use-data-by-name', () => {
return {
useDataByName: vi.fn().mockImplementation(() => ({
data: mockedData,
error: null,
loading: false,
})),
};
vi.mock('@/shared/helpers/getActualData', () => {
return { getActualData: vi.fn().mockImplementation(() => mockedData) };
});

vi.mock('@/shared/hooks/use-window-size', () => {
Expand All @@ -93,9 +87,10 @@ describe('Courses', () => {
});

it('renders no more than 5 course cards', () => {
const courseCards = screen.getByTestId('courses-list');
const coursesList = screen.getByTestId('courses-list');
const courseCardsWithoutButton = coursesList.children.length - 1;

expect(courseCards.children.length).toEqual(5);
expect(courseCardsWithoutButton).toEqual(5);
});

it('renders the Go to RS School button', () => {
Expand Down

0 comments on commit 9b94fec

Please sign in to comment.