Skip to content

test(FR-2451): add E2E tests for prometheus preset CRUD, filter, sort, and table settings#7108

Open
agatha197 wants to merge 5 commits into04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18nfrom
04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings
Open

test(FR-2451): add E2E tests for prometheus preset CRUD, filter, sort, and table settings#7108
agatha197 wants to merge 5 commits into04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18nfrom
04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 28, 2026

Resolves #6357 (FR-2451)

Summary

Adds E2E test coverage for the Auto Scaling Rule Preset (Prometheus Query Preset) CRUD UI introduced under the Admin Serving page. The suite is grouped under e2e/auto-scaling-rule-preset/ and exercises every user-facing flow with side-effect-free cleanup.

Spec coverage

File Sections What it covers
preset-crud.spec.ts 1. Page Load · 2. Create · 3. Edit · 4. Delete tab/toolbar visibility, all required/optional fields, validation errors, edit with live preview, delete with typed confirmation
preset-filter-sort.spec.ts 5. Filter · 6. Sort Name/Metric/Time Window/Created/Updated filters, ascending/descending sort via column header
preset-table-settings.spec.ts 7. Column Visibility · 8. Refresh · 10. Query Template Copy gear-icon column toggling, refresh button, copy-icon interaction on the truncated query template cell
preset-integration.spec.ts 9. Integration with Auto-Scaling Rule Editor end-to-end deploy of a model service, then verifying the preset shows up in the editor's Prometheus dropdown and the Time Window auto-fills the Metric Name

Cleanup guarantees

Every describe block that creates resources removes them after each test:

  • Presets: afterEach calls deletePreset (typed-confirmation modal) — applies to every CRUD/Filter/Copy block. Inline cleanup in the Create block was moved to afterEach so a mid-test failure no longer leaks fixtures.
  • Integration suite: afterAll runs deletePresetsweepServices(/e2e-svc-/)sweepVFolders(/e2e-mod-preset/) from a fresh browser context, so model services and model vfolders created during the deploy never linger.
  • Sweep helpers: cleanup-util.ts#sweepServices now hovers the first cell to expose the BAINameActionCell delete icon, and createVFolderAndVerify waits for the creation modal to close before verifying — both fixed cases where teardown silently no-op'd.

Test infrastructure

  • All locators follow the project's role-first strategy; AntD modal animation is awaited via not.toHaveClass(/ant-zoom-appear/) before interaction.
  • Filter/sort assertions read DOM state (.ant-tag, aria-sort, .ant-table-placeholder) instead of URL params, since the page mixes nuqs and use-query-params and their pushes race.
  • Resource names are namespaced (e2e-preset-*, e2e-mod-preset-*, e2e-svc-*) so sweeps never touch real data.

Checklist:

  • Documentation
  • Minimum required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 28, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from e7c2b8c to 55d3a53 Compare April 28, 2026 03:20
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch 2 times, most recently from 7427175 to 8f29c97 Compare April 28, 2026 03:27
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from 55d3a53 to 6e94a8c Compare April 28, 2026 06:06
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from 8f29c97 to 1913077 Compare April 28, 2026 06:06
@agatha197 agatha197 marked this pull request as draft April 28, 2026 06:31
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from 6e94a8c to ab6a4c0 Compare April 28, 2026 07:13
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from 1913077 to 18f1dfa Compare April 28, 2026 07:13
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from ab6a4c0 to 93ab994 Compare April 28, 2026 07:14
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from 18f1dfa to a856188 Compare April 28, 2026 07:14
@agatha197 agatha197 marked this pull request as ready for review April 28, 2026 07:29
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from a856188 to fb84ef8 Compare April 28, 2026 07:51
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch 2 times, most recently from 6fc42ee to 549d61f Compare April 28, 2026 07:59
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from fb84ef8 to 38baa1c Compare April 28, 2026 07:59
@agatha197 agatha197 changed the base branch from 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n to graphite-base/7108 April 28, 2026 11:38
@agatha197 agatha197 force-pushed the graphite-base/7108 branch from 549d61f to b41245b Compare April 28, 2026 11:41
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from 38baa1c to 810e70f Compare April 28, 2026 11:41
@agatha197 agatha197 changed the base branch from graphite-base/7108 to 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n April 28, 2026 11:41
@agatha197 agatha197 changed the title test(FR-2451): add E2E tests for auto-scaling rule preset CRUD, filter, sort, and table settings test(FR-2451): add E2E tests for prometheus preset CRUD, filter, sort, and table settings Apr 28, 2026
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from 810e70f to b92a6e5 Compare April 28, 2026 12:21
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from b41245b to 62ffd10 Compare April 28, 2026 12:21
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from b92a6e5 to 44ee942 Compare April 28, 2026 12:26
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from 62ffd10 to 21c5894 Compare April 28, 2026 12:26
…r, sort, and table settings

- preset-crud.spec.ts: full CRUD lifecycle (create, read, edit, delete) with validation
- preset-filter-sort.spec.ts: name filter via property filter bar (pressSequentially to
  trigger React onChange), sort by Name/CreatedAt/UpdatedAt via aria-sort attribute
- preset-table-settings.spec.ts: column visibility, refresh button, query template copy
- preset-integration.spec.ts: pagination and multi-operation integration scenarios
- auto-scaling-rule-preset-seed.spec.ts: standalone seed helper for test data setup
- test-util.ts: extend loginAsAdmin to accept optional credentials
- playwright.config.ts: increase testTimeout to 180s for backend-heavy operations
…ce cleanup

- preset-integration.spec.ts: fix Prometheus dropdown selector (CSS class instead of
  ARIA role), strict mode violation in dropdown (.last()), hidden metricName input
  locator, service link navigation; add sweepVFolders to afterAll cleanup
- preset-table-settings.spec.ts: fix query template cell locator (column index
  instead of full text match which fails on truncated cells)
- cleanup-util.ts: hover over row before clicking delete in sweepServices so
  BAINameActionCell action buttons are revealed
- test-util.ts: fix createVFolderAndVerify navigation to use navigateTo()
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_polish_preset_list_bainameactioncell_copyable_querytemplate_column_settings_i18n branch from 21c5894 to 99735c7 Compare April 28, 2026 12:37
@agatha197 agatha197 force-pushed the 04-28-test_fr-2451_add_e2e_tests_for_auto-scaling_rule_preset_crud_filter_sort_and_table_settings branch from 44ee942 to 4ea6278 Compare April 28, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant