You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by su...@apache.org on 2020/12/09 03:00:13 UTC

[incubator-superset] branch redux-upgrade created (now 3bf2511)

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

suddjian pushed a change to branch redux-upgrade
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


      at 3bf2511  fix rest of unit tests

This branch includes the following new commits:

     new fb76d4b  upgrade redux and react-redux, adjust types
     new c4d76b3  first round of test fixes
     new 3bf2511  fix rest of unit tests

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-superset] 01/03: upgrade redux and react-redux, adjust types

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

suddjian pushed a commit to branch redux-upgrade
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit fb76d4b13940d382af8e92498af698a3b8d3794f
Author: David Aaron Suddjian <aa...@gmail.com>
AuthorDate: Tue Dec 8 16:05:48 2020 -0800

    upgrade redux and react-redux, adjust types
---
 superset-frontend/package-lock.json                | 218 +++++++++++++--------
 superset-frontend/package.json                     |   6 +-
 .../src/dashboard/containers/FiltersBadge.tsx      |   6 +-
 .../src/explore/actions/exploreActions.ts          |   4 +-
 superset-frontend/src/logger/actions/index.ts      |   4 +-
 5 files changed, 150 insertions(+), 88 deletions(-)

diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index 208c406..9d2d5f5 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -18927,6 +18927,16 @@
       "integrity": "sha512-GRTZLeLJ8ia00ZH8mxMO8t0aC9M1N9bN461Z2eaRurJo6Fpa+utgCwLzI4jQHcrdzuzp5WPN9jRwpsCQ1VhJ5w==",
       "dev": true
     },
+    "@types/hoist-non-react-statics": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
+      "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
+      "dev": true,
+      "requires": {
+        "@types/react": "*",
+        "hoist-non-react-statics": "^3.3.0"
+      }
+    },
     "@types/html-minifier-terser": {
       "version": "5.1.0",
       "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.0.tgz",
@@ -19216,13 +19226,27 @@
       }
     },
     "@types/react-redux": {
-      "version": "5.0.21",
-      "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-5.0.21.tgz",
-      "integrity": "sha512-ewkOW4GjnyXq5L++T31utI8yRmwj8iCIahZohYi1Ef7Xkrw0V/q92ao7x20rm38FKgImDaCCsaRGWfCJmF/Ukg==",
+      "version": "7.1.10",
+      "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.10.tgz",
+      "integrity": "sha512-lmt2BPf0fFuYrXg1JM4udUd4sCmqnTlNUIxC7B6RIBTzmMuv/MxOfumGNUx1UyzVZieEZ2ttCQvFfh/3eUHvrQ==",
       "dev": true,
       "requires": {
+        "@types/hoist-non-react-statics": "^3.3.0",
         "@types/react": "*",
-        "redux": "^3.6.0"
+        "hoist-non-react-statics": "^3.3.0",
+        "redux": "^4.0.0"
+      },
+      "dependencies": {
+        "redux": {
+          "version": "4.0.5",
+          "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz",
+          "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==",
+          "dev": true,
+          "requires": {
+            "loose-envify": "^1.4.0",
+            "symbol-observable": "^1.2.0"
+          }
+        }
       }
     },
     "@types/react-router": {
@@ -19336,6 +19360,20 @@
       "dev": true,
       "requires": {
         "redux": "^3.6.0"
+      },
+      "dependencies": {
+        "redux": {
+          "version": "3.7.2",
+          "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz",
+          "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==",
+          "dev": true,
+          "requires": {
+            "lodash": "^4.2.1",
+            "lodash-es": "^4.2.1",
+            "loose-envify": "^1.1.0",
+            "symbol-observable": "^1.0.3"
+          }
+        }
       }
     },
     "@types/redux-mock-store": {
@@ -22850,28 +22888,28 @@
           "dependencies": {
             "abbrev": {
               "version": "1.1.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
               "dev": true,
               "optional": true
             },
             "ansi-regex": {
               "version": "2.1.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
               "dev": true,
               "optional": true
             },
             "aproba": {
               "version": "1.2.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
               "dev": true,
               "optional": true
             },
             "are-we-there-yet": {
               "version": "1.1.5",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
               "dev": true,
               "optional": true,
@@ -22882,14 +22920,14 @@
             },
             "balanced-match": {
               "version": "1.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
               "dev": true,
               "optional": true
             },
             "brace-expansion": {
               "version": "1.1.11",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
               "dev": true,
               "optional": true,
@@ -22900,35 +22938,35 @@
             },
             "code-point-at": {
               "version": "1.1.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
               "dev": true,
               "optional": true
             },
             "concat-map": {
               "version": "0.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
               "dev": true,
               "optional": true
             },
             "console-control-strings": {
               "version": "1.1.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
               "dev": true,
               "optional": true
             },
             "core-util-is": {
               "version": "1.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
               "dev": true,
               "optional": true
             },
             "debug": {
               "version": "4.1.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
               "dev": true,
               "optional": true,
@@ -22938,35 +22976,35 @@
             },
             "deep-extend": {
               "version": "0.6.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
               "dev": true,
               "optional": true
             },
             "delegates": {
               "version": "1.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
               "dev": true,
               "optional": true
             },
             "detect-libc": {
               "version": "1.0.3",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
               "dev": true,
               "optional": true
             },
             "fs.realpath": {
               "version": "1.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
               "dev": true,
               "optional": true
             },
             "gauge": {
               "version": "2.7.4",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
               "dev": true,
               "optional": true,
@@ -22983,7 +23021,7 @@
             },
             "glob": {
               "version": "7.1.3",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
               "dev": true,
               "optional": true,
@@ -22998,14 +23036,14 @@
             },
             "has-unicode": {
               "version": "2.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
               "dev": true,
               "optional": true
             },
             "iconv-lite": {
               "version": "0.4.24",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
               "dev": true,
               "optional": true,
@@ -23015,7 +23053,7 @@
             },
             "ignore-walk": {
               "version": "3.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
               "dev": true,
               "optional": true,
@@ -23025,7 +23063,7 @@
             },
             "inflight": {
               "version": "1.0.6",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
               "dev": true,
               "optional": true,
@@ -23036,21 +23074,21 @@
             },
             "inherits": {
               "version": "2.0.3",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
               "dev": true,
               "optional": true
             },
             "ini": {
               "version": "1.3.5",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
               "dev": true,
               "optional": true
             },
             "is-fullwidth-code-point": {
               "version": "1.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
               "dev": true,
               "optional": true,
@@ -23060,14 +23098,14 @@
             },
             "isarray": {
               "version": "1.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
               "dev": true,
               "optional": true
             },
             "minimatch": {
               "version": "3.0.4",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
               "dev": true,
               "optional": true,
@@ -23084,14 +23122,14 @@
             },
             "ms": {
               "version": "2.1.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
               "dev": true,
               "optional": true
             },
             "needle": {
               "version": "2.3.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
               "dev": true,
               "optional": true,
@@ -23103,7 +23141,7 @@
             },
             "node-pre-gyp": {
               "version": "0.12.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
               "dev": true,
               "optional": true,
@@ -23122,7 +23160,7 @@
             },
             "nopt": {
               "version": "4.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
               "dev": true,
               "optional": true,
@@ -23133,14 +23171,14 @@
             },
             "npm-bundled": {
               "version": "1.0.6",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
               "dev": true,
               "optional": true
             },
             "npm-packlist": {
               "version": "1.4.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
               "dev": true,
               "optional": true,
@@ -23151,7 +23189,7 @@
             },
             "npmlog": {
               "version": "4.1.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
               "dev": true,
               "optional": true,
@@ -23164,21 +23202,21 @@
             },
             "number-is-nan": {
               "version": "1.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
               "dev": true,
               "optional": true
             },
             "object-assign": {
               "version": "4.1.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
               "dev": true,
               "optional": true
             },
             "once": {
               "version": "1.4.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
               "dev": true,
               "optional": true,
@@ -23188,21 +23226,21 @@
             },
             "os-homedir": {
               "version": "1.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
               "dev": true,
               "optional": true
             },
             "os-tmpdir": {
               "version": "1.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
               "dev": true,
               "optional": true
             },
             "osenv": {
               "version": "0.1.5",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
               "dev": true,
               "optional": true,
@@ -23213,21 +23251,21 @@
             },
             "path-is-absolute": {
               "version": "1.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
               "dev": true,
               "optional": true
             },
             "process-nextick-args": {
               "version": "2.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
               "dev": true,
               "optional": true
             },
             "rc": {
               "version": "1.2.8",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
               "dev": true,
               "optional": true,
@@ -23240,7 +23278,7 @@
             },
             "readable-stream": {
               "version": "2.3.6",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
               "dev": true,
               "optional": true,
@@ -23256,7 +23294,7 @@
             },
             "rimraf": {
               "version": "2.6.3",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
               "dev": true,
               "optional": true,
@@ -23266,49 +23304,49 @@
             },
             "safe-buffer": {
               "version": "5.1.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
               "dev": true,
               "optional": true
             },
             "safer-buffer": {
               "version": "2.1.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
               "dev": true,
               "optional": true
             },
             "sax": {
               "version": "1.2.4",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
               "dev": true,
               "optional": true
             },
             "semver": {
               "version": "5.7.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
               "dev": true,
               "optional": true
             },
             "set-blocking": {
               "version": "2.0.0",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
               "dev": true,
               "optional": true
             },
             "signal-exit": {
               "version": "3.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
               "dev": true,
               "optional": true
             },
             "string-width": {
               "version": "1.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
               "dev": true,
               "optional": true,
@@ -23320,7 +23358,7 @@
             },
             "string_decoder": {
               "version": "1.1.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
               "dev": true,
               "optional": true,
@@ -23330,7 +23368,7 @@
             },
             "strip-ansi": {
               "version": "3.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
               "dev": true,
               "optional": true,
@@ -23340,21 +23378,21 @@
             },
             "strip-json-comments": {
               "version": "2.0.1",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
               "dev": true,
               "optional": true
             },
             "util-deprecate": {
               "version": "1.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
               "dev": true,
               "optional": true
             },
             "wide-align": {
               "version": "1.1.3",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
               "dev": true,
               "optional": true,
@@ -23364,7 +23402,7 @@
             },
             "wrappy": {
               "version": "1.0.2",
-              "resolved": false,
+              "resolved": "",
               "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
               "dev": true,
               "optional": true
@@ -25814,6 +25852,19 @@
         "invariant": "^2.0.0",
         "lodash": "^4.2.0",
         "redux": "^3.7.1"
+      },
+      "dependencies": {
+        "redux": {
+          "version": "3.7.2",
+          "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz",
+          "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==",
+          "requires": {
+            "lodash": "^4.2.1",
+            "lodash-es": "^4.2.1",
+            "loose-envify": "^1.1.0",
+            "symbol-observable": "^1.0.3"
+          }
+        }
       }
     },
     "dns-equal": {
@@ -28476,7 +28527,7 @@
       "dependencies": {
         "core-js": {
           "version": "1.2.7",
-          "resolved": "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
+          "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
           "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
         }
       }
@@ -43693,17 +43744,30 @@
       }
     },
     "react-redux": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.1.2.tgz",
