Files
superset2/tests/integration_tests/versioning/activity_view_tests.py
Mike Bridge 9d8a318f34 feat(activity-view): Phase 5 US3 — dataset /activity/ endpoint (T033-T036)
Implements the dataset activity stream. Per AV-004 datasets have no
transitive layer in V2: dataset activity = dataset's own edits only,
regardless of whether charts use the dataset. The chart/dashboard
endpoints surface dataset edits in their *related* streams (already
shipped); the dataset endpoint stays narrowly self-only.

* T033 DatasetRestApi.activity — third application of the shared
  resolve_endpoint_path_entity + parse_activity_query_params pattern.
  Endpoint body is ~10 lines of real logic, same shape as T016 and
  T028 but with SqlaTable as the path entity. The activity orchestrator
  already short-circuits the related-entity resolution for datasets
  (_resolve_scope returns [] for related when path_kind="SqlaTable"),
  so the dataset endpoint inherits the V2 semantics for free.

* T034 TestDatasetActivityView class added to activity_view_tests.py.

* T035 test_dataset_activity_excludes_chart_edits — AS-1 of US3 /
  AV-004 verbatim. Edit a chart that uses the dataset; assert the
  chart edit does NOT appear in the dataset's activity stream
  (datasets are read-only upstream of charts in V2).

* T036 test_dataset_activity_includes_dataset_self_edits — confirms
  the positive path: editing the dataset's own description surfaces
  a SqlaTable/self record.

* New test_dataset_activity_related_only_returns_empty — AV-004 in
  contract form: ?include=related on a dataset returns an empty
  result list and count=0 because there are no related entities to
  draw from.

Plus the standard boundary tests (404 for unknown UUID, 400 for
malformed UUID / invalid include, 403 for non-owner, 200 envelope
shape).

Full activity-view suite: 27/27 integration tests + 57/57 unit tests
green. All three endpoint families live.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:37:25 -06:00

24 KiB