Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/landing #23

Merged
merged 9 commits into from
Jun 14, 2022
Prev Previous commit
Next Next commit
test(web): update home page component test
  • Loading branch information
tericcabrel committed Jun 14, 2022
commit 00d5903f30925812a6d019a0095fcbf79538ba2e
16 changes: 11 additions & 5 deletions apps/web/__tests__/ui/home.test.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import React from 'react';
import { MockedProvider } from '@apollo/client/testing';
import { render, screen } from '@testing-library/react';
import React from 'react';

import Home from '@/containers/home';

describe('Home Page', () => {
test('Render the home page', () => {
render(<Home />);
render(
<MockedProvider mocks={[]} addTypename={false}>
<Home />
</MockedProvider>,
);

const heading = screen.getByRole('heading', {
name: /Welcome to Sharingan/i,
const button = screen.getByRole('button', {
name: /Request Early Access/i,
});

expect(heading).toBeInTheDocument();
expect(button).toBeInTheDocument();
});
});