-      "integrity": "sha512-Ns1G0XXc8hDyH/OcBHOxNgQx9ayH3SPxBnFCOidGKSle8pKihysQw2rG/PmciUQRoclhVBO8HMhiRmGXnDja9Q==",
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.0.tgz",
+      "integrity": "sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA==",
       "requires": {
-        "@babel/runtime": "^7.1.2",
+        "@babel/runtime": "^7.5.5",
         "hoist-non-react-statics": "^3.3.0",
-        "invariant": "^2.2.4",
-        "loose-envify": "^1.1.0",
-        "prop-types": "^15.6.1",
-        "react-is": "^16.6.0",
-        "react-lifecycles-compat": "^3.0.0"
+        "loose-envify": "^1.4.0",
+        "prop-types": "^15.7.2",
+        "react-is": "^16.9.0"
+      },
+      "dependencies": {
+        "@babel/runtime": {
+          "version": "7.12.5",
+          "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
+          "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
+          "requires": {
+            "regenerator-runtime": "^0.13.4"
+          }
+        },
+        "react-is": {
+          "version": "16.13.1",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+          "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+        }
       }
     },
     "react-router": {
@@ -44337,14 +44401,12 @@
       }
     },
     "redux": {
-      "version": "3.7.2",
-      "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz",
-      "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==",
+      "version": "4.0.5",
+      "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz",
+      "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==",
       "requires": {
-        "lodash": "^4.2.1",
-        "lodash-es": "^4.2.1",
-        "loose-envify": "^1.1.0",
-        "symbol-observable": "^1.0.3"
+        "loose-envify": "^1.4.0",
+        "symbol-observable": "^1.2.0"
       }
     },
     "redux-localstorage": {
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index c498ea8..b4585c7 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -145,7 +145,7 @@
     "react-jsonschema-form": "^1.2.0",
     "react-loadable": "^5.5.0",
     "react-markdown": "^4.3.1",
-    "react-redux": "^5.1.2",
+    "react-redux": "^7.2.0",
     "react-router-dom": "^5.1.2",
     "react-search-input": "^0.11.3",
     "react-select": "^3.1.0",
@@ -161,7 +161,7 @@
     "react-virtualized-auto-sizer": "^1.0.2",
     "react-virtualized-select": "^3.1.3",
     "react-window": "^1.8.5",
-    "redux": "^3.5.2",
+    "redux": "^4.0.5",
     "redux-localstorage": "^0.4.1",
     "redux-thunk": "^2.1.0",
     "redux-undo": "^1.0.0-beta9-9-7",
@@ -210,7 +210,7 @@
     "@types/react-dom": "^16.9.8",
     "@types/react-gravatar": "^2.6.8",
     "@types/react-json-tree": "^0.6.11",
-    "@types/react-redux": "^5.0.2",
+    "@types/react-redux": "^7.1.10",
     "@types/react-router-dom": "^5.1.5",
     "@types/react-select": "^3.0.19",
     "@types/react-table": "^7.0.19",
diff --git a/superset-frontend/src/dashboard/containers/FiltersBadge.tsx b/superset-frontend/src/dashboard/containers/FiltersBadge.tsx
index 6dccc7d..51a0a0b 100644
--- a/superset-frontend/src/dashboard/containers/FiltersBadge.tsx
+++ b/superset-frontend/src/dashboard/containers/FiltersBadge.tsx
@@ -16,8 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { connect, Dispatch } from 'react-redux';
-import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
+import { bindActionCreators, Dispatch } from 'redux';
 import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState';
 import {
   selectIndicatorsForChart,
@@ -29,7 +29,7 @@ export interface FiltersBadgeProps {
   chartId: number;
 }
 
-const mapDispatchToProps = (dispatch: Dispatch<any>) => {
+const mapDispatchToProps = (dispatch: Dispatch) => {
   return bindActionCreators(
     {
       onHighlightFilterSource: setDirectPathToChild,
diff --git a/superset-frontend/src/explore/actions/exploreActions.ts b/superset-frontend/src/explore/actions/exploreActions.ts
index f312f68..9d53f75 100644
--- a/superset-frontend/src/explore/actions/exploreActions.ts
+++ b/superset-frontend/src/explore/actions/exploreActions.ts
@@ -73,7 +73,7 @@ export function toggleFaveStar(isStarred: boolean) {
 
 export const FETCH_FAVE_STAR = 'FETCH_FAVE_STAR';
 export function fetchFaveStar(sliceId: string) {
-  return function (dispatch: Dispatch<ReturnType<typeof toggleFaveStar>>) {
+  return function (dispatch: Dispatch) {
     SupersetClient.get({
       endpoint: `${FAVESTAR_BASE_URL}/${sliceId}/count`,
     }).then(({ json }) => {
@@ -86,7 +86,7 @@ export function fetchFaveStar(sliceId: string) {
 
 export const SAVE_FAVE_STAR = 'SAVE_FAVE_STAR';
 export function saveFaveStar(sliceId: string, isStarred: boolean) {
-  return function (dispatch: Dispatch<ReturnType<typeof addDangerToast>>) {
+  return function (dispatch: Dispatch) {
     const urlSuffix = isStarred ? 'unselect' : 'select';
     SupersetClient.get({
       endpoint: `${FAVESTAR_BASE_URL}/${sliceId}/${urlSuffix}/`,
diff --git a/superset-frontend/src/logger/actions/index.ts b/superset-frontend/src/logger/actions/index.ts
index c89ff0c..9e605b7 100644
--- a/superset-frontend/src/logger/actions/index.ts
+++ b/superset-frontend/src/logger/actions/index.ts
@@ -16,12 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { Dispatch } from 'react-redux';
+import { Dispatch } from 'redux';
 
 export const LOG_EVENT = 'LOG_EVENT';
 
 export function logEvent(eventName: string, eventData: Record<string, any>) {
-  return (dispatch: Dispatch<never>) =>
+  return (dispatch: Dispatch) =>
     dispatch({
       type: LOG_EVENT,
       payload: {


[incubator-superset] 03/03: fix rest of unit tests

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

suddjian pushed a commit to branch redux-upgrade
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 3bf25111645968eb1f7f2944634b48f552af22d2
Author: Phillip Kelley-Dotson <pk...@yahoo.com>
AuthorDate: Fri Dec 4 17:17:49 2020 -0800

    fix rest of unit tests
---
 .../javascripts/dashboard/components/FiltersBadge_spec.tsx     | 10 +++-------
 superset-frontend/spec/javascripts/sqllab/App_spec.jsx         |  2 +-
 .../spec/javascripts/views/CRUD/alert/AlertList_spec.jsx       |  4 +---
 superset-frontend/src/dashboard/components/Dashboard.jsx       |  3 +--
 4 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx b/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx
index 7b0ae07..07dfdd5 100644
--- a/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx
+++ b/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx
@@ -82,10 +82,8 @@ describe('FiltersBadge', () => {
       dashboardFilters,
     });
     const wrapper = shallow(
-      <Provider store={store}>
-        <FiltersBadge chartId={sliceId} />
-      </Provider>,
-    );
+      <FiltersBadge {...{ store }} chartId={sliceId} />,
+    ).dive();
     expect(wrapper.dive().find('DetailsPanelPopover')).toExist();
     expect(
       wrapper.dive().find('[data-test="applied-filter-count"]'),
@@ -107,9 +105,7 @@ describe('FiltersBadge', () => {
       dashboardFilters,
     });
     const wrapper = shallow(
-      <Provider store={store}>
-        <FiltersBadge chartId={sliceId} />
-      </Provider>,
+      <FiltersBadge {...{ store }} chartId={sliceId} />,
     ).dive();
     expect(wrapper.dive().find('DetailsPanelPopover')).toExist();
     expect(
diff --git a/superset-frontend/spec/javascripts/sqllab/App_spec.jsx b/superset-frontend/spec/javascripts/sqllab/App_spec.jsx
index daedb8d..0629de2 100644
--- a/superset-frontend/spec/javascripts/sqllab/App_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/App_spec.jsx
@@ -33,7 +33,7 @@ describe('SqlLab App', () => {
   let wrapper;
 
   beforeEach(() => {
-    wrapper = shallow(<App />, { context: { store } });
+    wrapper = shallow(<App store={store} />).dive();
   });
 
   it('is valid', () => {
diff --git a/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx
index 22bc86e..9b9327d 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx
@@ -78,9 +78,7 @@ fetchMock.put(alertEndpoint, { ...mockalerts[0], active: false });
 fetchMock.put(alertsEndpoint, { ...mockalerts[0], active: false });
 
 async function mountAndWait(props) {
-  const mounted = mount(<AlertList {...props} user={mockUser} />, {
-    context: { store },
-  });
+  const mounted = mount(<AlertList {...props} user={mockUser} store={store} />);
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/src/dashboard/components/Dashboard.jsx b/superset-frontend/src/dashboard/components/Dashboard.jsx
index e4f373c..a582a3d 100644
--- a/superset-frontend/src/dashboard/components/Dashboard.jsx
+++ b/superset-frontend/src/dashboard/components/Dashboard.jsx
@@ -86,7 +86,6 @@ class Dashboard extends React.PureComponent {
   constructor(props) {
     super(props);
     this.appliedFilters = props.activeFilters || {};
-
     this.onVisibilityChange = this.onVisibilityChange.bind(this);
   }
 
@@ -142,7 +141,7 @@ class Dashboard extends React.PureComponent {
     }
   }
 
-  componentDidUpdate() {
+  componentDidUpdate(prevProps, prevState) {
     const { hasUnsavedChanges, editMode } = this.props.dashboardState;
 
     const { appliedFilters } = this;


[incubator-superset] 02/03: first round of test fixes

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

suddjian pushed a commit to branch redux-upgrade
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit c4d76b3c4dd3a00d35a2dfa323e6dc8cdda62265
Author: David Aaron Suddjian <aa...@gmail.com>
AuthorDate: Tue Dec 8 16:41:11 2020 -0800

    first round of test fixes
---
 .../components/URLShortLinkButton_spec.jsx         |  6 +-
 .../components/URLShortLinkModal_spec.jsx          |  7 ++-
 .../dashboard/components/FiltersBadge_spec.tsx     | 19 +++++-
 .../datasource/ChangeDatasourceModal_spec.jsx      |  3 +-
 .../datasource/DatasourceEditor_spec.jsx           |  4 +-
 .../datasource/DatasourceModal_spec.jsx            | 15 +++--
 .../components/ExploreViewContainer_spec.jsx       | 20 ++++--
 .../components/MetricDefinitionOption_spec.jsx     |  4 +-
 .../explore/components/SaveModal_spec.jsx          | 18 +++---
 .../sqllab/ExploreResultsButton_spec.jsx           | 15 +++--
 .../javascripts/sqllab/QueryAutoRefresh_spec.jsx   |  8 +--
 .../javascripts/sqllab/ShareSqlLabQuery_spec.jsx   |  5 +-
 .../spec/javascripts/sqllab/SouthPane_spec.jsx     |  4 +-
 .../javascripts/sqllab/TabbedSqlEditors_spec.jsx   | 73 ++++++++++++----------
 .../views/CRUD/annotation/AnnotationList_spec.jsx  |  9 ++-
 .../views/CRUD/annotation/AnnotationModal_spec.jsx | 10 +--
 .../annotationlayers/AnnotationLayerModal_spec.jsx |  9 ++-
 .../annotationlayers/AnnotationLayersList_spec.jsx |  9 +--
 .../views/CRUD/chart/ChartList_spec.jsx            |  9 ++-
 .../CRUD/csstemplates/CssTemplateModal_spec.jsx    |  9 ++-
 .../CRUD/csstemplates/CssTemplatesList_spec.jsx    |  9 ++-
 .../views/CRUD/dashboard/DashboardList_spec.jsx    |  9 ++-
 .../views/CRUD/data/database/DatabaseList_spec.jsx | 10 +--
 .../CRUD/data/database/DatabaseModal_spec.jsx      |  8 +--
 .../views/CRUD/data/dataset/DatasetList_spec.jsx   |  9 ++-
 .../CRUD/data/savedquery/SavedQueryList_spec.jsx   |  9 ++-
 .../savedquery/SavedQueryPreviewModal_spec.jsx     |  4 +-
 .../views/CRUD/welcome/ChartTable_spec.tsx         |  8 +--
 .../views/CRUD/welcome/DashboardTable_spec.tsx     |  8 +--
 .../views/CRUD/welcome/SavedQueries_spec.tsx       |  4 +-
 .../views/CRUD/welcome/Welcome_spec.tsx            |  9 ++-
 .../src/views/CRUD/data/query/QueryList.test.tsx   | 12 +++-
 .../CRUD/data/query/QueryPreviewModal.test.tsx     | 16 +++--
 33 files changed, 210 insertions(+), 161 deletions(-)

diff --git a/superset-frontend/spec/javascripts/components/URLShortLinkButton_spec.jsx b/superset-frontend/spec/javascripts/components/URLShortLinkButton_spec.jsx
index f58f2aa..fc61942 100644
--- a/superset-frontend/spec/javascripts/components/URLShortLinkButton_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/URLShortLinkButton_spec.jsx
@@ -33,9 +33,9 @@ describe('URLShortLinkButton', () => {
   function setup() {
     const mockStore = configureStore([]);
     const store = mockStore({});
-    return shallow(<URLShortLinkButton {...defaultProps} />, {
-      context: { store },
-    }).dive();
+    return shallow(
+      <URLShortLinkButton store={store} {...defaultProps} />,
+    ).dive();
   }
 
   it('renders OverlayTrigger', () => {
diff --git a/superset-frontend/spec/javascripts/components/URLShortLinkModal_spec.jsx b/superset-frontend/spec/javascripts/components/URLShortLinkModal_spec.jsx
index 2b68784..52babbb 100644
--- a/superset-frontend/spec/javascripts/components/URLShortLinkModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/URLShortLinkModal_spec.jsx
@@ -18,6 +18,7 @@
  */
 import React from 'react';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import { shallow } from 'enzyme';
 
 import URLShortLinkModal from 'src/components/URLShortLinkModal';
@@ -34,9 +35,9 @@ describe('URLShortLinkModal', () => {
   function setup() {
     const mockStore = configureStore([]);
     const store = mockStore({});
-    return shallow(<URLShortLinkModal {...defaultProps} />, {
-      context: { store },
-    }).dive();
+    return shallow(
+      <URLShortLinkModal store={store} {...defaultProps} />,
+    ).dive();
   }
 
   it('renders ModalTrigger', () => {
diff --git a/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx b/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx
index ea89927..7b0ae07 100644
--- a/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx
+++ b/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import { shallow } from 'enzyme';
 import { supersetTheme } from '@superset-ui/core';
+import { Provider } from 'react-redux';
 import * as SupersetUI from '@superset-ui/core';
 import { CHART_UPDATE_SUCCEEDED } from 'src/chart/chartAction';
 import { buildActiveFilters } from 'src/dashboard/util/activeDashboardFilters';
@@ -57,7 +58,11 @@ describe('FiltersBadge', () => {
       },
       dashboardFilters,
     });
-    const wrapper = shallow(<FiltersBadge {...{ store }} chartId={sliceId} />);
+    const wrapper = shallow(
+      <Provider store={store}>
+        <FiltersBadge chartId={sliceId} />,
+      </Provider>,
+    );
     expect(
       wrapper.dive().find('[data-test="applied-filter-count"]'),
     ).not.toExist();
@@ -76,7 +81,11 @@ describe('FiltersBadge', () => {
       },
       dashboardFilters,
     });
-    const wrapper = shallow(<FiltersBadge {...{ store }} chartId={sliceId} />);
+    const wrapper = shallow(
+      <Provider store={store}>
+        <FiltersBadge chartId={sliceId} />
+      </Provider>,
+    );
     expect(wrapper.dive().find('DetailsPanelPopover')).toExist();
     expect(
       wrapper.dive().find('[data-test="applied-filter-count"]'),
@@ -97,7 +106,11 @@ describe('FiltersBadge', () => {
       },
       dashboardFilters,
     });
-    const wrapper = shallow(<FiltersBadge {...{ store }} chartId={sliceId} />);
+    const wrapper = shallow(
+      <Provider store={store}>
+        <FiltersBadge chartId={sliceId} />
+      </Provider>,
+    ).dive();
     expect(wrapper.dive().find('DetailsPanelPopover')).toExist();
     expect(
       wrapper.dive().find('[data-test="applied-filter-count"]'),
diff --git a/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx b/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx
index fed3b4b..c058851 100644
--- a/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx
@@ -55,8 +55,7 @@ fetchMock.get(DATASOURCES_ENDPOINT, [mockDatasource['7__table']]);
 fetchMock.get(DATASOURCE_ENDPOINT, DATASOURCE_PAYLOAD);
 
 async function mountAndWait(props = mockedProps) {
-  const mounted = mount(<ChangeDatasourceModal {...props} />, {
-    context: { store },
+  const mounted = mount(<ChangeDatasourceModal store={store} {...props} />, {
     wrappingComponent: ThemeProvider,
     wrappingComponentProps: { theme: supersetTheme },
   });
diff --git a/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx b/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx
index 3caa82b..a09cb54 100644
--- a/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx
+++ b/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx
@@ -51,8 +51,8 @@ describe('DatasourceEditor', () => {
   let isFeatureEnabledMock;
 
   beforeEach(() => {
-    el = <DatasourceEditor {...props} />;
-    wrapper = shallow(el, { context: { store } }).dive();
+    el = <DatasourceEditor {...props} store={store} />;
+    wrapper = shallow(el).dive();
     inst = wrapper.instance();
   });
 
diff --git a/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx b/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx
index dc5e487..18890c5 100644
--- a/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import { act } from 'react-dom/test-utils';
 import configureStore from 'redux-mock-store';
 import { mount } from 'enzyme';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import thunk from 'redux-thunk';
 import sinon from 'sinon';
@@ -50,11 +51,15 @@ const mockedProps = {
 };
 
 async function mountAndWait(props = mockedProps) {
-  const mounted = mount(<DatasourceModal {...props} />, {
-    context: { store },
-    wrappingComponent: ThemeProvider,
-    wrappingComponentProps: { theme: supersetTheme },
-  });
+  const mounted = mount(
+    <Provider store={store}>
+      <DatasourceModal {...props} />
+    </Provider>,
+    {
+      wrappingComponent: ThemeProvider,
+      wrappingComponentProps: { theme: supersetTheme },
+    },
+  );
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/spec/javascripts/explore/components/ExploreViewContainer_spec.jsx b/superset-frontend/spec/javascripts/explore/components/ExploreViewContainer_spec.jsx
index ffcd43b..19b8bf3 100644
--- a/superset-frontend/spec/javascripts/explore/components/ExploreViewContainer_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/components/ExploreViewContainer_spec.jsx
@@ -17,11 +17,14 @@
  * under the License.
  */
 import React from 'react';
+import * as ReactAll from 'react';
 import configureStore from 'redux-mock-store';
 import thunk from 'redux-thunk';
 import sinon from 'sinon';
-import { shallow } from 'enzyme';
+import { Provider, Subscription } from 'react-redux';
+import { shallow, mount } from 'enzyme';
 
+import { supersetTheme, ThemeProvider } from '@superset-ui/core';
 import getInitialState from 'src/explore/reducers/getInitialState';
 import ExploreViewContainer from 'src/explore/components/ExploreViewContainer';
 import QueryAndSaveBtns from 'src/explore/components/QueryAndSaveBtns';
@@ -36,6 +39,14 @@ describe('ExploreViewContainer', () => {
   let wrapper;
   let isFeatureEnabledMock;
 
+  jest.spyOn(ReactAll, 'useContext').mockImplementation(() => {
+    console.log('i inside mocked implmentation');
+    return {
+      store,
+      subscription: new Subscription(store),
+    };
+  });
+
   beforeAll(() => {
     isFeatureEnabledMock = jest
       .spyOn(featureFlags, 'isFeatureEnabled')
@@ -57,10 +68,11 @@ describe('ExploreViewContainer', () => {
   });
 
   beforeEach(() => {
-    wrapper = shallow(<ExploreViewContainer />, {
-      context: { store },
+    wrapper = shallow(<ExploreViewContainer store={store} />, {
       disableLifecycleMethods: true,
-    }).dive();
+    })
+      .dive()
+      .dive();
   });
 
   it('renders', () => {
diff --git a/superset-frontend/spec/javascripts/explore/components/MetricDefinitionOption_spec.jsx b/superset-frontend/spec/javascripts/explore/components/MetricDefinitionOption_spec.jsx
index 7615498..b626674 100644
--- a/superset-frontend/spec/javascripts/explore/components/MetricDefinitionOption_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/components/MetricDefinitionOption_spec.jsx
@@ -29,9 +29,7 @@ describe('MetricDefinitionOption', () => {
   const store = mockStore({});
 
   function setup(props) {
-    return shallow(<MetricDefinitionOption {...props} />, {
-      context: { store },
-    }).dive();
+    return shallow(<MetricDefinitionOption store={store} {...props} />).dive();
   }
 
   it('renders a MetricOption given a saved metric', () => {
diff --git a/superset-frontend/spec/javascripts/explore/components/SaveModal_spec.jsx b/superset-frontend/spec/javascripts/explore/components/SaveModal_spec.jsx
index a352232..55ea431 100644
--- a/superset-frontend/spec/javascripts/explore/components/SaveModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/components/SaveModal_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import configureStore from 'redux-mock-store';
 import thunk from 'redux-thunk';
 import { bindActionCreators } from 'redux';
+import { Provider } from 'react-redux';
 
 import { shallow } from 'enzyme';
 import { styledMount as mount } from 'spec/helpers/theming';
@@ -72,9 +73,9 @@ describe('SaveModal', () => {
   };
 
   const getWrapper = () =>
-    shallow(<SaveModal {...defaultProps} />, {
-      context: { store },
-    }).dive();
+    shallow(<SaveModal {...defaultProps} store={store} />)
+      .dive()
+      .dive();
 
   it('renders a Modal with the right set of components', () => {
     const wrapper = getWrapper();
@@ -117,15 +118,14 @@ describe('SaveModal', () => {
   });
 
   it('componentDidMount', () => {
-    sinon.spy(SaveModal.prototype, 'componentDidMount');
     sinon.spy(defaultProps.actions, 'fetchDashboards');
-    mount(<SaveModal {...defaultProps} />, {
-      context: { store },
-    });
-    expect(SaveModal.prototype.componentDidMount.calledOnce).toBe(true);
+    mount(
+      <Provider store={store}>
+        <SaveModal {...defaultProps} />
+      </Provider>,
+    );
     expect(defaultProps.actions.fetchDashboards.calledOnce).toBe(true);
 
-    SaveModal.prototype.componentDidMount.restore();
     defaultProps.actions.fetchDashboards.restore();
   });
 
diff --git a/superset-frontend/spec/javascripts/sqllab/ExploreResultsButton_spec.jsx b/superset-frontend/spec/javascripts/sqllab/ExploreResultsButton_spec.jsx
index 98affc0..3beb1dd 100644
--- a/superset-frontend/spec/javascripts/sqllab/ExploreResultsButton_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/ExploreResultsButton_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import configureStore from 'redux-mock-store';
 import thunk from 'redux-thunk';
 import { shallow } from 'enzyme';
+import { Provider } from 'react-redux';
 import sinon from 'sinon';
 import fetchMock from 'fetch-mock';
 import shortid from 'shortid';
@@ -72,9 +73,9 @@ describe('ExploreResultsButton', () => {
     value: 'bar',
   };
   const getExploreResultsButtonWrapper = (props = mockedProps) =>
-    shallow(<ExploreResultsButton {...props} />, {
-      context: { store },
-    }).dive();
+    shallow(<ExploreResultsButton store={store} {...props} />)
+      .dive()
+      .dive();
 
   it('renders', () => {
     expect(React.isValidElement(<ExploreResultsButton />)).toBe(true);
@@ -149,9 +150,11 @@ describe('ExploreResultsButton', () => {
       query: longQuery,
       database,
     };
-    const longQueryWrapper = shallow(<ExploreResultsButton {...props} />, {
-      context: { store },
-    }).dive();
+    const longQueryWrapper = shallow(
+      <ExploreResultsButton store={store} {...props} />,
+    )
+      .dive()
+      .dive();
     const inst = longQueryWrapper.instance();
     expect(inst.getQueryDuration()).toBe(100.7050400390625);
   });
diff --git a/superset-frontend/spec/javascripts/sqllab/QueryAutoRefresh_spec.jsx b/superset-frontend/spec/javascripts/sqllab/QueryAutoRefresh_spec.jsx
index 4295a2a..1065b80 100644
--- a/superset-frontend/spec/javascripts/sqllab/QueryAutoRefresh_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/QueryAutoRefresh_spec.jsx
@@ -39,12 +39,10 @@ describe('QueryAutoRefresh', () => {
     sqlLab,
   };
   const store = mockStore(state);
-
   const getWrapper = () =>
-    shallow(<QueryAutoRefresh />, {
-      context: { store },
-    }).dive();
-
+    shallow(<QueryAutoRefresh store={store} />)
+      .dive()
+      .dive();
   let wrapper;
 
   it('shouldCheckForQueries', () => {
diff --git a/superset-frontend/spec/javascripts/sqllab/ShareSqlLabQuery_spec.jsx b/superset-frontend/spec/javascripts/sqllab/ShareSqlLabQuery_spec.jsx
index 05bc744..693c45f 100644
--- a/superset-frontend/spec/javascripts/sqllab/ShareSqlLabQuery_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/ShareSqlLabQuery_spec.jsx
@@ -66,10 +66,7 @@ describe('ShareSqlLabQuery via /kv/store', () => {
 
   function setup(overrideProps) {
     const wrapper = shallow(
-      <ShareSqlLabQuery {...defaultProps} {...overrideProps} />,
-      {
-        context: { store },
-      },
+      <ShareSqlLabQuery store={store} {...defaultProps} {...overrideProps} />,
     ).dive(); // wrapped in withToasts HOC
 
     return wrapper;
diff --git a/superset-frontend/spec/javascripts/sqllab/SouthPane_spec.jsx b/superset-frontend/spec/javascripts/sqllab/SouthPane_spec.jsx
index 75a8519..6209b96 100644
--- a/superset-frontend/spec/javascripts/sqllab/SouthPane_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/SouthPane_spec.jsx
@@ -76,9 +76,7 @@ describe('SouthPane', () => {
   };
 
   const getWrapper = () =>
-    shallow(<SouthPaneContainer {...mockedProps} />, {
-      context: { store },
-    });
+    shallow(<SouthPaneContainer store={store} {...mockedProps} />).dive();
 
   let wrapper;
 
diff --git a/superset-frontend/spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx b/superset-frontend/spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx
index 2832b32..c679bf8 100644
--- a/superset-frontend/spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/TabbedSqlEditors_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import configureStore from 'redux-mock-store';
 import thunk from 'redux-thunk';
 import URI from 'urijs';
+import { Provider } from 'react-redux';
 import { shallow, mount } from 'enzyme';
 import sinon from 'sinon';
 import { supersetTheme, ThemeProvider } from '@superset-ui/core';
@@ -73,9 +74,9 @@ describe('TabbedSqlEditors', () => {
     maxRow: 100000,
   };
   const getWrapper = () =>
-    shallow(<TabbedSqlEditors {...mockedProps} />, {
-      context: { store },
-    }).dive();
+    shallow(<TabbedSqlEditors store={store} {...mockedProps} />)
+      .dive()
+      .dive();
 
   let wrapper;
   it('is valid', () => {
@@ -87,70 +88,74 @@ describe('TabbedSqlEditors', () => {
     let uriStub;
     beforeEach(() => {
       sinon.stub(window.history, 'replaceState');
-      sinon.spy(TabbedSqlEditors.prototype, 'componentDidMount');
+      // sinon.spy(TabbedSqlEditors.prototype, 'componentDidMount');
       uriStub = sinon.stub(URI.prototype, 'search');
     });
     afterEach(() => {
       window.history.replaceState.restore();
-      TabbedSqlEditors.prototype.componentDidMount.restore();
+      // TabbedSqlEditors.prototype.componentDidMount.restore();
       uriStub.restore();
     });
     it('should handle id', () => {
       uriStub.returns({ id: 1 });
-      wrapper = mount(<TabbedSqlEditors {...mockedProps} />, {
-        context: { store },
-        wrappingComponent: ThemeProvider,
-        wrappingComponentProps: { theme: supersetTheme },
-      });
-      expect(TabbedSqlEditors.prototype.componentDidMount.calledOnce).toBe(
-        true,
+      wrapper = mount(
+        <Provider store={store}>
+          <TabbedSqlEditors {...mockedProps} />
+        </Provider>,
+        {
+          wrappingComponent: ThemeProvider,
+          wrappingComponentProps: { theme: supersetTheme },
+        },
       );
+      /* expect(TabbedSqlEditors.prototype.componentDidMount.calledOnce).toBe(
+        true,
+      ); */
       expect(window.history.replaceState.getCall(0).args[2]).toBe(
         '/superset/sqllab',
       );
     });
     it('should handle savedQueryId', () => {
       uriStub.returns({ savedQueryId: 1 });
-      wrapper = mount(<TabbedSqlEditors {...mockedProps} />, {
-        context: { store },
-        wrappingComponent: ThemeProvider,
-        wrappingComponentProps: { theme: supersetTheme },
-      });
-      expect(TabbedSqlEditors.prototype.componentDidMount.calledOnce).toBe(
-        true,
+      wrapper = mount(
+        <Provider store={store}>
+          <TabbedSqlEditors {...mockedProps} />
+        </Provider>,
+        {
+          wrappingComponent: ThemeProvider,
+          wrappingComponentProps: { theme: supersetTheme },
+        },
       );
+      /* expect(TabbedSqlEditors.prototype.componentDidMount.calledOnce).toBe(
+        true,
+      ); */
       expect(window.history.replaceState.getCall(0).args[2]).toBe(
         '/superset/sqllab',
       );
     });
     it('should handle sql', () => {
       uriStub.returns({ sql: 1, dbid: 1 });
-      wrapper = mount(<TabbedSqlEditors {...mockedProps} />, {
-        context: { store },
-        wrappingComponent: ThemeProvider,
-        wrappingComponentProps: { theme: supersetTheme },
-      });
-      expect(TabbedSqlEditors.prototype.componentDidMount.calledOnce).toBe(
-        true,
+      wrapper = mount(
+        <Provider store={store}>
+          <TabbedSqlEditors {...mockedProps} />
+        </Provider>,
+        {
+          wrappingComponent: ThemeProvider,
+          wrappingComponentProps: { theme: supersetTheme },
+        },
       );
+      /* expect(TabbedSqlEditors.prototype.componentDidMount.calledOnce).toBe(
+        true,
+      ); */
       expect(window.history.replaceState.getCall(0).args[2]).toBe(
         '/superset/sqllab',
       );
     });
   });
   describe('UNSAFE_componentWillReceiveProps', () => {
-    let spy;
     beforeEach(() => {
       wrapper = getWrapper();
-      spy = sinon.spy(
-        TabbedSqlEditors.prototype,
-        'UNSAFE_componentWillReceiveProps',
-      );
       wrapper.setProps({ queryEditors, queries, tabHistory, tables });
     });
-    afterEach(() => {
-      spy.restore();
-    });
     it('should update queriesArray and dataPreviewQueries', () => {
       expect(wrapper.state().queriesArray.slice(-1)[0]).toBe(
         queries['B1-VQU1zW'],
diff --git a/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationList_spec.jsx
index e096c7c..84b9516 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationList_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { Provider } from 'react-redux';
 import { styledMount as mount } from 'spec/helpers/theming';
 
 import AnnotationList from 'src/views/CRUD/annotation/AnnotationList';
@@ -74,9 +75,11 @@ jest.mock('react-router-dom', () => ({
 }));
 
 async function mountAndWait(props) {
-  const mounted = mount(<AnnotationList {...props} />, {
-    context: { store },
-  });
+  const mounted = mount(
+    <Provider store={store}>
+      <AnnotationList {...props} />
+    </Provider>,
+  );
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationModal_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationModal_spec.jsx
index 1babcfe..54d1422 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/annotation/AnnotationModal_spec.jsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import AnnotationModal from 'src/views/CRUD/annotation/AnnotationModal';
 import Modal from 'src/common/components/Modal';
@@ -51,11 +52,12 @@ const mockedProps = {
 };
 
 async function mountAndWait(props = mockedProps) {
-  const mounted = mount(<AnnotationModal show {...props} />, {
-    context: { store },
-  });
+  const mounted = mount(
+    <Provider store={store}>
+      <AnnotationModal show {...props} />
+    </Provider>,
+  );
   await waitForComponentToPaint(mounted);
-
   return mounted;
 }
 
diff --git a/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayerModal_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayerModal_spec.jsx
index ed927bf..64fd55b 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayerModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayerModal_spec.jsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import AnnotationLayerModal from 'src/views/CRUD/annotationlayers/AnnotationLayerModal';
 import Modal from 'src/common/components/Modal';
@@ -43,9 +44,11 @@ const mockedProps = {
 };
 
 async function mountAndWait(props = mockedProps) {
-  const mounted = mount(<AnnotationLayerModal show {...props} />, {
-    context: { store },
-  });
+  const mounted = mount(
+    <Provider store={store}>
+      <AnnotationLayerModal show {...props} />
+    </Provider>,
+  );
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayersList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayersList_spec.jsx
index 987fc76..22e9b47 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayersList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/annotationlayers/AnnotationLayersList_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { Provider } from 'react-redux';
 import { styledMount as mount } from 'spec/helpers/theming';
 
 import AnnotationLayersList from 'src/views/CRUD/annotationlayers/AnnotationLayersList';
@@ -78,10 +79,10 @@ fetchMock.get(layersRelatedEndpoint, {
 });
 
 describe('AnnotationLayersList', () => {
-  const wrapper = mount(<AnnotationLayersList user={mockUser} />, {
-    context: { store },
-  });
-
+  const wrapper = mount(
+    <Provider store={store}>    
+    <AnnotationLayersList store={store} user={mockUser} />
+</Provider>);
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
   });
diff --git a/superset-frontend/spec/javascripts/views/CRUD/chart/ChartList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/chart/ChartList_spec.jsx
index b871421..1ba7340 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/chart/ChartList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/chart/ChartList_spec.jsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import * as featureFlags from 'src/featureFlags';
 
@@ -97,9 +98,11 @@ describe('ChartList', () => {
     isFeatureEnabledMock.restore();
   });
   const mockedProps = {};
-  const wrapper = mount(<ChartList {...mockedProps} user={mockUser} />, {
-    context: { store },
-  });
+  const wrapper = mount(
+    <Provider store={store}>
+      <ChartList {...mockedProps} user={mockUser} />
+    </Provider>,
+  );
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
diff --git a/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplateModal_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplateModal_spec.jsx
index d001866..1e3d3bf 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplateModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplateModal_spec.jsx
@@ -18,6 +18,7 @@
  */
 import React from 'react';
 import thunk from 'redux-thunk';
+import { Provider } from 'react-redux';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
 import CssTemplateModal from 'src/views/CRUD/csstemplates/CssTemplateModal';
@@ -44,9 +45,11 @@ const mockedProps = {
 };
 
 async function mountAndWait(props = mockedProps) {
-  const mounted = mount(<CssTemplateModal show {...props} />, {
-    context: { store },
-  });
+  const mounted = mount(
+    <Provider store={store}>
+      <CssTemplateModal show {...props} />
+    </Provider>,
+  );
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
index f293bf1..b0d29d3 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import { styledMount as mount } from 'spec/helpers/theming';
 
@@ -76,9 +77,11 @@ fetchMock.get(templatesRelatedEndpoint, {
 });
 
 describe('CssTemplatesList', () => {
-  const wrapper = mount(<CssTemplatesList user={mockUser} />, {
-    context: { store },
-  });
+  const wrapper = mount(
+    <Provider store={store}>
+      <CssTemplatesList store={store} user={mockUser} />
+    </Provider>,
+  );
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
diff --git a/superset-frontend/spec/javascripts/views/CRUD/dashboard/DashboardList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/dashboard/DashboardList_spec.jsx
index 42077dd..f20010f 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/dashboard/DashboardList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/dashboard/DashboardList_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { Provider } from 'react-redux';
 import * as featureFlags from 'src/featureFlags';
 
 import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
@@ -92,9 +93,11 @@ describe('DashboardList', () => {
   });
 
   const mockedProps = {};
-  const wrapper = mount(<DashboardList {...mockedProps} user={mockUser} />, {
-    context: { store },
-  });
+  const wrapper = mount(
+    <Provider store={store}>
+      <DashboardList {...mockedProps} user={mockUser} />
+    </Provider>,
+  );
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
diff --git a/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseList_spec.jsx
index 4710728..52d129c 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseList_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { Provider } from 'react-redux';
 import { styledMount as mount } from 'spec/helpers/theming';
 
 import DatabaseList from 'src/views/CRUD/data/database/DatabaseList';
@@ -81,10 +82,11 @@ fetchMock.get(databaseRelatedEndpoint, {
 });
 
 describe('DatabaseList', () => {
-  const wrapper = mount(<DatabaseList user={mockUser} />, {
-    context: { store },
-  });
-
+  const wrapper = mount(
+    <Provider store={store}>
+      <DatabaseList user={mockUser} />
+    </Provider>,
+  );
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
   });
diff --git a/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseModal_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseModal_spec.jsx
index e4c16fd..9a9126c 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/data/database/DatabaseModal_spec.jsx
@@ -43,12 +43,8 @@ const dbProps = {
 };
 
 describe('DatabaseModal', () => {
-  const wrapper = mount(<DatabaseModal {...mockedProps} />, {
-    context: { store },
-  });
-  const editWrapper = mount(<DatabaseModal {...dbProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(<DatabaseModal store={store} {...mockedProps} />);
+  const editWrapper = mount(<DatabaseModal store={store} {...dbProps} />);
 
   it('renders', () => {
     expect(wrapper.find(DatabaseModal)).toExist();
diff --git a/superset-frontend/spec/javascripts/views/CRUD/data/dataset/DatasetList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/data/dataset/DatasetList_spec.jsx
index b93ea51..d919bc0 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/data/dataset/DatasetList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/data/dataset/DatasetList_spec.jsx
@@ -20,6 +20,7 @@ import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { Provider } from 'react-redux';
 import { styledMount as mount } from 'spec/helpers/theming';
 
 import DatasetList from 'src/views/CRUD/data/dataset/DatasetList';
@@ -74,9 +75,11 @@ fetchMock.get(databaseEndpoint, {
 });
 
 async function mountAndWait(props) {
-  const mounted = mount(<DatasetList {...props} user={mockUser} />, {
-    context: { store },
-  });
+  const mounted = mount(
+    <Provider store={store}>
+      <DatasetList {...props} user={mockUser} />
+    </Provider>,
+  );
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryList_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryList_spec.jsx
index 0b32bb0..a57cf9b 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryList_spec.jsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import { styledMount as mount } from 'spec/helpers/theming';
 import SavedQueryList from 'src/views/CRUD/data/savedquery/SavedQueryList';
@@ -91,9 +92,11 @@ fetchMock.get(queriesDistinctEndpoint, {
 });
 
 describe('SavedQueryList', () => {
-  const wrapper = mount(<SavedQueryList />, {
-    context: { store },
-  });
+  const wrapper = mount(
+    <Provider store={store}>
+      <SavedQueryList />
+    </Provider>,
+  );
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
diff --git a/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryPreviewModal_spec.jsx b/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryPreviewModal_spec.jsx
index 4a82609..19d1235 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryPreviewModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/data/savedquery/SavedQueryPreviewModal_spec.jsx
@@ -73,9 +73,7 @@ const SAVED_QUERY_PAYLOAD = { result: mockqueries[1] };
 fetchMock.get(FETCH_SAVED_QUERY_ENDPOINT, SAVED_QUERY_PAYLOAD);
 
 async function mountAndWait(props = mockedProps) {
-  const mounted = mount(<SavedQueryPreviewModal {...props} />, {
-    context: { store },
-  });
+  const mounted = mount(<SavedQueryPreviewModal store={store} {...props} />);
   await waitForComponentToPaint(mounted);
 
   return mounted;
diff --git a/superset-frontend/spec/javascripts/views/CRUD/welcome/ChartTable_spec.tsx b/superset-frontend/spec/javascripts/views/CRUD/welcome/ChartTable_spec.tsx
index a297929..7b60e31 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/welcome/ChartTable_spec.tsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/welcome/ChartTable_spec.tsx
@@ -57,9 +57,7 @@ describe('ChartTable', () => {
       userId: '2',
     },
   };
-  const wrapper = mount(<ChartTable {...mockedProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(<ChartTable store={store} {...mockedProps} />);
   it('it renders', () => {
     expect(wrapper.find(ChartTable)).toExist();
   });
@@ -78,9 +76,7 @@ describe('ChartTable', () => {
 
   it('display EmptyState if there is no data', () => {
     fetchMock.resetHistory();
-    const wrapper = mount(<ChartTable {...mockedProps} />, {
-      context: { store },
-    });
+    const wrapper = mount(<ChartTable store={store} {...mockedProps} />);
     expect(wrapper.find('EmptyState')).toExist();
   });
 });
diff --git a/superset-frontend/spec/javascripts/views/CRUD/welcome/DashboardTable_spec.tsx b/superset-frontend/spec/javascripts/views/CRUD/welcome/DashboardTable_spec.tsx
index 491c582..8fbc75d 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/welcome/DashboardTable_spec.tsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/welcome/DashboardTable_spec.tsx
@@ -59,9 +59,7 @@ describe('DashboardTable', () => {
     },
     mine: mockDashboards,
   };
-  const wrapper = mount(<DashboardTable {...dashboardProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(<DashboardTable store={store} {...dashboardProps} />);
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
@@ -95,10 +93,8 @@ describe('DashboardTable', () => {
         dashboardFilter="Mine"
         user={{ userId: '2' }}
         mine={[]}
+        store={store}
       />,
-      {
-        context: { store },
-      },
     );
     expect(wrapper.find('EmptyState')).toExist();
   });
diff --git a/superset-frontend/spec/javascripts/views/CRUD/welcome/SavedQueries_spec.tsx b/superset-frontend/spec/javascripts/views/CRUD/welcome/SavedQueries_spec.tsx
index 081cafd..1ef5748 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/welcome/SavedQueries_spec.tsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/welcome/SavedQueries_spec.tsx
@@ -77,9 +77,7 @@ describe('SavedQueries', () => {
     mine: mockqueries,
   };
 
-  const wrapper = mount(<SavedQueries {...savedQueryProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(<SavedQueries store={store} {...savedQueryProps} />);
 
   const clickTab = (idx: number) => {
     act(() => {
diff --git a/superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx b/superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx
index 7bb22a0..8788e52 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx
@@ -18,6 +18,7 @@
  */
 import React from 'react';
 import { styledMount as mount } from 'spec/helpers/theming';
+import { Provider } from 'react-redux';
 import thunk from 'redux-thunk';
 import fetchMock from 'fetch-mock';
 import configureStore from 'redux-mock-store';
@@ -69,9 +70,11 @@ describe('Welcome', () => {
       isActive: true,
     },
   };
-  const wrapper = mount(<Welcome {...mockedProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(
+    <Provider store={store}>
+      <Welcome {...mockedProps} />
+    </Provider>,
+  );
 
   it('renders', () => {
     expect(wrapper).toExist();
diff --git a/superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx b/superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx
index eb18e92..83ecc58 100644
--- a/superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx
+++ b/superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx
@@ -19,6 +19,7 @@
 import React from 'react';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
+import { Provider } from 'react-redux';
 import fetchMock from 'fetch-mock';
 import { act } from 'react-dom/test-utils';
 
@@ -87,9 +88,14 @@ fetchMock.get('glob:*/api/v1/query/disting/status*', {
 
 describe('QueryList', () => {
   const mockedProps = {};
-  const wrapper = mount(<QueryList {...mockedProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(
+    <Provider store={store}>
+      <QueryList {...mockedProps} />
+    </Provider>,
+    {
+      context: { store },
+    },
+  );
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
diff --git a/superset-frontend/src/views/CRUD/data/query/QueryPreviewModal.test.tsx b/superset-frontend/src/views/CRUD/data/query/QueryPreviewModal.test.tsx
index 0407c76..7a85e4c 100644
--- a/superset-frontend/src/views/CRUD/data/query/QueryPreviewModal.test.tsx
+++ b/superset-frontend/src/views/CRUD/data/query/QueryPreviewModal.test.tsx
@@ -75,9 +75,7 @@ describe('QueryPreviewModal', () => {
     }),
     show: true,
   };
-  const wrapper = mount(<QueryPreviewModal {...mockedProps} />, {
-    context: { store },
-  });
+  const wrapper = mount(<QueryPreviewModal store={store} {...mockedProps} />);
 
   beforeAll(async () => {
     await waitForComponentToPaint(wrapper);
@@ -122,9 +120,9 @@ describe('QueryPreviewModal', () => {
         ...mockedProps,
         query: mockQueries[1],
       };
-      const wrapper2 = mount(<QueryPreviewModal {...mockedProps2} />, {
-        context: { store },
-      });
+      const wrapper2 = mount(
+        <QueryPreviewModal store={store} {...mockedProps2} />,
+      );
       act(() => {
         const props = wrapper2
           .find('[data-test="previous-query"]')
@@ -156,9 +154,9 @@ describe('QueryPreviewModal', () => {
         ...mockedProps,
         query: mockQueries[2],
       };
-      const wrapper2 = mount(<QueryPreviewModal {...mockedProps2} />, {
-        context: { store },
-      });
+      const wrapper2 = mount(
+        <QueryPreviewModal store={store} {...mockedProps2} />,
+      );
 
       expect(
         wrapper2.find('[data-test="next-query"]').first().props().disabled,