Skip to content

Commit

Permalink
ref(js): Make widgetViewerModal.spec test compat across react-routers (
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Aug 26, 2024
1 parent 2e326d4 commit 29177f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions static/app/components/modals/widgetViewerModal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,12 @@ describe('Modals -> WidgetViewerModal', function () {
expect(eventsMock).toHaveBeenCalledTimes(1);
expect(screen.getByText('title')).toBeInTheDocument();
await userEvent.click(screen.getByText('title'));
expect(initialData.router.push).not.toHaveBeenCalledWith({
pathname: '/mock-pathname/',
query: {sort: ['-title']},
});
expect(initialData.router.push).not.toHaveBeenCalledWith(
expect.objectContaining({
pathname: '/mock-pathname/',
query: {sort: ['-title']},
})
);
});

it('renders transaction summary link', async function () {
Expand Down Expand Up @@ -750,6 +752,7 @@ describe('Modals -> WidgetViewerModal', function () {
await userEvent.click(await screen.findByText('count()'));
expect(initialData.router.push).toHaveBeenCalledWith(
expect.objectContaining({
pathname: '/mock-pathname/',
query: {sort: ['-count()']},
})
);
Expand Down

0 comments on commit 29177f1

Please sign in to comment.