Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions e2e/storage/connections-management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function openFirstConnectionEditPage(page: Page) {
await page
.getByRole('button', { name: /Options for/i })
.first()
.click({ force: true });
.click();
await page.getByRole('menuitem', { name: 'Edit' }).click();
await waitForHydration(page);
}
Expand Down Expand Up @@ -231,7 +231,7 @@ test.describe('Storage — Connections management', () => {
await savedList
.getByRole('button', { name: /Options for/ })
.first()
.click({ force: true });
.click();
await page.getByRole('menuitem', { name: 'Edit', exact: true }).click();
await waitForHydration(page);
await expect(page.getByRole('heading', { name: 'Edit connection' })).toBeVisible();
Expand Down Expand Up @@ -410,7 +410,7 @@ test.describe('Storage — Connection edit sidebar', () => {
await savedList
.getByRole('button', { name: /Options for/ })
.first()
.click({ force: true });
.click();
await page.getByRole('menuitem', { name: 'Edit', exact: true }).click();
await waitForHydration(page);
await expect(page.getByRole('heading', { name: 'Edit connection' })).toBeVisible();
Expand All @@ -433,7 +433,7 @@ test.describe('Storage — Connection edit sidebar', () => {
.getByRole('list', { name: 'Saved connections' })
.getByRole('button', { name: /Options for/ })
.nth(index)
.click({ force: true });
.click();
await page.getByRole('menuitem', { name: 'Delete', exact: true }).click();
await page.getByRole('dialog').getByRole('button', { name: 'Delete', exact: true }).click();
}
Expand Down
11 changes: 5 additions & 6 deletions e2e/storage/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ async function clearSavedConnections(page: Page) {
)
break;
const before = await items.count();
// Click the last button in the first list item. On desktop this is the
// "more options" button (opacity-0, so use force). On mobile it's the
// X delete button which submits the form directly.
await items.first().getByRole('button').last().click({ force: true });
// Desktop: a context menu appears — click Delete to open the modal.
// Mobile: the form submitted directly (no context menu), skip to hydration.
// Click the last button in the first list item. On desktop this is the options button,
// on mobile the X delete button, which submits the form directly.
await items.first().getByRole('button').last().click();
// Desktop: the options menu opens — click Delete to open the modal.
// Mobile: the form submitted directly (no menu), skip to hydration.
const deleteMenuItem = page.getByRole('menuitem', { name: 'Delete', exact: true });
if (await deleteMenuItem.isVisible().catch(() => false)) {
await deleteMenuItem.click();
Expand Down
4 changes: 1 addition & 3 deletions e2e/storage/pinning.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ test.describe('Storage S3 — Pinned locations', () => {
const sidebar = page.getByRole('navigation', { name: 'Buckets' });
await expect(sidebar.getByText('Pinned Access')).toBeVisible();

await sidebar.getByRole('button', { name: `Unpin ${credentials.bucket}` }).click({
force: true
});
await sidebar.getByRole('button', { name: `Unpin ${credentials.bucket}` }).click();

await expect(sidebar.getByText('Pinned Access')).toHaveCount(0);
} finally {
Expand Down
5 changes: 2 additions & 3 deletions src/lib/components/storage/sidebar/BucketList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@
<button
type="button"
class="
btn btn-ghost btn-xs absolute top-1/2 right-1 z-150 -translate-y-1/2
p-0 opacity-0 transition-opacity
group-hover:opacity-100 focus:opacity-100
btn btn-ghost btn-xs text-muted absolute top-1/2 right-1 z-150
-translate-y-1/2 p-0
"
data-unpin
onclick={() => unpin(pin, index)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@
actions={actionsFor(conn)}
onaction={(key) => handleMenuAction(key, conn)}
triggerClass="
btn btn-ghost btn-xs absolute inset-y-0 right-1 z-150 my-auto
p-0 opacity-0 transition-opacity
group-hover:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100
btn btn-ghost btn-xs text-muted absolute inset-y-0 right-1 z-150 my-auto p-0
"
/>
</li>
Expand Down
5 changes: 1 addition & 4 deletions src/routes/(app)/settings/connections/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@
tooltip="left"
actions={actionsFor(conn)}
onaction={(key) => handleMenuAction(key, conn)}
triggerClass="
btn btn-ghost btn-xs btn-square opacity-0
group-hover:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100
"
triggerClass="btn btn-ghost btn-xs btn-square text-muted"
/>
</td>
</tr>
Expand Down