Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions __tests__/landingPage.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import Home from '@/app/page';

const createWrapper = () => {
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
},
},
});

return ({ children }: { children: React.ReactNode }) => (

Check failure on line 15 in __tests__/landingPage.test.tsx

View workflow job for this annotation

GitHub Actions / build (24.x)

Component definition is missing display name

Check failure on line 15 in __tests__/landingPage.test.tsx

View workflow job for this annotation

GitHub Actions / build (22.x)

Component definition is missing display name
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
};

describe('Home landing page', () => {
it('renders the industry solutions section and dark footer content', () => {
render(<Home />, { wrapper: createWrapper() });

expect(screen.getByText(/Independent Carriers/i)).toBeInTheDocument();
expect(screen.getByText(/Precision Industry Solutions/i)).toBeInTheDocument();
expect(screen.getByRole('button', { name: /explore carriers/i })).toBeInTheDocument();
expect(screen.getByText(/Blockchain-powered logistics infrastructure/i)).toBeInTheDocument();
expect(screen.getByText(/All rights reserved/i)).toBeInTheDocument();
});
});
Loading
Loading