Skip to content
Snippets Groups Projects
Verified Commit e6d93fa5 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Create test and docpage

parent fa9fe638
No related branches found
No related tags found
1 merge request!33Connect api calls and include test/docs cases
Pipeline #11810 passed
NotFound example:
```js
<NotFound />
```
\ No newline at end of file
import React from 'react';
import { render } from '@testing-library/react';
import { NotFound } from './NotFound';
describe('<NotFound />', () => {
it('renders without crashing', () => {
const wrapper = render(<NotFound />);
expect(wrapper.queryByTestId('NotFound')).toBeTruthy();
});
});
import React, { FC } from 'react';
export const NotFound: FC = () => <h1>Page not found</h1>;
export const NotFound: FC = () => (
<div data-testid="NotFound">
<h1>Page not found</h1>
</div>
);
Profile page for all type of users
```js
<ProfilePage />
```
\ No newline at end of file
import React from 'react';
import { render } from '@testing-library/react';
import { Reservation } from './Reservation';
describe('<Reservation />', () => {
it('renders without crashing', () => {
const wrapper = render(<Reservation />);
expect(wrapper.queryByTestId('Reservation')).toBeTruthy();
});
});
import React, { FC } from 'react';
export const Reservation: FC = () => (
<div data-testid="Reservation">
<h1>Reservation page!</h1>
</div>
);
Unauthorized example:
```js
<Unauthorized />
```
\ No newline at end of file
import React from 'react';
import { render } from '@testing-library/react';
import { Unauthorized } from './Unauthorized';
describe('<Unauthorized />', () => {
it('renders without crashing', () => {
const wrapper = render(<Unauthorized />);
expect(wrapper.queryByTestId('Unauthorized')).toBeTruthy();
});
});
import React, { FC } from 'react';
export const Unauthorized: FC = () => <h1>You cannot access this page</h1>;
export const Unauthorized: FC = () => (
<div data-testid="Unauthorized">
<h1>You cannot access this page</h1>
</div>
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment