import {render, screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary';
import {SetupReplaysCTA} from 'sentry/views/replays/list/replayOnboardingPanel';
describe('SetupReplaysCTA', () => {
it('renders setup replay', () => {
render();
expect(screen.getByTestId('setup-replays-btn')).toBeInTheDocument();
});
it('renders setup replay w/ disabled state including tooltip', async () => {
render();
const setupBtn = screen.getByTestId('setup-replays-btn');
await userEvent.hover(setupBtn);
await waitFor(() => screen.getByTestId('setup-replays-tooltip'));
expect(screen.getByTestId('setup-replays-tooltip')).toBeInTheDocument();
});
it('create project', () => {
render();
const createBtn = screen.getByTestId('create-project-btn');
expect(createBtn).toBeInTheDocument();
expect(createBtn).toHaveAttribute('href', `/organizations/foo/projects/new/`);
});
it('create project w/ disabled state including tooltip', async () => {
render();
const createBtn = screen.getByTestId('create-project-btn');
await userEvent.hover(createBtn);
await waitFor(() => screen.getByTestId('create-project-tooltip'));
expect(screen.getByTestId('create-project-tooltip')).toBeInTheDocument();
});
});