Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions static/app/gettingStartedDocs/react-native/metrics.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import {OrganizationFixture} from 'sentry-fixture/organization';
import {ProjectFixture} from 'sentry-fixture/project';
import {ProjectKeysFixture} from 'sentry-fixture/projectKeys';

import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
import {
render,
screen,
userEvent,
waitForElementToBeRemoved,
} from 'sentry-test/reactTestingLibrary';

import type {Organization} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
Expand Down Expand Up @@ -41,6 +46,8 @@ describe('getting started with react-native', () => {
/>
);

await waitForElementToBeRemoved(() => screen.queryByTestId('loading-indicator'));
Comment thread
JoshuaKGoldberg marked this conversation as resolved.

expect(
await screen.findByRole('heading', {name: /install sentry/i})
).toBeInTheDocument();
Expand All @@ -50,11 +57,11 @@ describe('getting started with react-native', () => {
).toBeInTheDocument();

// Goes to the configure step
await userEvent.click(screen.getByRole('button', {name: 'Next'}));
await userEvent.click(await screen.findByRole('button', {name: 'Next'}));
expect(await screen.findByText(/Metrics are enabled by default/)).toBeInTheDocument();

// Goes to the verify step
await userEvent.click(screen.getByRole('button', {name: 'Next'}));
await userEvent.click(await screen.findByRole('button', {name: 'Next'}));
expect(await screen.findByText(/Sentry\.metrics\.count/)).toBeInTheDocument();
expect(screen.getByText(/Sentry\.metrics\.gauge/)).toBeInTheDocument();
});
Expand Down
Loading