You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2022/08/16 17:30:57 UTC

[superset] branch chore/drill-to-detail-modal-tests updated: Enhance SliceHeaderControls tests

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

diegopucci pushed a commit to branch chore/drill-to-detail-modal-tests
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/chore/drill-to-detail-modal-tests by this push:
     new d00a0c7a70 Enhance SliceHeaderControls tests
d00a0c7a70 is described below

commit d00a0c7a706c24596eab58133fac2a32c21b5b34
Author: geido <di...@gmail.com>
AuthorDate: Tue Aug 16 20:30:42 2022 +0300

    Enhance SliceHeaderControls tests
---
 .../SliceHeaderControls/SliceHeaderControls.test.tsx | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
index 514ff4fc2c..455afb6039 100644
--- a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
@@ -236,3 +236,23 @@ test('Should "Enter fullscreen"', () => {
   userEvent.click(screen.getByText('Enter fullscreen'));
   expect(props.handleToggleFullSize).toBeCalledTimes(1);
 });
+
+test('Drill to detail modal is under featureflag', () => {
+  // @ts-ignore
+  global.featureFlags = {
+    [FeatureFlag.DRILL_TO_DETAIL]: false,
+  };
+  const props = createProps();
+  renderWrapper(props);
+  expect(screen.queryByText('Drill to detail')).not.toBeInTheDocument();
+});
+
+test('Should show the "Drill to detail"', () => {
+  // @ts-ignore
+  global.featureFlags = {
+    [FeatureFlag.DRILL_TO_DETAIL]: true,
+  };
+  const props = createProps();
+  renderWrapper(props);
+  expect(screen.getByText('Drill to detail')).toBeInTheDocument();
+});