Fix Frontend pages tests (#2719)
* Fix Frontend pages tests Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> * Add SnackBarDecorator Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> * Fix more tests Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> * Fix more tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
@ -76,8 +76,8 @@ export const CreateProfile = () => {
|
||||
} = useForm<Form>({
|
||||
mode: 'onChange',
|
||||
defaultValues: {
|
||||
firstName: currentWorkspaceMember?.name.firstName ?? '',
|
||||
lastName: currentWorkspaceMember?.name.lastName ?? '',
|
||||
firstName: currentWorkspaceMember?.name?.firstName ?? '',
|
||||
lastName: currentWorkspaceMember?.name?.lastName ?? '',
|
||||
},
|
||||
resolver: zodResolver(validationSchema),
|
||||
});
|
||||
|
||||
@ -3,13 +3,19 @@ import { within } from '@storybook/testing-library';
|
||||
|
||||
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
|
||||
import { PageDecoratorArgs } from '~/testing/decorators/PageDecorator';
|
||||
import { RelationPickerDecorator } from '~/testing/decorators/RelationPickerDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { NotFound } from '../NotFound';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/NotFound/Default',
|
||||
component: NotFound,
|
||||
decorators: [ComponentWithRouterDecorator],
|
||||
decorators: [
|
||||
ComponentWithRouterDecorator,
|
||||
SnackBarDecorator,
|
||||
RelationPickerDecorator,
|
||||
],
|
||||
args: {
|
||||
routePath: 'toto-not-found',
|
||||
},
|
||||
|
||||
@ -22,9 +22,9 @@ export const TasksEffect = () => {
|
||||
value: currentWorkspaceMember.id,
|
||||
operand: ViewFilterOperand.Is,
|
||||
displayValue:
|
||||
currentWorkspaceMember.name.firstName +
|
||||
currentWorkspaceMember.name?.firstName +
|
||||
' ' +
|
||||
currentWorkspaceMember.name.lastName,
|
||||
currentWorkspaceMember.name?.lastName,
|
||||
displayAvatarUrl: currentWorkspaceMember.avatarUrl ?? undefined,
|
||||
definition: tasksFilterDefinitions[0],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user