Skip to content

test(FR-2622): add E2E tests for admin model card management#7250

Merged
graphite-app[bot] merged 1 commit into
mainfrom
test/fr-2622-admin-model-card
May 11, 2026
Merged

test(FR-2622): add E2E tests for admin model card management#7250
graphite-app[bot] merged 1 commit into
mainfrom
test/fr-2622-admin-model-card

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented May 6, 2026

Resolves #7249 (FR-2622)

Summary

  • Full admin model card management page E2E test suite (8 spec files): page-load, create, edit, delete, filter, sort-refresh, url-state, access-control
  • New delete tests from FR-2652: single-delete with/without folder trash, bulk delete with folder trash option (tests 5.7–5.10)
  • URL migration throughout: /admin-serving?tab=model-store/admin-deployments?tab=model-store-management
  • POM additions: getAlsoDeleteFolderCheckbox, getFolderNameLinkInDeleteDialog, getAlsoDeleteFoldersBulkCheckbox, getBulkDeleteButton, createNewFolderViaPlus

Flakiness fixes

  • createNewFolderViaPlus: retry loop (up to 5 attempts) with short-timeout click on "Change Project" button to fail fast when folder dialog overlay blocks; breaks immediately after successful click so the change-project state update can propagate
  • deleteModelCardByName: waits for Delete button to be enabled before clicking — under parallel worker load, React's onChange may not fire synchronously after fill()
  • Filter test 10.1: uses testCardName created in beforeEach instead of reading the first table row, avoiding interference from concurrent delete tests emptying the table
  • Delete tests: run in serial mode to avoid parallel indexing race where newly created cards are not yet searchable under load

Test results

36 passed, 1 skipped (pagination test requires >1 page of data — expected skip)

Copy link
Copy Markdown
Contributor Author

agatha197 commented May 6, 2026


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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a comprehensive Playwright E2E test suite for the Admin Model Card Management flow, updating navigation to the new Admin Deployments tab route and extending the test/POM utilities to support folder-related delete scenarios and flakiness handling.

Changes:

  • Added/expanded admin model card management E2E coverage (create/edit/delete/filter/sort/URL-state/access-control), including new “delete card + folder” scenarios.
  • Migrated test navigation from /admin-serving?tab=model-store to /admin-deployments?tab=model-store-management.
  • Enhanced E2E utilities/POM to handle folder creation via “+”, delete-confirm dialog controls, and admin-data vfolder cleanup; updated E2E coverage report accordingly.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
e2e/utils/test-util.ts Extended vfolder verification/trash/purge helpers to support alternate data routes (e.g., admin-data).
e2e/utils/classes/AdminModelCardPage.ts Updated page URL to new route; added helpers for folder creation via “+” and richer delete/bulk-delete dialog interactions.
e2e/E2E_COVERAGE_REPORT.md Updated coverage counts/date and marked new Admin Model Store features/tests as covered; reformatted multiple tables.
e2e/admin-model-card/admin-model-card-access-control.spec.ts Updated access-control test to hit the new admin deployments tab URL.
e2e/admin-model-card/admin-model-card-create.spec.ts Updated create tests/selectors for antd v6 behavior and new route; added stability waits.
e2e/admin-model-card/admin-model-card-delete.spec.ts Expanded delete coverage (single/bulk + folder-trash options), added serial execution, and integrated vfolder cleanup via shared helpers.
e2e/admin-model-card/admin-model-card-edit.spec.ts Updated edit flow to new route and stabilized selectors for antd v6 tooltips/selects.
e2e/admin-model-card/admin-model-card-filter.spec.ts Updated filter tests to new route.
e2e/admin-model-card/admin-model-card-page-load.spec.ts Updated page-load checks to new route; ensured deterministic table data by creating a card in-test.
e2e/admin-model-card/admin-model-card-sort-refresh.spec.ts Updated refresh/sort tests to new route; created per-test data and added cleanup.
e2e/admin-model-card/admin-model-card-url-state.spec.ts Updated URL-state tests to new route; made filter test deterministic by creating a card in beforeEach.

Comment thread e2e/utils/classes/AdminModelCardPage.ts
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch 2 times, most recently from 894ca7e to 476bb76 Compare May 6, 2026 10:03
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch 2 times, most recently from 8894927 to e207206 Compare May 6, 2026 13:37
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch 2 times, most recently from 262fd3a to 672d530 Compare May 6, 2026 13:41
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from e207206 to 11b42d3 Compare May 6, 2026 13:41
@agatha197 agatha197 changed the base branch from 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion to graphite-base/7250 May 7, 2026 04:50
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch from 672d530 to 56e8a35 Compare May 7, 2026 04:51
@agatha197 agatha197 force-pushed the graphite-base/7250 branch from 11b42d3 to 0b157d0 Compare May 7, 2026 04:51
@agatha197 agatha197 changed the base branch from graphite-base/7250 to 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion May 7, 2026 04:51
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from 0b157d0 to db4b128 Compare May 7, 2026 04:59
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch 2 times, most recently from 42f6d54 to 10d6317 Compare May 7, 2026 05:05
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch 2 times, most recently from acfdf58 to 83f7633 Compare May 7, 2026 05:11
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch from 10d6317 to c0431fa Compare May 7, 2026 05:11
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from 83f7633 to f498d07 Compare May 7, 2026 05:13
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch from c0431fa to 313ca91 Compare May 7, 2026 05:13
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from f498d07 to b21692f Compare May 7, 2026 05:57
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch 2 times, most recently from f6ef946 to 375fbdb Compare May 7, 2026 06:00
@agatha197 agatha197 changed the base branch from 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion to graphite-base/7250 May 7, 2026 07:07
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch from 375fbdb to 6b720e8 Compare May 7, 2026 07:07
@agatha197 agatha197 force-pushed the graphite-base/7250 branch from 5523115 to ced2837 Compare May 7, 2026 07:07
@agatha197 agatha197 changed the base branch from graphite-base/7250 to 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion May 7, 2026 07:08
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 1 test using 1 worker

  ✘  1 [chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:581:9 › Admin Model Card Management - Delete › Superadmin can bulk delete model cards and move their associated folders to trash @admin-model-card @admin @crud (4.3m)


  1) [chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:581:9 › Admin Model Card Management - Delete › Superadmin can bulk delete model cards and move their associated folders to trash @admin-model-card @admin @crud 

    Error: expect(locator).toBeVisible() failed

    Locator: getByText(/model card\(s\) and their associated folder\(s\) have been moved to trash/i)
    Expected: visible
    Timeout: 240000ms
    Error: element(s) not found

    Call log:
      - Expect "toBeVisible" with timeout 240000ms
      - waiting for getByText(/model card\(s\) and their associated folder\(s\) have been moved to trash/i)


      663 |           /model card\(s\) and their associated folder\(s\) have been moved to trash/i,
      664 |         ),
    > 665 |       ).toBeVisible({ timeout: 240000 });
          |         ^
      666 |
      667 |       // Dialog must be hidden once the notification is shown
      668 |       await expect(bulkDialog).toBeHidden();
        at /Users/sungchulhong/Desktop/github/backend.ai-webui2/e2e/admin-model-card/admin-model-card-delete.spec.ts:665:9

    Error Context: test-results/admin-model-card-admin-mod-9b95f-associated-folders-to-trash-chromium/error-context.md

  1 failed
    [chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:581:9 › Admin Model Card Management - Delete › Superadmin can bulk delete model cards and move their associated folders to trash @admin-model-card @admin @crud 

I got some errors.

Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Furthermore, in scenarios where the vfolder associated with a model card is deleted, I would like the logic to permanently delete the folder once it has been moved to the Recycle Bin. This is to keep the test server clean.

@graphite-app graphite-app Bot changed the base branch from 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion to graphite-base/7250 May 7, 2026 07:22
@agatha197 agatha197 force-pushed the graphite-base/7250 branch from ced2837 to 313b881 Compare May 7, 2026 08:21
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch from 6b720e8 to fd1a272 Compare May 7, 2026 08:21
@agatha197 agatha197 changed the base branch from graphite-base/7250 to main May 7, 2026 08:21
@agatha197 agatha197 requested a review from ironAiken2 May 11, 2026 01:42
@agatha197 agatha197 force-pushed the test/fr-2622-admin-model-card branch 4 times, most recently from 161fcf9 to d8312f4 Compare May 11, 2026 07:01
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 11, 2026

Merge activity

Resolves #7249 (FR-2622)

## Summary

- Full admin model card management page E2E test suite (8 spec files): page-load, create, edit, delete, filter, sort-refresh, url-state, access-control
- New delete tests from FR-2652: single-delete with/without folder trash, bulk delete with folder trash option (tests 5.7–5.10)
- URL migration throughout: `/admin-serving?tab=model-store` → `/admin-deployments?tab=model-store-management`
- POM additions: `getAlsoDeleteFolderCheckbox`, `getFolderNameLinkInDeleteDialog`, `getAlsoDeleteFoldersBulkCheckbox`, `getBulkDeleteButton`, `createNewFolderViaPlus`

## Flakiness fixes

- **`createNewFolderViaPlus`**: retry loop (up to 5 attempts) with short-timeout click on "Change Project" button to fail fast when folder dialog overlay blocks; breaks immediately after successful click so the change-project state update can propagate
- **`deleteModelCardByName`**: waits for Delete button to be enabled before clicking — under parallel worker load, React's onChange may not fire synchronously after `fill()`
- **Filter test 10.1**: uses `testCardName` created in `beforeEach` instead of reading the first table row, avoiding interference from concurrent delete tests emptying the table
- **Delete tests**: run in `serial` mode to avoid parallel indexing race where newly created cards are not yet searchable under load

## Test results

36 passed, 1 skipped (pagination test requires >1 page of data — expected skip)
@graphite-app graphite-app Bot force-pushed the test/fr-2622-admin-model-card branch from d8312f4 to 5eba6f2 Compare May 11, 2026 07:37
@graphite-app graphite-app Bot merged commit 5eba6f2 into main May 11, 2026
8 checks passed
@graphite-app graphite-app Bot deleted the test/fr-2622-admin-model-card branch May 11, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VFolderDeployModal — "Deploy as service" on a model folder fails: GraphQL schema mismatch (imageId / slotName / quantity)

3 participants