-
Notifications
You must be signed in to change notification settings - Fork 16.3k
test(playwright): additional dataset list playwright tests #36684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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 <noreply@anthropic.com>
Add test for bulk exporting datasets via bulk select mode. The test verifies: - Bulk select mode can be enabled - Datasets can be selected via checkboxes - Export bulk action triggers download - Downloaded file is a zip file Add Checkbox component to components/core for checkbox interactions. Add bulk select methods to DatasetListPage: - getBulkSelectButton() / clickBulkSelectButton() - getDatasetCheckbox() / selectDatasetCheckbox() - getBulkActionButton() / clickBulkAction() - getBulkSelectControls() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add E2E test for the create dataset wizard flow: - Navigate to create dataset page via "+ Dataset" button - Verify cascading select dropdowns (database → schema → table) - Verify create and explore button availability Add supporting components: - Select component for Ant Design combobox interactions (with type-to-filter) - CreateDatasetPage page object with component-based selectors Refactor test file to initialize page objects only in tests that use them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add E2E test for editing a dataset description: - Click edit action to open DatasourceModal - Update description field - Save with confirmation dialog - Verify toast and persisted change Add supporting components: - EditDatasetModal using Modal base class and component abstractions - ConfirmDialog for reusable OK/Cancel confirmation dialogs - Textarea component for multi-line text input - Tabs component for tab navigation - clickEditAction method in DatasetListPage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive Playwright end-to-end tests for the dataset list page, expanding test coverage for export, bulk operations, dataset creation wizard navigation, and dataset editing functionality. The changes introduce new page object models and core component wrappers to support these additional test scenarios.
- Adds 4 new test cases covering export (single and bulk), create wizard navigation, and dataset editing
- Introduces new page objects (CreateDatasetPage, EditDatasetModal, ConfirmDialog) for better test organization
- Adds reusable core components (Select, Checkbox, Tabs, Textarea) to the component library
- Refactors test file to remove unused file-scoped variables
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| superset-frontend/playwright/tests/experimental/dataset/dataset-list.spec.ts | Adds 4 new tests for export, bulk export, create wizard, and edit functionality; removes unused explorePage variable |
| superset-frontend/playwright/pages/DatasetListPage.ts | Adds methods for bulk selection, edit action, and checkbox interactions |
| superset-frontend/playwright/pages/CreateDatasetPage.ts | New page object for dataset creation wizard with database/schema/table selection |
| superset-frontend/playwright/components/modals/EditDatasetModal.ts | New modal component for dataset editing with description and tab navigation support |
| superset-frontend/playwright/components/modals/ConfirmDialog.ts | New component for Ant Design confirmation dialogs with OK/Cancel actions |
| superset-frontend/playwright/components/core/Checkbox.ts | New core component wrapper for checkbox interactions |
| superset-frontend/playwright/components/core/Select.ts | New core component wrapper for Ant Design Select/Combobox with filtering support |
| superset-frontend/playwright/components/core/Tabs.ts | New core component wrapper for Ant Design tab navigation |
| superset-frontend/playwright/components/core/Textarea.ts | New core component wrapper for multi-line text input |
| superset-frontend/playwright/components/core/index.ts | Exports new core components for use throughout the test suite |
superset-frontend/playwright/tests/experimental/dataset/dataset-list.spec.ts
Show resolved
Hide resolved
superset-frontend/playwright/components/modals/ConfirmDialog.ts
Outdated
Show resolved
Hide resolved
superset-frontend/playwright/components/modals/EditDatasetModal.ts
Outdated
Show resolved
Hide resolved
Address Copilot review comments: - Fix EditDatasetModal passing wrong modalSelector parameter to Modal - Add constructor overloads to Textarea and Select for consistency with Button/Input - Add Page parameter to Checkbox for consistency with other components - Clarify ConfirmDialog constructor comment - Refactor edit test to use throwaway dataset for test isolation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The create wizard test was failing with strict mode violation because
getByRole('button', { name: 'Dataset' }) matched both the "Datasets"
nav link and the "+ Dataset" button. Added clickAddDataset() method
to DatasetListPage with a regex pattern that specifically targets the
"+ Dataset" button.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. Select.clickOption: Changed from getByTitle() to Ant Design's
.ant-select-item-option class selector since dropdown options
don't have title attributes.
2. Export tests: Changed from waitForEvent('download') to API
response interception. The export uses blob download via fetch
(downloadBlob with createObjectURL), which doesn't trigger
Playwright's download event consistently. Now verifies the
export API response headers (content-type and content-disposition).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. Renamed "bulk export multiple datasets" to "export dataset via bulk select action" - more accurately describes test scope (tests bulk select mechanism, not multi-item export). 2. Added virtual dataset guard in first test - fails fast with clear message if example dataset is missing or not virtual, which is required for duplicate functionality used in other tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SELECT_SELECTORS constants matching Cypress patterns - Use .getByText() with exact match for option selection - Wait for dropdown visibility before finding options - Remove invalid dataset_type guard (field not in list API response) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add acceptDownloads: true to Playwright config for export tests - Create AceEditor component for Ace Editor interactions - Fix Select.clickOption to handle multiple dropdowns using :not(.ant-select-dropdown-hidden) - Update CreateDatasetPage to use data-test selectors instead of fromRole - Update EditDatasetModal to use AceEditor instead of Textarea for description - Update test to use getDescription() for AceEditor value verification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION