You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2023/12/11 21:53:40 UTC

(superset) branch scarf-pixel updated: cleaning up...

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch scarf-pixel
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/scarf-pixel by this push:
     new 96589f049d cleaning up...
96589f049d is described below

commit 96589f049d85bbb5c2b49d85611ca2bd832b8fda
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Mon Dec 11 14:53:18 2023 -0700

    cleaning up...
---
 .../superset-ui-core/src/utils/featureFlags.ts     |  1 -
 .../TelemetryPixel/TelemetryPixel.test.tsx         | 43 ++++++++++------------
 2 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
index e13e06d9f0..6bc77e0e87 100644
--- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
+++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
@@ -44,7 +44,6 @@ export enum FeatureFlag {
   ENABLE_ADVANCED_DATA_TYPES = 'ENABLE_ADVANCED_DATA_TYPES',
   ENABLE_EXPLORE_DRAG_AND_DROP = 'ENABLE_EXPLORE_DRAG_AND_DROP',
   ENABLE_JAVASCRIPT_CONTROLS = 'ENABLE_JAVASCRIPT_CONTROLS',
-  ENABLE_TELEMETRY = 'ENABLE_TELEMETRY',
   ENABLE_TEMPLATE_PROCESSING = 'ENABLE_TEMPLATE_PROCESSING',
   ENABLE_TEMPLATE_REMOVE_FILTERS = 'ENABLE_TEMPLATE_REMOVE_FILTERS',
   ESCAPE_MARKDOWN_HTML = 'ESCAPE_MARKDOWN_HTML',
diff --git a/superset-frontend/src/components/TelemetryPixel/TelemetryPixel.test.tsx b/superset-frontend/src/components/TelemetryPixel/TelemetryPixel.test.tsx
index 7e64779714..4e3b3c9332 100644
--- a/superset-frontend/src/components/TelemetryPixel/TelemetryPixel.test.tsx
+++ b/superset-frontend/src/components/TelemetryPixel/TelemetryPixel.test.tsx
@@ -20,33 +20,30 @@ import React from 'react';
 import { render } from 'spec/helpers/testing-library';
 import TelemetryPixel from '.';
 
-describe('environmental variables', () => {
-  const OLD_ENV = process.env;
+const OLD_ENV = process.env;
 
-  // restor the process after messing with it!
-  afterAll(() => {
-    process.env = OLD_ENV;
-  });
-
-  test('should render', () => {
-    const { container } = render(<TelemetryPixel />);
-    expect(container).toBeInTheDocument();
-  });
+// restor the process after messing with it!
+afterAll(() => {
+  process.env = OLD_ENV;
+});
 
-  test('should render the pixel link when FF is on', () => {
-    process.env.SCARF_ANALYTICS = 'true';
-    render(<TelemetryPixel />);
+test('should render', () => {
+  const { container } = render(<TelemetryPixel />);
+  expect(container).toBeInTheDocument();
+});
 
-    const image = document.querySelector('img[src*="scarf.sh"]');
-    expect(image).toBeInTheDocument();
-  });
+test('should render the pixel link when FF is on', () => {
+  process.env.SCARF_ANALYTICS = 'true';
+  render(<TelemetryPixel />);
 
-  test('should NOT render the pixel link when FF is off', () => {
-    process.env.SCARF_ANALYTICS = 'false';
-    render(<TelemetryPixel />);
+  const image = document.querySelector('img[src*="scarf.sh"]');
+  expect(image).toBeInTheDocument();
+});
 
-    const image = document.querySelector('img[src*="scarf.sh"]');
-    expect(image).not.toBeInTheDocument();
-  });
+test('should NOT render the pixel link when FF is off', () => {
+  process.env.SCARF_ANALYTICS = 'false';
+  render(<TelemetryPixel />);
 
+  const image = document.querySelector('img[src*="scarf.sh"]');
+  expect(image).not.toBeInTheDocument();
 });