Browse Source

ref(ts): Convert groupSidebar.spec to tsx (#53214)

Evan Purkhiser 1 year ago
parent
commit
d008c9e89d
1 changed files with 10 additions and 19 deletions
  1. 10 19
      static/app/views/issueDetails/groupSidebar.spec.tsx

+ 10 - 19
static/app/views/issueDetails/groupSidebar.spec.jsx → static/app/views/issueDetails/groupSidebar.spec.tsx

@@ -9,7 +9,7 @@ describe('GroupSidebar', function () {
   let group = TestStubs.Group({tags: TestStubs.Tags()});
   let group = TestStubs.Group({tags: TestStubs.Tags()});
   const {organization, project} = initializeOrg();
   const {organization, project} = initializeOrg();
   const environment = 'production';
   const environment = 'production';
-  let tagsMock;
+  let tagsMock: jest.Mock;
 
 
   beforeEach(function () {
   beforeEach(function () {
     MemberListStore.loadInitialData([]);
     MemberListStore.loadInitialData([]);
@@ -55,8 +55,7 @@ describe('GroupSidebar', function () {
       body: {},
       body: {},
     });
     });
     MockApiClient.addMockResponse({
     MockApiClient.addMockResponse({
-      url: `/organizations/${organization.slug}/code-mappings/`,
-      query: {project: -1},
+      url: `/organizations/${organization.slug}/code-mappings/?project=-1`,
       method: 'GET',
       method: 'GET',
       body: [],
       body: [],
     });
     });
@@ -87,8 +86,7 @@ describe('GroupSidebar', function () {
           organization={organization}
           organization={organization}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[environment]}
           environments={[environment]}
-        />,
-        {organization}
+        />
       );
       );
 
 
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(await screen.findByText('browser')).toBeInTheDocument();
@@ -105,8 +103,7 @@ describe('GroupSidebar', function () {
           organization={organization}
           organization={organization}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[environment]}
           environments={[environment]}
-        />,
-        {organization}
+        />
       );
       );
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(screen.getByText('device')).toBeInTheDocument();
       expect(screen.getByText('device')).toBeInTheDocument();
@@ -126,8 +123,7 @@ describe('GroupSidebar', function () {
           organization={organization}
           organization={organization}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[environment]}
           environments={[environment]}
-        />,
-        {organization}
+        />
       );
       );
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(tagsMock).toHaveBeenCalledTimes(1);
       expect(tagsMock).toHaveBeenCalledTimes(1);
@@ -138,8 +134,7 @@ describe('GroupSidebar', function () {
           organization={organization}
           organization={organization}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[stagingEnv]}
           environments={[stagingEnv]}
-        />,
-        {organization}
+        />
       );
       );
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(await screen.findByText('browser')).toBeInTheDocument();
       expect(tagsMock).toHaveBeenCalledTimes(2);
       expect(tagsMock).toHaveBeenCalledTimes(2);
@@ -176,8 +171,7 @@ describe('GroupSidebar', function () {
           organization={organization}
           organization={organization}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[environment]}
           environments={[environment]}
-        />,
-        {organization}
+        />
       );
       );
       expect(
       expect(
         await screen.findByText('No tags found in the selected environments')
         await screen.findByText('No tags found in the selected environments')
@@ -209,8 +203,7 @@ describe('GroupSidebar', function () {
         organization={organization}
         organization={organization}
         event={TestStubs.Event()}
         event={TestStubs.Event()}
         environments={[]}
         environments={[]}
-      />,
-      {organization}
+      />
     );
     );
 
 
     expect(await screen.findByText('Participants (2)')).toBeInTheDocument();
     expect(await screen.findByText('Participants (2)')).toBeInTheDocument();
@@ -238,8 +231,7 @@ describe('GroupSidebar', function () {
           }}
           }}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[environment]}
           environments={[environment]}
-        />,
-        {organization}
+        />
       );
       );
       await waitFor(() => expect(tagsMock).toHaveBeenCalled());
       await waitFor(() => expect(tagsMock).toHaveBeenCalled());
       expect(
       expect(
@@ -258,8 +250,7 @@ describe('GroupSidebar', function () {
           }}
           }}
           event={TestStubs.Event()}
           event={TestStubs.Event()}
           environments={[environment]}
           environments={[environment]}
-        />,
-        {organization}
+        />
       );
       );
       await waitFor(() => expect(tagsMock).toHaveBeenCalled());
       await waitFor(() => expect(tagsMock).toHaveBeenCalled());
       expect(
       expect(