test(FR-2652): add E2E tests for admin model card deletion with folder option#6887
Conversation
|
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.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
de2b083 to
57e9104
Compare
57e9104 to
b9c18ca
Compare
c4c949d to
daf4605
Compare
There was a problem hiding this comment.
Pull request overview
Adds Playwright E2E coverage for the Admin Model Store deletion flow when a model card has an associated model folder, including the “also delete folder” checkbox behavior and the “Go to Data > Trash” navigation outcomes. This extends the existing Admin Model Card delete suite and updates shared E2E helpers/coverage tracking accordingly.
Changes:
- Extend Admin Model Card POM to support creating a new model folder via the “+” button and to expose delete-dialog locators (checkbox + folder link).
- Expand
admin-model-card-delete.spec.tsto create dedicated folders for test isolation, add new delete-with-folder / navigation assertions, and add folder cleanup via/admin-data. - Generalize vfolder helper utilities to support both
/dataand/admin-data, and update the E2E coverage report totals/features.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
e2e/utils/test-util.ts |
Adds optional dataPath argument to vfolder helpers so tests can operate on /data vs /admin-data. |
e2e/utils/classes/AdminModelCardPage.ts |
Adds folder-create flow via “+” and delete-dialog helpers; updates create modal filling logic and access-level selection. |
e2e/admin-model-card/admin-model-card-delete.spec.ts |
Adds/updates delete scenarios to cover “delete card + folder”, “delete card only”, “Go to Trash” navigation checks, and folder cleanup. |
e2e/E2E_COVERAGE_REPORT.md |
Updates “Last Updated” date and Admin Model Store feature counts to reflect the new coverage. |
ironAiken2
left a comment
There was a problem hiding this comment.
26 failed
[chromium] › e2e/admin-model-card/admin-model-card-create.spec.ts:16:9 › Admin Model Card Management - Create › Superadmin can open the Create Model Card modal @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-create.spec.ts:79:9 › Admin Model Card Management - Create › Superadmin can create a model card with only required fields @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-create.spec.ts:139:9 › Admin Model Card Management - Create › Superadmin can create a model card with all fields populated @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-create.spec.ts:238:9 › Admin Model Card Management - Create › Superadmin cannot create a model card without a Name @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:23:9 › Admin Model Card Management - Delete › Superadmin can delete a model card via the trash icon with confirmation @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:89:9 › Admin Model Card Management - Delete › Superadmin can cancel a single-delete confirmation without deleting @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:130:9 › Admin Model Card Management - Delete › Superadmin can select multiple model cards and delete them in bulk @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:212:9 › Admin Model Card Management - Delete › Superadmin can cancel bulk deletion @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:277:9 › Admin Model Card Management - Delete › Superadmin can clear selection using the BAISelectionLabel clear button @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:328:9 › Admin Model Card Management - Delete › Superadmin can select all model cards on the current page using the header checkbox @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:372:9 › Admin Model Card Management - Delete › Superadmin can delete a model card and its associated folder, and navigate to trash with folder filter @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-delete.spec.ts:440:9 › Admin Model Card Management - Delete › Superadmin can delete a model card only and navigate to trash without folder filter @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-edit.spec.ts:79:9 › Admin Model Card Management - Edit › Superadmin can open the Edit Model Card modal from a table row @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-edit.spec.ts:121:9 › Admin Model Card Management - Edit › Superadmin can update a model card's metadata fields @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-edit.spec.ts:183:9 › Admin Model Card Management - Edit › Superadmin cannot save an edit when the Name field is cleared @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-edit.spec.ts:222:9 › Admin Model Card Management - Edit › Superadmin can cancel the Edit modal without saving changes @admin-model-card @admin @crud
[chromium] › e2e/admin-model-card/admin-model-card-filter.spec.ts:16:9 › Admin Model Card Management - Filtering › Superadmin can filter model cards by name using BAIGraphQLPropertyFilter @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-filter.spec.ts:53:9 › Admin Model Card Management - Filtering › Superadmin can clear a filter to restore the full list @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-page-load.spec.ts:63:9 › Admin Model Card Management - Page Load and Table Display › Superadmin can see model card rows with correct data in the table @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-sort-refresh.spec.ts:16:9 › Admin Model Card Management - Refresh and Sorting › Superadmin can refresh the table using the fetch key button @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-sort-refresh.spec.ts:32:9 › Admin Model Card Management - Refresh and Sorting › Superadmin can sort model cards by Name in ascending order @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-sort-refresh.spec.ts:54:9 › Admin Model Card Management - Refresh and Sorting › Superadmin can sort model cards by Name in descending order @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-sort-refresh.spec.ts:74:9 › Admin Model Card Management - Refresh and Sorting › Superadmin can sort model cards by Created At @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-sort-refresh.spec.ts:97:9 › Admin Model Card Management - Refresh and Sorting › Superadmin can switch sort from Name to Created At @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-url-state.spec.ts:16:9 › Admin Model Card Management - URL State Persistence › Superadmin can persist filter state in the URL query parameters @admin-model-card @admin @functional
[chromium] › e2e/admin-model-card/admin-model-card-url-state.spec.ts:62:9 › Admin Model Card Management - URL State Persistence › Superadmin can persist sort order in the URL query parameters @admin-model-card @admin @functional
The test case fails. I tested it on 10.122.10.107 server.
444c84b to
d223d37
Compare
cbbfe8a to
1fc2c72
Compare
d223d37 to
aa7fa8e
Compare
8754cc8 to
e1462dc
Compare
|
Addressed feedback from @ironAiken2: the 26 failing tests were caused by Fixed by:
|
e1462dc to
a8851e1
Compare
aa7fa8e to
342c0ad
Compare
342c0ad to
00a4c36
Compare
a8851e1 to
2762f32
Compare
ironAiken2
left a comment
There was a problem hiding this comment.
E2E_WEBSERVER_ENDPOINT=http://10.122.10.107:8090 I ran the tests above, but almost all of them failed.
5acc0a4 to
a461f34
Compare
00a4c36 to
3b46628
Compare
a461f34 to
f598b53
Compare
…r option - Add tests 5.7 and 5.8 to admin-model-card-delete.spec.ts - 5.7: delete model card + folder together, verify notification and Go to Trash URL with folder filter - 5.8: delete model card only, verify notification and Go to Trash URL without filter - Add getAlsoDeleteFolderCheckbox() and getFolderNameLinkInDeleteDialog() to AdminModelCardPage POM - Update E2E_COVERAGE_REPORT.md: Admin Model Store 22→26 features covered
f598b53 to
5fa0945
Compare
3b46628 to
fd4eab0
Compare
ironAiken2
left a comment
There was a problem hiding this comment.
Error: locator.fill: Test timeout of 180000ms exceeded.
Call log:
-
waiting for getByRole('dialog', { name: 'Delete Model Cards' }).getByLabel(/Type.*to confirm/i)
at e2e/admin-model-card/admin-model-card-delete.spec.ts:241:56
Could you check this one?
5fa0945 to
a6ec9e4
Compare
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 81.87% | 429/524 |
| 🟡 | Branches | 70.43% | 362/514 |
| 🟡 | Functions | 76.86% | 93/121 |
| 🟢 | Lines | 83.19% | 391/470 |
Test suite run success
319 tests passing in 13 suites.
Report generated by 🧪jest coverage report action from a6ec9e4

Resolves #6885 (FR-2652)
Stacked on top of #6888.
Summary
Adds Playwright E2E tests covering the admin model card deletion flow introduced in FR-2622, including the new "Also delete the associated model folder" option.
Tests added (
e2e/admin-model-card/admin-model-card-delete.spec.ts):/data?statusCategory=deleted&filter=name == "<folder>"/data?statusCategory=deleted(no folder filter)POM updates (
e2e/utils/classes/AdminModelCardPage.ts):createNewFolderViaPlus(): robust handling of the "Change Project" Popconfirm — checks for the button sequentially (5 s timeout) instead of usingPromise.race, which had a race condition causing the click to be missed.getAlsoDeleteFolderCheckbox()andgetFolderNameLinkInDeleteDialog()locators.Each test creates its own dedicated folder via the "+" button and fully cleans up after itself (moves folder to trash → permanently deletes), leaving no side effects.