Skip to content

Commit

Permalink
Merge pull request #372 from melfore/305-icon-restore-rotate-function
Browse files Browse the repository at this point in the history
[Icon] Fixed rotate function
  • Loading branch information
CrisGrud authored Jan 11, 2024
2 parents 9481045 + f1f18a6 commit e5b6763
Show file tree
Hide file tree
Showing 17 changed files with 218 additions and 245 deletions.
155 changes: 79 additions & 76 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,16 @@
"rimraf": "^5.0.5",
"semantic-release": "^22.0.6",
"storybook": "^7.5.2",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"@mui/system": "^5.15.4"
},
"peerDependencies": {
"@emotion/react": ">= 11.8.2 < 12",
"@emotion/styled": ">= 11.8.1 < 12",
"@mui/icons-material": ">= 5.5.1 < 6",
"@mui/material": ">= 5.5.3 < 6",
"@mui/x-date-pickers": ">= 6.16.0 < 7",
"@mui/system": ">= 5.15.4 < 6",
"luxon": ">= 3.4.3 < 4",
"react": ">= 18 < 19",
"react-dom": ">= 18 < 19",
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppBar/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { expect, jest } from "@storybook/jest";
import { Meta, StoryObj } from "@storybook/react";
import { configure, userEvent, within } from "@storybook/testing-library";
import { configure, fireEvent, within } from "@storybook/testing-library";

import { Icons } from "../../types/Icon";
import { getAllComposedDataCy, getComposedDataCy } from "../../utils";
Expand Down Expand Up @@ -170,7 +170,7 @@ export const TitleClickable: Story = {
return;
}

await userEvent.click(titleClickable);
fireEvent.click(titleClickable);
await expect(onTitleMock).toHaveBeenCalledTimes(onTitleMock.mock.calls.length);
},
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/BreadCrumbs/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import AccessibilityIcon from "@mui/icons-material/Accessibility";
import { expect, jest } from "@storybook/jest";
import { Meta, StoryObj } from "@storybook/react";
import { configure, userEvent, within } from "@storybook/testing-library";
import { configure, fireEvent, within } from "@storybook/testing-library";

import { Icons } from "../../types/Icon";
import { getComposedDataCy } from "../../utils";
Expand Down Expand Up @@ -67,7 +67,7 @@ export const Primary: Story = {
return;
}

await userEvent.click(firstLink);
fireEvent.click(firstLink);
await expect(onClickMock).toHaveBeenCalledTimes(onClickMock.mock.calls.length);
await expect(onClickMock).toHaveBeenCalledWith(linksMock[firstIndex].href);
});
Expand All @@ -80,7 +80,7 @@ export const Primary: Story = {
return;
}

await userEvent.click(lastLink);
fireEvent.click(lastLink);
await expect(onClickMock).toHaveBeenCalledTimes(onClickMock.mock.calls.length);
});
},
Expand Down
22 changes: 12 additions & 10 deletions src/components/Button/__snapshots__/index.stories.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,18 @@ exports[`Inputs/Button IconRotate smoke-test 1`] = `
data-cy="button"
>
<span class="MuiButton-startIcon MuiButton-iconSizeMedium css-mui-classname">
<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-mui-classname"
focusable="false"
aria-hidden="true"
viewbox="0 0 24 24"
data-testid="RefreshIcon"
data-cy="button-icon"
>
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z">
</path>
</svg>
<div class="MuiBox-root css-mui-classname">
<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-mui-classname"
focusable="false"
aria-hidden="true"
viewbox="0 0 24 24"
data-testid="RefreshIcon"
data-cy="button-icon"
>
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z">
</path>
</svg>
</div>
</span>
Loading
</button>
Expand Down
1 change: 0 additions & 1 deletion src/components/Card/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export const Collapsible: Story = {
if (!collapseButton) {
return;
}

await userEvent.click(collapseButton);
await expect(onClickMock).toHaveBeenCalledTimes(onClickMock.mock.calls.length);

Expand Down
Loading

0 comments on commit e5b6763

Please sign in to comment.