You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/11 20:09:23 UTC

[GitHub] [superset] codyml commented on a diff in pull request #20673: fix(explore): Fix chart standalone URL for report/thumbnail generation

codyml commented on code in PR #20673:
URL: https://github.com/apache/superset/pull/20673#discussion_r918308290


##########
tests/integration_tests/core_tests.py:
##########
@@ -117,15 +117,6 @@ def test_dashboard_endpoint(self):
     @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
     def test_slice_endpoint(self):
         self.login(username="admin")
-        slc = self.get_slice("Girls", db.session)
-        resp = self.get_resp("/superset/slice/{}/".format(slc.id))
-        assert "Original value" in resp
-        assert "List Roles" in resp
-
-        # Testing overrides
-        resp = self.get_resp("/superset/slice/{}/?standalone=true".format(slc.id))
-        assert '<div class="navbar' not in resp

Review Comment:
   I believe that now that Explore is in the SPA, the response doc just contains the SPA wrapper.  I was assuming that `get_resp` doesn't download/execute the JS bundle, so I think these tests were only still passing by accident:
   - `"Original value"` and `"List Roles"` are contained in the embedded bootstrap data but I don't think that bootstrap data is used by Explore anymore (it uses API endpoints now)
   - `<div class="navbar'` isn't present in either standalone or non-standalone mode anymore
   
   So, it seemed like these tests don't test anything meaningful anymore, with the exception of the 404 test below.  I looked around for examples of backend tests for Dashboard, but didn't see much and assumed they had also been removed when Dashboard was brought into the SPA.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org