UI improvement: make edit and delete buttons visible for custom AI provider (#1535)

- Move edit and delete actions from hidden popover to visible buttons
- Restructure card layout: status badge and action buttons at top, title
below

<img width="1029" height="414" alt="image"
src="https://github.com/user-attachments/assets/60497f87-254e-4f4d-9f8c-ea73b8f2526e"
/>

closes #1358


    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Made edit and delete always visible on custom provider cards and
restructured the card layout for clearer actions and status. Improves
discoverability and aligns with #1358.

- **Refactors**
- Replaced popover menu with visible Edit and Delete icon buttons
(data-testid: edit-custom-provider, delete-custom-provider).
- Moved status badge and actions to the top; title now sits below;
badges don’t wrap.
- Updated e2e tests to use new buttons and adjusted selectors for the
updated heading.

<!-- End of auto-generated description by cubic. -->
This commit is contained in:
Adeniji Adekunle James
2025-10-15 00:58:09 +01:00
committed by GitHub
parent 0c4aef6f2c
commit d76f428447
4 changed files with 45 additions and 56 deletions

View File

@@ -3,10 +3,8 @@ import { test } from "./helpers/test_helper";
test("delete custom provider should not freeze", async ({ po }) => {
await po.setUp();
await po.goToSettingsTab();
await po.page.getByTestId("custom-provider-more-options").click();
await po.page.getByTestId("delete-custom-provider").click();
await po.page.getByRole("button", { name: "Delete Provider" }).click();
await po.page.getByRole("button", { name: "Delete Provider" }).click();
// Make sure UI hasn't freezed
await po.goToAppsTab();
});

View File

@@ -7,9 +7,7 @@ test("can edit custom provider", async ({ po }) => {
// Create a provider first
// Edit it
await po.page.getByTestId("custom-provider-more-options").click();
await po.page.getByRole("button", { name: "Edit Provider" }).click();
await po.page.getByTestId("edit-custom-provider").click();
await po.page.getByRole("textbox", { name: "Display Name" }).clear();
await po.page
.getByRole("textbox", { name: "Display Name" })

View File

@@ -776,9 +776,7 @@ export class PageObject {
}
async setUpTestModel() {
await this.page
.getByRole("heading", { name: "test-provider Needs Setup" })
.click();
await this.page.getByRole("heading", { name: "test-provider" }).click();
await this.page.getByRole("button", { name: "Add Custom Model" }).click();
await this.page
.getByRole("textbox", { name: "Model ID*" })