test(e2e): add e2e tests for workbooks, datasources, views, pagination, jobs, tagging, projects, favorites, metadata, site-admin - #1823
test(e2e): add e2e tests for workbooks, datasources, views, pagination, jobs, tagging, projects, favorites, metadata, site-admin#1823jacalata wants to merge 8 commits into
Conversation
Adds integration tests covering: - Workbooks CRUD (create, publish, get, update, download, delete) - Datasources CRUD (publish, get, update connections, refresh, delete) - Views export (PDF, PNG, CSV, Excel) - Tag quoting (spaces and commas in tag names) - Projects get_by_path - Pagination (Pager and QuerySet, order_by, pagesize) - Jobs and async operations (trigger refresh, poll until complete) - Projects admin CRUD and permissions (SiteAdmin) - Users and groups (SiteAdmin) - Workbook permissions (grant, verify, revoke) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move default_project, project_id, and server_admin into conftest.py so individual test files don't each inline the same TABLEAU_PROJECT env var lookup. Saves ~130 lines of boilerplate across 5 files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- tagging: guard finally delete_tags with try/except (tag already deleted by test body) - jobs: skip on 403180 when workbook has no extract and refresh is disallowed - workbooks: improve filter assertion error message; use QuerySet filter instead of get() - conftest: add TABLEAU_VERIFY_SSL env var to skip SSL verification for on-prem servers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rkbook asset Restores content from old jac/e2e-tests branch (commit cf59ca4): - test_favorites.py: workbook/view/datasource favorites - test_metadata.py: GraphQL metadata API queries - test_site_admin.py: schedules, webhooks, connection update, data freshness, workbook move, user/group management (requires e2e_admin marker) - assets/WorkbookWithExtract.twbx: binary asset for extract refresh tests - test_jobs.py: add extract_workbook fixture and test_extract_workbook_refresh_completes - test_workbooks_crud.py: add test_workbook_populate_preview_image Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…urce tests SampleDS.tds is a live connection to postgres91.test.tsi.lan which Tableau Server tries to validate on publish, causing the fixture to fail if the host is unreachable. WorldIndicators.tdsx is an extract-based datasource that publishes without a connection check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude code report: Code ReviewReviewed the diff via Blocking: will fail CI black check
Suggestions (non-blocking)
Other notes
🤖 Generated with Claude Code |
|
@jacalata overall this looks good. Take a look at the issues Claude noted to see if any are worth fixing/improving. |
- Reformat single-line `if` in test_views_export.py's a_view fixture so black --check passes CI (was blocking meta-checks.yml). - Use conftest.default_project in test_workbook_permissions.workbook_and_user, eliminating 10 lines of duplicated project-lookup logic. - Replace bare `except Exception: pass` in teardown blocks with warnings.warn(...) for consistency with test_pagination.py's workbook cleanup. - Use bare Path for SAMPLE_DATASOURCE calls across test_favorites.py and test_jobs.py (was inconsistently wrapped in str()). - Register the e2e_admin marker in pyproject.toml so it matches conftest.py's pytest_configure. All from bcantoni's review comment on #1823. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks — fixes applied in 3a4fe13:
Skipped Claude's suggestion to also touch |
Summary
conftest.py; addsserver_admin,default_project,project_idsession-scoped fixtures ande2e_adminmarkerTest plan
pytest test_e2e/ -v -n 0 -m e2eagainst a Tableau server withTABLEAU_SERVER,TABLEAU_TOKEN_NAME,TABLEAU_TOKEN,TABLEAU_SITE,TABLEAU_PROJECT,TABLEAU_VERIFY_SSLset — 41 passed, 1 known flake (test_datasources_getname-filter timing), 3 skipped pending Add Projects.get_by_path() for hierarchy-aware project lookup #1804 merge (test_projects_get_by_path)pytest test_e2e/test_site_admin.py -v -n 0 -m e2e_adminwith additionalTABLEAU_SITEADMIN_TOKEN_NAME/TABLEAU_SITEADMIN_TOKENenv vars — skipped, test server does not support user creation via REST APItest/— CI passing🤖 Generated with Claude Code