diff --git a/public/images/about-hero.jpg b/public/images/about-hero.jpg new file mode 100644 index 0000000..f359d70 Binary files /dev/null and b/public/images/about-hero.jpg differ diff --git a/public/images/avatars/artisan-1.jpg b/public/images/avatars/artisan-1.jpg new file mode 100644 index 0000000..e96b679 Binary files /dev/null and b/public/images/avatars/artisan-1.jpg differ diff --git a/public/images/avatars/artisan-2.jpg b/public/images/avatars/artisan-2.jpg new file mode 100644 index 0000000..977660e Binary files /dev/null and b/public/images/avatars/artisan-2.jpg differ diff --git a/public/images/avatars/artisan-3.jpg b/public/images/avatars/artisan-3.jpg new file mode 100644 index 0000000..57060bd Binary files /dev/null and b/public/images/avatars/artisan-3.jpg differ diff --git a/public/images/avatars/artisan-4.jpg b/public/images/avatars/artisan-4.jpg new file mode 100644 index 0000000..aac4f9c Binary files /dev/null and b/public/images/avatars/artisan-4.jpg differ diff --git a/public/images/avatars/seller-main.jpg b/public/images/avatars/seller-main.jpg new file mode 100644 index 0000000..d12d4f0 Binary files /dev/null and b/public/images/avatars/seller-main.jpg differ diff --git a/public/images/login-potter.jpg b/public/images/login-potter.jpg new file mode 100644 index 0000000..6234517 Binary files /dev/null and b/public/images/login-potter.jpg differ diff --git a/public/images/signup-weaver.jpg b/public/images/signup-weaver.jpg new file mode 100644 index 0000000..b2a76e7 Binary files /dev/null and b/public/images/signup-weaver.jpg differ diff --git a/src/App.test.tsx b/src/App.test.tsx index 0782bc3..907fbcc 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -267,5 +267,34 @@ describe('Supplier Portal Onboarding & Active Dashboard Tests', () => { globalThis.fetch = originalFetch }) + + it('allows login directly without entering any password', async () => { + render() + + const loginBtn = screen.getByText(/^Login$/i) + fireEvent.click(loginBtn) + + const submitBtn = screen.getByRole('button', { name: /Sign In/i }) + fireEvent.click(submitBtn) + + expect(await screen.findByText(/Total Sales/i)).toBeInTheDocument() + }) + + it('allows signup without entering any password', async () => { + render() + + const getStartedBtn = screen.getByText(/^Get started$/i) + fireEvent.click(getStartedBtn) + + fireEvent.change(screen.getByPlaceholderText(/Enter your email/i), { target: { value: 'artisan_nopass@tradhox.com' } }) + fireEvent.change(screen.getByPlaceholderText(/9876543210/i), { target: { value: '9876543210' } }) + fireEvent.click(screen.getByLabelText(/I agree to the/i)) + + const alertMock = vi.spyOn(window, 'alert').mockImplementation(() => {}) + fireEvent.click(screen.getByRole('button', { name: /Create Account/i })) + + expect(await screen.findByText(/Welcome to Tradhox/i)).toBeInTheDocument() + alertMock.mockRestore() + }) }) diff --git a/src/App.tsx b/src/App.tsx index b1bdc81..4f3e283 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import PricingPage from './components/pages/PricingPage'; import GrowBusinessPage from './components/pages/GrowBusinessPage'; import AboutPage from './components/pages/AboutPage'; import ContactPage from './components/pages/ContactPage'; +import LoginPage from './components/pages/LoginPage'; import AuthForms from './components/pages/AuthForms'; import OnboardingWizard from './components/pages/OnboardingWizard'; import DashboardLayout from './components/dashboard/DashboardLayout'; @@ -30,10 +31,11 @@ function AppRouter() { {currentPage === 'how-it-works' && } {currentPage === 'pricing' && } {currentPage === 'grow-business' && } + {currentPage === 'signup' && } {currentPage === 'profile-completion' && } {currentPage === 'about' && } {currentPage === 'contact' && } - {(currentPage === 'login' || currentPage === 'signup') && } + {currentPage === 'login' && }