Browse Source

ref(ts): Convert test newProject to typescript (#52963)

Priscila Oliveira 1 year ago
parent
commit
38cdc653a7

+ 0 - 0
fixtures/js-stubs/ruleConditions.js → fixtures/js-stubs/ruleConditions.ts


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

@@ -6,6 +6,7 @@ import type {
 } from 'sentry/views/replays/types';
 
 import type {Replay} from './replay';
+import {MOCK_RESP_VERBOSE} from './ruleConditions';
 
 type SimpleStub<T = any> = () => T;
 
@@ -87,6 +88,7 @@ type TestStubFixtures = {
   InstallWizard: OverridableStub;
   JiraIntegration: OverridableStub;
   JiraIntegrationProvider: OverridableStub;
+  MOCK_RESP_VERBOSE: typeof MOCK_RESP_VERBOSE;
   Member: OverridableStub;
   Members: OverridableStubList;
   MetricRule: OverridableStub;
@@ -202,8 +204,6 @@ type TestStubFixtures = {
   // AsanaAutocomplete(type = 'project', values = [DEFAULT_AUTOCOMPLETE])
   // PhabricatorAutocomplete(type = 'project', values = null)
   // RoleList(params = [], fullAccess = false)
-
-  // const MOCK_RESP_VERBOSE
   // const MOCK_RESP_ONLY_IGNORED_CONDITIONS_INVALID
   // const MOCK_RESP_INCONSISTENT_PLACEHOLDERS
   // const MOCK_RESP_INCONSISTENT_INTERVALS

+ 0 - 1
static/app/views/projectInstall/createProject.spec.tsx

@@ -479,7 +479,6 @@ describe('CreateProject', function () {
 
       MockApiClient.addMockResponse({
         url: `/projects/${organization.slug}/rule-conditions/`,
-        // @ts-expect-error TODO: fix this type
         body: TestStubs.MOCK_RESP_VERBOSE,
       });
     });

+ 0 - 0
static/app/views/projectInstall/newProject.spec.jsx → static/app/views/projectInstall/newProject.spec.tsx