Skip to content

Commit 0430c81

Browse files
committed
Resolved comments
1 parent 8276bc5 commit 0430c81

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/pages/landing/components/RegisterModal.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('Landing page > Register modal', () => {
2020

2121
renderWithProviders(<RegisterModal {...props} />);
2222

23-
const dialogElement = screen.queryByRole('dialog');
23+
const dialogElement = screen.queryByTestId('register-modal');
2424

2525
expect(dialogElement).not.toBeInTheDocument();
2626

@@ -37,7 +37,7 @@ describe('Landing page > Register modal', () => {
3737

3838
renderWithProviders(<RegisterModal {...props} />);
3939

40-
const dialogElement = screen.getAllByRole('dialog')[0];
40+
const dialogElement = screen.getByTestId('register-modal');
4141

4242
expect(dialogElement).toBeVisible();
4343

src/pages/landing/components/RegisterModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface Props {
1313

1414
const RegisterModal = (props: Props) => {
1515
return (
16-
<Dialog open={props.show} onClose={props.onClose} role="dialog">
16+
<Dialog open={props.show} onClose={props.onClose} data-testid="register-modal">
1717
<DialogTitle>
1818
{props.success ? 'Successfully initiated subscription' : 'Setting up your subscription...'}
1919
</DialogTitle>

src/pages/landing/index.test.tsx renamed to tests/integration/landing.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { screen, fireEvent } from '@testing-library/react';
55
import userEvent from '@testing-library/user-event';
66
import '@testing-library/jest-dom';
77

8-
import { renderWithProviders } from 'utils/test-utils';
9-
import LandingPage from './';
8+
import { renderWithProviders } from '../../src/utils/test-utils';
9+
import LandingPage from '../../src/pages/landing';
1010

1111
const server = setupServer(
1212
http.get('/server-timestamp', async () => {

0 commit comments

Comments
 (0)