Skip to content

Commit

Permalink
refactor: use autofix for public api
Browse files Browse the repository at this point in the history
  • Loading branch information
sashtje committed Sep 27, 2023
1 parent d546891 commit 37c3b3e
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 23 deletions.
2 changes: 2 additions & 0 deletions src/entities/Article/testing.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { articleDetailsReducer } from './model/slice/articleDetailsSlice';
export type { Article } from './model/types/article';
export { ArticleBlockType, ArticleType } from './model/consts/consts';
1 change: 1 addition & 0 deletions src/entities/Country/testing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Country } from './model/types/country';
1 change: 1 addition & 0 deletions src/entities/Currency/testing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Currency } from './model/types/currency';
1 change: 1 addition & 0 deletions src/entities/Profile/testing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { Profile } from './model/types/profile';
4 changes: 2 additions & 2 deletions src/entities/Profile/ui/ProfileCard/ProfileCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ComponentMeta, ComponentStory } from '@storybook/react';

import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { ProfileCard } from './ProfileCard';

Expand Down
2 changes: 2 additions & 0 deletions src/entities/User/testing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { UserRole } from './model/consts/consts';
export { userActions } from './model/slice/userSlice';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react';
import withMock from 'storybook-addon-mock';

import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator';
import { Article } from '@/entities/Article';
import { Article } from '@/entities/Article/testing';

import { ArticleRecommendationsList } from './ArticleRecommendationsList';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { userActions } from '@/entities/User';
import { userActions } from '@/entities/User/testing';
import { TestAsyncThunk } from '@/shared/lib/tests/testAsyncThunk/TestAsyncThunk';

import { loginByUsername } from './loginByUsername';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ComponentMeta, ComponentStory } from '@storybook/react';

import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator';
import { UserRole } from '@/entities/User';
import { UserRole } from '@/entities/User/testing';

import { AvatarDropdown } from './AvatarDropdown';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StateSchema } from '@/app/providers/StoreProvider';
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { getProfileData } from './getProfileData';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StateSchema } from '@/app/providers/StoreProvider';
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { getProfileForm } from './getProfileForm';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestAsyncThunk } from '@/shared/lib/tests/testAsyncThunk/TestAsyncThunk';
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { fetchProfileData } from './fetchProfileData';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestAsyncThunk } from '@/shared/lib/tests/testAsyncThunk/TestAsyncThunk';
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { ValidateProfileError } from '../../consts/consts';
import { updateProfileData } from './updateProfileData';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { ValidateProfileError } from '../../consts/consts';
import { validateProfileData } from './validateProfileData';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';

import { ValidateProfileError } from '../consts/consts';
import { updateProfileData } from '../services/updateProfileData/updateProfileData';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import { componentRender } from '@/shared/lib/tests/componentRender/componentRender';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country';
import { Profile } from '@/entities/Profile';
import { Currency } from '@/entities/Currency/testing';
import { Country } from '@/entities/Country/testing';
import { Profile } from '@/entities/Profile/testing';
import { $api } from '@/shared/api/api';

import { profileReducer } from '../../model/slice/profileSlice';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ComponentMeta, ComponentStory } from '@storybook/react';

import { Article, ArticleBlockType, ArticleType } from '@/entities/Article';
import { Article, ArticleBlockType, ArticleType } from '@/entities/Article/testing';
import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator';

import { ArticleDetailsPage } from './ArticleDetailsPage';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/ProfilePage/ui/ProfilePage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react';

import { ThemeDecorator } from '@/shared/config/storybook/ThemeDecorator/ThemeDecorator';
import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator';
import { Country } from '@/entities/Country';
import { Currency } from '@/entities/Currency';
import { Country } from '@/entities/Country/testing';
import { Currency } from '@/entities/Currency/testing';
import { Theme } from '@/shared/const/theme';

import { ProfilePage } from './ProfilePage';
Expand Down

0 comments on commit 37c3b3e

Please sign in to comment.