mikebridge opened a new pull request, #45526:
URL: https://github.com/apache/superset/pull/45526

   ### SUMMARY
   
   Scheduled reports on charts built on semantic views had no regression 
coverage. These tests pin CSV and TEXT content generation through the real 
chart-data API, plus PNG and PDF content generation at the mocked 
browser-capture boundary.
   
   The tests reuse the report schedule, capture-context and image helpers, and 
share the existing semantic extension fixtures with the provider tests. They 
verify that report asset validation accepts a semantic-view chart even when its 
SQL-table relationship is empty.
   
   The tests run with SQLite and the in-memory semantic provider. 
Authentication and datasource lookup are mocked, outbound report requests are 
routed to Flask's test client, and browser capture is mocked. No services, real 
browser or notification delivery are required. XLSX is excluded; its header 
defect is being addressed separately.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   No UI change. Before, semantic-chart report formats had no dedicated tests. 
After, CSV/TEXT assert the filtered provider result and display labels; PNG/PDF 
assert the captured chart URL, executor, image content and PDF output.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   TZ=UTC PYTHONPATH=.:superset-core/src pytest -q 
tests/unit_tests/commands/report/ tests/unit_tests/semantic_layers/
   pre-commit run --files tests/unit_tests/commands/report/conftest.py 
tests/unit_tests/commands/report/semantic_view_report_test.py 
tests/unit_tests/semantic_layers/conftest.py 
tests/unit_tests/semantic_layers/e2e_stub_extension_test.py
   ```
   
   Negative controls were restored after verification: rewriting the export 
datasource type made both CSV/TEXT cases fail, and changing the captured chart 
id made both PNG/PDF cases fail. These are content-generation tests; they do 
not certify live browser rendering or delivery.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `SEMANTIC_LAYERS` (existing, enabled by the 
tests)
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to