Add ability to remove profile picture on Profile Settings (#538)
* Add ability to remove profile picture on Profile Settings * Fix lint * Fix according to review
This commit is contained in:
@ -16,7 +16,7 @@ import { MainButton } from '@/ui/components/buttons/MainButton';
|
||||
import { ImageInput } from '@/ui/components/inputs/ImageInput';
|
||||
import { TextInput } from '@/ui/components/inputs/TextInput';
|
||||
import { SubSectionTitle } from '@/ui/components/section-titles/SubSectionTitle';
|
||||
import { GET_CURRENT_USER } from '@/users/services';
|
||||
import { GET_CURRENT_USER } from '@/users/queries';
|
||||
import { useUpdateUserMutation } from '~/generated/graphql';
|
||||
|
||||
const StyledContentContainer = styled.div`
|
||||
|
||||
@ -13,7 +13,7 @@ import { MainButton } from '@/ui/components/buttons/MainButton';
|
||||
import { ImageInput } from '@/ui/components/inputs/ImageInput';
|
||||
import { TextInput } from '@/ui/components/inputs/TextInput';
|
||||
import { SubSectionTitle } from '@/ui/components/section-titles/SubSectionTitle';
|
||||
import { GET_CURRENT_USER } from '@/users/services';
|
||||
import { GET_CURRENT_USER } from '@/users/queries';
|
||||
import { useUpdateWorkspaceMutation } from '~/generated/graphql';
|
||||
|
||||
const StyledContentContainer = styled.div`
|
||||
|
||||
31
front/src/pages/auth/__stories__/CreateProfile.stories.tsx
Normal file
31
front/src/pages/auth/__stories__/CreateProfile.stories.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { AuthModal } from '@/auth/components/ui/Modal';
|
||||
import { AuthLayout } from '@/ui/layout/AuthLayout';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { getRenderWrapperForPage } from '~/testing/renderWrappers';
|
||||
|
||||
import { CreateProfile } from '../CreateProfile';
|
||||
|
||||
const meta: Meta<typeof CreateProfile> = {
|
||||
title: 'Pages/Auth/CreateProfile',
|
||||
component: CreateProfile,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
export type Story = StoryObj<typeof CreateProfile>;
|
||||
|
||||
export const Default: Story = {
|
||||
render: getRenderWrapperForPage(
|
||||
<AuthLayout>
|
||||
<AuthModal>
|
||||
<CreateProfile />
|
||||
</AuthModal>
|
||||
</AuthLayout>,
|
||||
'/auth/create-profile',
|
||||
),
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
},
|
||||
};
|
||||
31
front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx
Normal file
31
front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { AuthModal } from '@/auth/components/ui/Modal';
|
||||
import { AuthLayout } from '@/ui/layout/AuthLayout';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { getRenderWrapperForPage } from '~/testing/renderWrappers';
|
||||
|
||||
import { CreateWorkspace } from '../CreateWorkspace';
|
||||
|
||||
const meta: Meta<typeof CreateWorkspace> = {
|
||||
title: 'Pages/Auth/CreateWorkspace',
|
||||
component: CreateWorkspace,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
export type Story = StoryObj<typeof CreateWorkspace>;
|
||||
|
||||
export const Default: Story = {
|
||||
render: getRenderWrapperForPage(
|
||||
<AuthLayout>
|
||||
<AuthModal>
|
||||
<CreateWorkspace />
|
||||
</AuthModal>
|
||||
</AuthLayout>,
|
||||
'/auth/create-workspace',
|
||||
),
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
},
|
||||
};
|
||||
11
front/src/pages/opportunities/__stories__/Opportunities.mdx
Normal file
11
front/src/pages/opportunities/__stories__/Opportunities.mdx
Normal file
@ -0,0 +1,11 @@
|
||||
{ /* Opportunities.mdx */ }
|
||||
|
||||
import { Canvas, Meta } from '@storybook/blocks';
|
||||
|
||||
import * as Opportunities from './Opportunities.stories';
|
||||
|
||||
<Meta of={Opportunities} />
|
||||
|
||||
# Opportunities View
|
||||
|
||||
<Canvas of={Opportunities.Default} />
|
||||
@ -0,0 +1,22 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { getRenderWrapperForPage } from '~/testing/renderWrappers';
|
||||
|
||||
import { Opportunities } from '../Opportunities';
|
||||
|
||||
const meta: Meta<typeof Opportunities> = {
|
||||
title: 'Pages/Opportunities',
|
||||
component: Opportunities,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
export type Story = StoryObj<typeof Opportunities>;
|
||||
|
||||
export const Default: Story = {
|
||||
render: getRenderWrapperForPage(<Opportunities />, '/opportunities'),
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
},
|
||||
};
|
||||
@ -77,7 +77,7 @@ export const CompanyName: Story = {
|
||||
delay: 200,
|
||||
});
|
||||
|
||||
await sleep(1000);
|
||||
await sleep(500);
|
||||
|
||||
const qontoChip = canvas
|
||||
.getAllByTestId('dropdown-menu-item')
|
||||
|
||||
@ -197,12 +197,14 @@ export const EditRelation: Story = {
|
||||
let secondRowCompanyCell = await canvas.findByText(
|
||||
mockedPeopleData[1].company.name,
|
||||
);
|
||||
await sleep(25);
|
||||
|
||||
await userEvent.click(secondRowCompanyCell);
|
||||
|
||||
secondRowCompanyCell = await canvas.findByText(
|
||||
mockedPeopleData[1].company.name,
|
||||
);
|
||||
await sleep(25);
|
||||
|
||||
await userEvent.click(secondRowCompanyCell);
|
||||
|
||||
@ -240,11 +242,13 @@ export const SelectRelationWithKeys: Story = {
|
||||
let firstRowCompanyCell = await canvas.findByText(
|
||||
mockedPeopleData[0].company.name,
|
||||
);
|
||||
await sleep(25);
|
||||
|
||||
await userEvent.click(firstRowCompanyCell);
|
||||
firstRowCompanyCell = await canvas.findByText(
|
||||
mockedPeopleData[0].company.name,
|
||||
);
|
||||
await sleep(25);
|
||||
await userEvent.click(firstRowCompanyCell);
|
||||
|
||||
const relationInput = await canvas.findByPlaceholderText('Search');
|
||||
|
||||
Reference in New Issue
Block a user