Browse Source

test(js): Remove usage of initializeOrg project (#72665)

Evan Purkhiser 9 months ago
parent
commit
4f10d28d13

+ 0 - 1
static/app/components/group/tagFacets/index.spec.tsx

@@ -8,7 +8,6 @@ import TagFacets, {TAGS_FORMATTER} from 'sentry/components/group/tagFacets';
 const mockProject = ProjectFixture();
 const {router, organization} = initializeOrg({
   organization: {},
-  project: mockProject,
   projects: [mockProject],
   router: {
     routes: [],

+ 0 - 2
static/app/components/organizations/environmentPageFilter/index.spec.tsx

@@ -9,7 +9,6 @@ import ProjectsStore from 'sentry/stores/projectsStore';
 
 const {organization, router} = initializeOrg({
   organization: {features: ['global-views', 'open-membership']},
-  project: undefined,
   projects: [
     {id: '1', slug: 'project-1', environments: ['prod', 'staging']},
     {id: '2', slug: 'project-2', environments: ['prod', 'stage']},
@@ -134,7 +133,6 @@ describe('EnvironmentPageFilter', function () {
   it('displays a desynced state message', async function () {
     const {organization: desyncOrganization, router: desyncRouter} = initializeOrg({
       organization: {features: ['global-views', 'open-membership']},
-      project: undefined,
       projects: [
         {id: '1', slug: 'project-1', environments: ['prod', 'staging']},
         {id: '2', slug: 'project-2', environments: ['prod', 'stage']},

+ 0 - 2
static/app/components/organizations/projectPageFilter/index.spec.tsx

@@ -16,7 +16,6 @@ import ProjectsStore from 'sentry/stores/projectsStore';
 
 const {organization, router} = initializeOrg({
   organization: {features: ['global-views', 'open-membership']},
-  project: undefined,
   projects: [
     {id: '1', slug: 'project-1', isMember: true},
     {id: '2', slug: 'project-2', isMember: true},
@@ -210,7 +209,6 @@ describe('ProjectPageFilter', function () {
   it('displays a desynced state message', async function () {
     const {organization: desyncOrganization, router: desyncRouter} = initializeOrg({
       organization: {features: ['global-views', 'open-membership']},
-      project: undefined,
       projects: [
         {id: '1', slug: 'project-1', isMember: true},
         {id: '2', slug: 'project-2', isMember: true},

+ 0 - 1
static/app/components/timeRangeSelector/index.spec.tsx

@@ -9,7 +9,6 @@ import ConfigStore from 'sentry/stores/configStore';
 
 const {organization, router} = initializeOrg({
   organization: {features: ['global-views', 'open-membership']},
-  project: undefined,
   projects: [
     {id: '1', slug: 'project-1', isMember: true},
     {id: '2', slug: 'project-2', isMember: true},

+ 0 - 1
static/app/utils/dashboards/issueFieldRenderers.spec.tsx

@@ -17,7 +17,6 @@ describe('getIssueFieldRenderer', function () {
     context = initializeOrg({
       organization,
       router: {},
-      project: ProjectFixture(),
       projects: [ProjectFixture()],
     });
     organization = context.organization;

+ 1 - 4
static/app/utils/discover/fieldRenderers.spec.tsx

@@ -1,5 +1,4 @@
 import {ConfigFixture} from 'sentry-fixture/config';
-import {ProjectFixture} from 'sentry-fixture/project';
 import {UserFixture} from 'sentry-fixture/user';
 
 import {initializeOrg} from 'sentry-test/initializeOrg';
@@ -15,9 +14,7 @@ describe('getFieldRenderer', function () {
   let location, context, project, organization, data, user;
 
   beforeEach(function () {
-    context = initializeOrg({
-      project: ProjectFixture(),
-    });
+    context = initializeOrg();
     organization = context.organization;
     project = context.project;
     act(() => ProjectsStore.loadInitialData([project]));

+ 0 - 1
static/app/utils/useCustomMeasurements.spec.tsx

@@ -35,7 +35,6 @@ describe('useCustomMeasurements', function () {
   it('provides customMeasurements from the custom measurements context', async function () {
     const {organization} = initializeOrg({
       organization: {features: ['dashboards-mep']},
-      project: undefined,
       projects: [],
       router: {},
     });

+ 0 - 1
static/app/views/issueDetails/groupDetails.spec.tsx

@@ -53,7 +53,6 @@ describe('groupDetails', () => {
   };
 
   const defaultInit = initializeOrg<{groupId: string}>({
-    project,
     router: initRouter,
   });
 

+ 0 - 6
static/app/views/issueDetails/groupMerged/index.spec.tsx

@@ -41,9 +41,6 @@ describe('Issues -> Merged View', function () {
 
   it('renders initially with loading component', async function () {
     const {organization, project, router} = initializeOrg({
-      project: {
-        slug: 'projectId',
-      },
       router: {
         location: {
           query: {},
@@ -71,9 +68,6 @@ describe('Issues -> Merged View', function () {
 
   it('renders with mocked data', async function () {
     const {organization, project, router} = initializeOrg({
-      project: {
-        slug: 'projectId',
-      },
       router: {
         location: {
           query: {},

+ 0 - 1
static/app/views/issueDetails/groupReplays/groupReplays.spec.tsx

@@ -94,7 +94,6 @@ function init({organizationProps = {features: ['session-replay']}}: InitializeOr
     organization: {
       ...organizationProps,
     },
-    project: mockProject,
     projects: [mockProject],
     router: {
       routes: [

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