From 8bdd346f9f3d46e8ae1b789ddd236a2f82356a71 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 9 Aug 2023 12:33:15 +0100 Subject: [PATCH] test problems --- __tests__/auth/register.test.jsx | 54 ++++++++++++++++++++++++- app/layout.js | 1 + components/auth/LoginForm.jsx | 8 +++- components/auth/resetPortal.js | 6 ++- components/auth/signUpForm.jsx | 22 ++++++---- components/header/header.jsx | 6 +-- components/header/settingsHamburger.jsx | 2 +- contexts/books.jsx | 3 +- styles/globals.css | 16 ++++---- styles/header.css | 2 +- 10 files changed, 91 insertions(+), 29 deletions(-) diff --git a/__tests__/auth/register.test.jsx b/__tests__/auth/register.test.jsx index 2e2e4cd..62f3ab9 100644 --- a/__tests__/auth/register.test.jsx +++ b/__tests__/auth/register.test.jsx @@ -1,7 +1,57 @@ - +import { screen,render, getByRole, getByText,waitFor, act } from "@testing-library/react" +import userEvent from '@testing-library/user-event'; +import ReactThemeProvider from "@/components/theme/themeReact/reactThemeProvider" +import IsAUserLoggedInProvider from "@/contexts/authContext" +import FireBooksProvider from "@/contexts/fireBooks" +import NotificationProvider from "@/contexts/notificationContext" +import DataProvider from "@/contexts/dataContext" +import BookProvider from "@/contexts/books" +import ThemeLayout from "@/components/theme/themeReact/themelayout" +import Header from "@/components/header/header" +import Footer from "@/components/footer/footer" +import LoginPage from "@/app/login/page"; +import RootLayout from "@/app/layout"; +import SignUpPage from "@/app/signup/page"; describe('resgister a user tests',()=>{ describe('rendering tests',()=>{ - it('should have') + it('should enter correct info',async ()=>{ + + let component = null + await act(async()=>{ + component = render( + + + + + + + + + {/*
*/} + + + +