|
@@ -13,8 +13,11 @@ import {
|
|
|
|
|
|
import OrganizationsStore from 'sentry/stores/organizationsStore';
|
|
|
import ProjectsStore from 'sentry/stores/projectsStore';
|
|
|
+import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
|
|
|
import OrganizationGeneralSettings from 'sentry/views/settings/organizationGeneralSettings';
|
|
|
|
|
|
+jest.mock('sentry/utils/analytics/trackAdvancedAnalyticsEvent');
|
|
|
+
|
|
|
describe('OrganizationGeneralSettings', function () {
|
|
|
const ENDPOINT = '/organizations/org-slug/';
|
|
|
const {organization, router} = initializeOrg();
|
|
@@ -58,6 +61,7 @@ describe('OrganizationGeneralSettings', function () {
|
|
|
|
|
|
it('can enable "codecov access"', async function () {
|
|
|
defaultProps.organization.features.push('codecov-stacktrace-integration');
|
|
|
+ organization.codecovAccess = false;
|
|
|
render(<OrganizationGeneralSettings {...defaultProps} />);
|
|
|
const mock = MockApiClient.addMockResponse({
|
|
|
url: ENDPOINT,
|
|
@@ -74,6 +78,8 @@ describe('OrganizationGeneralSettings', function () {
|
|
|
})
|
|
|
);
|
|
|
});
|
|
|
+
|
|
|
+ expect(trackAdvancedAnalyticsEvent).toHaveBeenCalled();
|
|
|
});
|
|
|
|
|
|
it('changes org slug and redirects to new slug', async function () {
|