This is an automated email from the ASF dual-hosted git repository. jli pushed a commit to branch feat-additional-dataset-playwright-tests in repository https://gitbox.apache.org/repos/asf/superset.git
commit 7adc5de8185cfbff24de775eb1d1198c68e85e2b Author: Joe Li <[email protected]> AuthorDate: Tue Dec 16 12:47:54 2025 -0800 test(playwright): add export single dataset E2E test Add test for exporting a single dataset via the action button. The test verifies: - Download is triggered when clicking export action - Downloaded file is a zip file - Download completes without failure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --- .../experimental/dataset/dataset-list.spec.ts | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/superset-frontend/playwright/tests/experimental/dataset/dataset-list.spec.ts b/superset-frontend/playwright/tests/experimental/dataset/dataset-list.spec.ts index 0eb9cc9d88..2bc8eeb389 100644 --- a/superset-frontend/playwright/tests/experimental/dataset/dataset-list.spec.ts +++ b/superset-frontend/playwright/tests/experimental/dataset/dataset-list.spec.ts @@ -252,3 +252,29 @@ test('should duplicate a dataset with new name', async ({ page }) => { // Name should be different (the duplicate name) expect(duplicateDataFull.result.table_name).toBe(duplicateName); }); + +test('should export a single dataset', async ({ page }) => { + // Use existing example dataset + const datasetName = TEST_DATASETS.EXAMPLE_DATASET; + + // Verify dataset is visible in list + await expect(datasetListPage.getDatasetRow(datasetName)).toBeVisible(); + + // Set up download handler before triggering export + const downloadPromise = page.waitForEvent('download'); + + // Click export action button + await datasetListPage.clickExportAction(datasetName); + + // Wait for download to complete + const download = await downloadPromise; + + // Verify downloaded file is a zip + const fileName = download.suggestedFilename(); + expect(fileName).toMatch(/\.zip$/); + expect(fileName).toContain('dataset'); + + // Verify download completed successfully (no failure) + const failure = await download.failure(); + expect(failure).toBeNull(); +});
