Prefill workspace invitation email (#7174) (#8826)

Prefill workspace invitation email, fixes #7174

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com>
This commit is contained in:
eliasylonen
2024-12-02 14:22:53 +01:00
committed by GitHub
parent 2b0f67191a
commit b6701a81e1
8 changed files with 39 additions and 30 deletions

View File

@ -10,7 +10,7 @@ import { useAuth } from '@/auth/hooks/useAuth';
import { authProvidersState } from '@/client-config/states/authProvidersState';
import { billingState } from '@/client-config/states/billingState';
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
import { isSignInPrefilledState } from '@/client-config/states/isSignInPrefilledState';
import { isDeveloperDefaultSignInPrefilledState } from '@/client-config/states/isDeveloperDefaultSignInPrefilledState';
import { supportChatState } from '@/client-config/states/supportChatState';
import { email, mocks, password, results, token } from '../__mocks__/useAuth';
@ -78,7 +78,9 @@ describe('useAuth', () => {
const icons = useRecoilValue(iconsState);
const authProviders = useRecoilValue(authProvidersState);
const billing = useRecoilValue(billingState);
const isSignInPrefilled = useRecoilValue(isSignInPrefilledState);
const isDeveloperDefaultSignInPrefilled = useRecoilValue(
isDeveloperDefaultSignInPrefilledState,
);
const supportChat = useRecoilValue(supportChatState);
const isDebugMode = useRecoilValue(isDebugModeState);
return {
@ -88,7 +90,7 @@ describe('useAuth', () => {
icons,
authProviders,
billing,
isSignInPrefilled,
isDeveloperDefaultSignInPrefilled,
supportChat,
isDebugMode,
},
@ -119,7 +121,7 @@ describe('useAuth', () => {
sso: false,
});
expect(state.billing).toBeNull();
expect(state.isSignInPrefilled).toBe(false);
expect(state.isDeveloperDefaultSignInPrefilled).toBe(false);
expect(state.supportChat).toEqual({
supportDriver: 'none',
supportFrontChatId: null,