Skip to content

Commit 0458c67

Browse files
authored
fix(tests): escape . in regex passed to findByText (#41391)
The `.`'s here were not escaped and were matching on all characters.
1 parent a7b0973 commit 0458c67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

static/app/components/profiling/ProfilingOnboarding/profilingOnboardingModal.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ describe('ProfilingOnboarding', function () {
167167

168168
selectProject(project);
169169

170-
const link = (await screen.findByText(/sentry.cocoa@9.0.0/)) as HTMLAnchorElement;
170+
const link = (await screen.findByText(/sentry\.cocoa@9\.0\.0/)) as HTMLAnchorElement;
171171
expect(link).toBeInTheDocument();
172172
expect(link.href).toBe('http://test/fake-slug');
173173
});
@@ -204,7 +204,7 @@ describe('ProfilingOnboarding', function () {
204204

205205
selectProject(project);
206206

207-
const link = screen.queryByText(/sentry.java@9.0.0/);
207+
const link = screen.queryByText(/sentry\.java@9\.0\.0/);
208208
expect(link).not.toBeInTheDocument();
209209
});
210210

@@ -241,7 +241,7 @@ describe('ProfilingOnboarding', function () {
241241
selectProject(project);
242242

243243
expect(
244-
await screen.findByText(/http:\/\/fake-public-dsn.ingest.sentry.io/)
244+
await screen.findByText(/http:\/\/fake-public-dsn\.ingest\.sentry\.io/)
245245
).toBeInTheDocument();
246246
});
247247
});

0 commit comments

Comments
 (0)