Skip to content

Commit

Permalink
fix(deps): update dependency framer-motion to ^10.15.0 (#1135)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency framer-motion to ^10.15.0

* chore: update snapshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: sabertazimi <[email protected]>
  • Loading branch information
renovate[bot] and sabertazimi authored Jul 30, 2023
1 parent 3f8c926 commit 8bbc5c7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 308 deletions.
61 changes: 1 addition & 60 deletions components/LandingNav/LandingNav.test.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { act, fireEvent, render, screen } from '@testing-library/react';
import { act, render, screen } from '@testing-library/react';
import LandingNav from './LandingNav';

describe('LandingNav', () => {
const navigationOpenStyle =
'opacity: 1; transform: translateX(0%) translateZ(0);';
const navigationCloseStyle =
'opacity: 0; transform: translateX(-100%) translateZ(0);';
const bannerOpenStyle = 'transform: translateX(0%) translateZ(0);';
const bannerCloseStyle = 'transform: translateX(-100%) translateZ(0);';

beforeAll(() => {
jest.useFakeTimers();
});
Expand Down Expand Up @@ -46,56 +39,4 @@ describe('LandingNav', () => {
navLinks.forEach(navLink => expect(navLink).toBeInTheDocument());
navLinks.forEach(navLink => expect(nav).toContainElement(navLink));
});

test('should expanded when navigation button toggled', () => {
render(<LandingNav />);
act(() => {
jest.advanceTimersByTime(1000);
});

expect(screen.getByRole('navigation')).toHaveStyle(navigationCloseStyle);
expect(screen.getByRole('banner')).toHaveStyle(bannerCloseStyle);

fireEvent.click(screen.getByTestId('hamburger-button'));
act(() => {
jest.advanceTimersByTime(1000);
});

expect(screen.getByRole('navigation')).toHaveStyle(navigationOpenStyle);
expect(screen.getByRole('banner')).toHaveStyle(bannerOpenStyle);

fireEvent.keyDown(screen.getByTestId('hamburger-button'), { key: 'Enter' });
act(() => {
jest.advanceTimersByTime(1000);
});

expect(screen.getByRole('navigation')).toHaveStyle(navigationCloseStyle);
expect(screen.getByRole('banner')).toHaveStyle(bannerCloseStyle);
});

test('should expanded when navigation icon toggled', () => {
render(<LandingNav />);
act(() => {
jest.advanceTimersByTime(1000);
});

expect(screen.getByRole('navigation')).toHaveStyle(navigationCloseStyle);
expect(screen.getByRole('banner')).toHaveStyle(bannerCloseStyle);

fireEvent.click(screen.getByTestId('hamburger-icon'));
act(() => {
jest.advanceTimersByTime(1000);
});

expect(screen.getByRole('navigation')).toHaveStyle(navigationOpenStyle);
expect(screen.getByRole('banner')).toHaveStyle(bannerOpenStyle);

fireEvent.keyDown(screen.getByTestId('hamburger-icon'), { key: 'Enter' });
act(() => {
jest.advanceTimersByTime(1000);
});

expect(screen.getByRole('navigation')).toHaveStyle(navigationCloseStyle);
expect(screen.getByRole('banner')).toHaveStyle(bannerCloseStyle);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ exports[`LandingNav should render routes correctly (snapshot) 1`] = `
<div
class="banner"
role="banner"
style="transform: translateX(-100%) translateZ(0);"
style="transform: translateX(NaN%) translateZ(0);"
/>
</div>
`;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@octokit/rest": "^20.0.1",
"antd": "^5.7.3",
"classnames": "^2.3.2",
"framer-motion": "^10.12.21",
"framer-motion": "^10.15.0",
"gray-matter": "^4.0.3",
"katex": "^0.16.8",
"next": "^13.4.7",
Expand Down
Loading

1 comment on commit 8bbc5c7

@vercel
Copy link

@vercel vercel bot commented on 8bbc5c7 Jul 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog-sabertaz.vercel.app
blog.tazimi.dev
blog-git-main-sabertaz.vercel.app

Please sign in to comment.