mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat: Enable passing a permalink to cache_dashboard_screenshot endpoint (#32900)
This commit is contained in:
committed by
GitHub
parent
8f35a3ec8c
commit
b92909d621
@@ -3038,6 +3038,18 @@ class TestDashboardApi(ApiOwnersTestCaseMixin, InsertChartMixin, SupersetTestCas
|
||||
response = self._cache_screenshot(dashboard.id)
|
||||
assert response.status_code == 202
|
||||
|
||||
@with_feature_flags(THUMBNAILS=True, ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS=True)
|
||||
@pytest.mark.usefixtures("create_dashboard_with_tag")
|
||||
def test_cache_dashboard_screenshot_success_permalink_payload(self):
|
||||
self.login(ADMIN_USERNAME)
|
||||
dashboard = (
|
||||
db.session.query(Dashboard)
|
||||
.filter(Dashboard.dashboard_title == "dash with tag")
|
||||
.first()
|
||||
)
|
||||
response = self._cache_screenshot(dashboard.id, {"permalinkKey": "1234"})
|
||||
assert response.status_code == 202
|
||||
|
||||
@with_feature_flags(THUMBNAILS=True, ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS=True)
|
||||
@pytest.mark.usefixtures("create_dashboard_with_tag")
|
||||
def test_cache_dashboard_screenshot_dashboard_validation(self):
|
||||
|
||||
Reference in New Issue
Block a user