Browse Source

test(ui): Add loose types to initialize org, remove spread (#49068)

Scott Cooper 1 year ago
parent
commit
8a16b092c9

+ 2 - 0
fixtures/js-stubs/types.tsx

@@ -88,6 +88,7 @@ type TestStubFixtures = {
   MetricsSessionUserCountByStatusByRelease: SimpleStub;
   MetricsTotalCountByReleaseIn24h: SimpleStub;
   OrgOwnedApps: SimpleStub;
+  OrgRoleList: OverridableStub;
   Organization: OverridableStub;
   OrganizationEvent: OverridableStub;
   OrganizationIntegrations: OverridableStub;
@@ -169,6 +170,7 @@ type TestStubFixtures = {
   TeamIssuesBreakdown: SimpleStub;
   TeamIssuesReviewed: SimpleStub;
   TeamResolutionTime: SimpleStub;
+  TeamRoleList: OverridableStub;
   Tombstones: OverridableStubList;
   TraceError: OverridableStub;
   UpdateSdkAndEnableIntegrationSuggestion: SimpleStub;

+ 0 - 6
static/app/components/events/eventTags/index.spec.tsx

@@ -15,9 +15,7 @@ describe('event tags', function () {
     };
 
     const {organization, project, router} = initializeOrg({
-      ...initializeOrg(),
       organization: {
-        ...initializeOrg().organization,
         relayPiiConfig: null,
       },
     });
@@ -63,9 +61,7 @@ describe('event tags', function () {
     };
 
     const {organization, project, router} = initializeOrg({
-      ...initializeOrg(),
       organization: {
-        ...initializeOrg().organization,
         relayPiiConfig: null,
       },
     });
@@ -103,9 +99,7 @@ describe('event tags', function () {
     };
 
     const {organization, project, router} = initializeOrg({
-      ...initializeOrg(),
       organization: {
-        ...initializeOrg().organization,
         relayPiiConfig: null,
       },
     });

+ 0 - 1
static/app/components/events/interfaces/breadcrumbs/breadcrumb/data/default.spec.tsx

@@ -13,7 +13,6 @@ describe('Breadcrumb Data Default', function () {
   });
 
   const {organization, router} = initializeOrg({
-    ...initializeOrg(),
     router: {
       location: {query: {project: '0'}},
     },

+ 0 - 1
static/app/components/events/interfaces/breadcrumbs/breadcrumb/data/exception.spec.tsx

@@ -13,7 +13,6 @@ describe('Breadcrumb Data Exception', function () {
   });
 
   const {organization, router} = initializeOrg({
-    ...initializeOrg(),
     router: {
       location: {query: {project: '0'}},
     },

+ 0 - 1
static/app/components/events/interfaces/breadcrumbs/breadcrumb/data/http.spec.tsx

@@ -13,7 +13,6 @@ describe('Breadcrumb Data Http', function () {
   });
 
   const {organization, router} = initializeOrg({
-    ...initializeOrg(),
     router: {
       location: {query: {project: '0'}},
     },

+ 0 - 1
static/app/components/events/interfaces/crashContent/exception/content.spec.tsx

@@ -15,7 +15,6 @@ describe('Exception Content', function () {
     });
 
     const {organization, router, routerContext} = initializeOrg({
-      ...initializeOrg(),
       router: {
         location: {query: {project: '0'}},
       },

+ 0 - 1
static/app/components/events/interfaces/frame/frameVariables.spec.tsx

@@ -13,7 +13,6 @@ describe('Frame Variables', function () {
     });
 
     const {organization, router, routerContext} = initializeOrg({
-      ...initializeOrg(),
       router: {
         location: {query: {project: '0'}},
       },

+ 0 - 2
static/app/components/modals/redirectToProject.spec.tsx

@@ -11,9 +11,7 @@ describe('RedirectToProjectModal', function () {
 
   it('has timer to redirect to new slug after mounting', function () {
     const {router} = initializeOrg({
-      ...initializeOrg(),
       router: {
-        ...initializeOrg().router,
         routes: [
           {path: '/', childRoutes: []},
           {name: 'Organizations', path: ':orgId/', childRoutes: []},

+ 0 - 2
static/app/components/modals/reprocessEventModal.spec.tsx

@@ -19,7 +19,6 @@ const group = TestStubs.Group({
 describe('ReprocessEventModal', function () {
   it('form fields & info', function () {
     const {organization} = initializeOrg({
-      ...initializeOrg(),
       organization: {
         id: '4660',
         slug: 'org',
@@ -69,7 +68,6 @@ describe('ReprocessEventModal', function () {
 
   it('reprocess all events', async function () {
     const {organization} = initializeOrg({
-      ...initializeOrg(),
       organization: {
         id: '4660',
         slug: 'org',

+ 1 - 3
static/app/components/modals/widgetBuilder/addToDashboardModal.spec.tsx

@@ -80,9 +80,7 @@ describe('add to dashboard modal', () => {
   };
 
   beforeEach(() => {
-    initialData = initializeOrg({
-      ...initializeOrg(),
-    });
+    initialData = initializeOrg();
 
     MockApiClient.addMockResponse({
       url: '/organizations/org-slug/dashboards/',

Some files were not shown because too many files changed in this diff