import {render, screen} from 'sentry-test/reactTestingLibrary'; import EventsTable from 'sentry/components/eventsTable/eventsTable'; jest.mock('sentry/utils/useRoutes', () => ({ useRoutes: jest.fn(() => []), })); describe('EventsTable', function () { it('renders', function () { const {container} = render( ); expect(container).toSnapshot(); }); it('removes the replay column when the feature is disabled', () => { render( ); expect(screen.queryByRole('columnheader', {name: 'Replay'})).not.toBeInTheDocument(); }); it('renders the replay column when the feature is enabled', () => { render( ); expect(screen.getByRole('columnheader', {name: 'Replay'})).toBeVisible(); }); });