Enable E2E tests in CI

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-09-27 10:50:14 +02:00
parent 680f812bdf
commit 1087e19ee5
20 changed files with 374 additions and 281 deletions

View File

@@ -66,15 +66,7 @@ export async function updateLocale(locale: string) {
}));
}
export function registerAccount(
variables: {
preferredUsername: string;
name: string;
summary: string;
email: string;
},
userAlreadyActivated: boolean
) {
export function registerAccount() {
return useMutation<
{ registerPerson: IPerson },
{
@@ -84,12 +76,12 @@ export function registerAccount(
email: string;
}
>(REGISTER_PERSON, () => ({
variables,
update: (
store: ApolloCache<{ registerPerson: IPerson }>,
{ data: localData }: FetchResult
{ data: localData }: FetchResult,
{ context }
) => {
if (userAlreadyActivated) {
if (context?.userAlreadyActivated) {
const identitiesData = store.readQuery<{ identities: IPerson[] }>({
query: IDENTITIES,
});