From ef3600d14ada83c0265f52f623e19b43793562d0 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Tue, 13 Dec 2022 02:01:01 +0100 Subject: [PATCH] Rebuild test-project fixture (#7123) * Rebuild test-project fixture * Manually tweak SignupPage --- .../migration.sql | 0 .../migration.sql | 0 __fixtures__/test-project/api/package.json | 2 +- .../test-project/api/src/services/posts/posts.scenarios.ts | 4 ++-- .../test-project/api/src/services/users/users.scenarios.ts | 4 ++-- __fixtures__/test-project/web/package.json | 2 +- __fixtures__/test-project/web/src/auth.ts | 6 ++++-- .../test-project/web/src/pages/LoginPage/LoginPage.tsx | 5 ++++- 8 files changed, 14 insertions(+), 9 deletions(-) rename __fixtures__/test-project/api/db/migrations/{20221212194250_create_post_user => 20221212235317_create_post_user}/migration.sql (100%) rename __fixtures__/test-project/api/db/migrations/{20221212194354_create_contact => 20221212235423_create_contact}/migration.sql (100%) diff --git a/__fixtures__/test-project/api/db/migrations/20221212194250_create_post_user/migration.sql b/__fixtures__/test-project/api/db/migrations/20221212235317_create_post_user/migration.sql similarity index 100% rename from __fixtures__/test-project/api/db/migrations/20221212194250_create_post_user/migration.sql rename to __fixtures__/test-project/api/db/migrations/20221212235317_create_post_user/migration.sql diff --git a/__fixtures__/test-project/api/db/migrations/20221212194354_create_contact/migration.sql b/__fixtures__/test-project/api/db/migrations/20221212235423_create_contact/migration.sql similarity index 100% rename from __fixtures__/test-project/api/db/migrations/20221212194354_create_contact/migration.sql rename to __fixtures__/test-project/api/db/migrations/20221212235423_create_contact/migration.sql diff --git a/__fixtures__/test-project/api/package.json b/__fixtures__/test-project/api/package.json index ab0ba666195a..9f659340f48d 100644 --- a/__fixtures__/test-project/api/package.json +++ b/__fixtures__/test-project/api/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@redwoodjs/api": "3.2.0", - "@redwoodjs/auth-dbauth-api": "4.0.0-canary.350+8de7b4460", + "@redwoodjs/auth-dbauth-api": "4.0.0-canary.358+bdea4808f", "@redwoodjs/graphql-server": "3.2.0" } } diff --git a/__fixtures__/test-project/api/src/services/posts/posts.scenarios.ts b/__fixtures__/test-project/api/src/services/posts/posts.scenarios.ts index bdf8b2757206..24e4248a86a6 100644 --- a/__fixtures__/test-project/api/src/services/posts/posts.scenarios.ts +++ b/__fixtures__/test-project/api/src/services/posts/posts.scenarios.ts @@ -10,7 +10,7 @@ export const standard = defineScenario({ body: 'String', author: { create: { - email: 'String7974442', + email: 'String2269056', hashedPassword: 'String', fullName: 'String', salt: 'String', @@ -24,7 +24,7 @@ export const standard = defineScenario({ body: 'String', author: { create: { - email: 'String3864724', + email: 'String1293889', hashedPassword: 'String', fullName: 'String', salt: 'String', diff --git a/__fixtures__/test-project/api/src/services/users/users.scenarios.ts b/__fixtures__/test-project/api/src/services/users/users.scenarios.ts index 74592d80cb5b..207651f71e44 100644 --- a/__fixtures__/test-project/api/src/services/users/users.scenarios.ts +++ b/__fixtures__/test-project/api/src/services/users/users.scenarios.ts @@ -6,7 +6,7 @@ export const standard = defineScenario({ user: { one: { data: { - email: 'String4212807', + email: 'String8692738', hashedPassword: 'String', fullName: 'String', salt: 'String', @@ -14,7 +14,7 @@ export const standard = defineScenario({ }, two: { data: { - email: 'String1888025', + email: 'String810758', hashedPassword: 'String', fullName: 'String', salt: 'String', diff --git a/__fixtures__/test-project/web/package.json b/__fixtures__/test-project/web/package.json index 897be6483c8b..051c02e6a075 100644 --- a/__fixtures__/test-project/web/package.json +++ b/__fixtures__/test-project/web/package.json @@ -13,7 +13,7 @@ ] }, "dependencies": { - "@redwoodjs/auth-dbauth-web": "4.0.0-canary.350+8de7b4460", + "@redwoodjs/auth-dbauth-web": "4.0.0-canary.358+bdea4808f", "@redwoodjs/forms": "3.2.0", "@redwoodjs/router": "3.2.0", "@redwoodjs/web": "3.2.0", diff --git a/__fixtures__/test-project/web/src/auth.ts b/__fixtures__/test-project/web/src/auth.ts index 4a620e5ecf37..c696d20f6baa 100644 --- a/__fixtures__/test-project/web/src/auth.ts +++ b/__fixtures__/test-project/web/src/auth.ts @@ -1,3 +1,5 @@ -import { createDbAuth } from '@redwoodjs/auth-dbauth-web' +import { createDbAuthClient, createDbAuth } from '@redwoodjs/auth-dbauth-web' -export const { AuthProvider, useAuth } = createDbAuth() +const dbAuthClient = createDbAuthClient() + +export const { AuthProvider, useAuth } = createDbAuth(dbAuthClient) diff --git a/__fixtures__/test-project/web/src/pages/LoginPage/LoginPage.tsx b/__fixtures__/test-project/web/src/pages/LoginPage/LoginPage.tsx index cecb3ac40656..d6562c8e50cf 100644 --- a/__fixtures__/test-project/web/src/pages/LoginPage/LoginPage.tsx +++ b/__fixtures__/test-project/web/src/pages/LoginPage/LoginPage.tsx @@ -30,7 +30,10 @@ const LoginPage = () => { }, []) const onSubmit = async (data: Record) => { - const response = await logIn({ ...data }) + const response = await logIn({ + username: data.username, + password: data.password, + }) if (response.message) { toast(response.message)