diff --git a/components/layout/__tests__/sidebar-plugin-section.test.tsx b/components/layout/__tests__/sidebar-plugin-section.test.tsx
index d17904faf..0ca14bed3 100644
--- a/components/layout/__tests__/sidebar-plugin-section.test.tsx
+++ b/components/layout/__tests__/sidebar-plugin-section.test.tsx
@@ -31,7 +31,7 @@ const mailboxes: Mailbox[] = [
{ id: 'inbox', name: 'Inbox', role: 'inbox', parentId: null, totalEmails: 0, unreadEmails: 0, myRights: { mayAddItems: true } },
] as unknown as Mailbox[];
-function offer(id: string, name: string, slot: string) {
+function offer(id: string, name: string, slot: string, extraSlots: string[] = []) {
const plugin: InstalledPlugin = {
id, name, version: '1.0.0', author: '', description: '', type: 'ui-extension',
permissions: ['ui:sidebar-widget'], grantedPermissions: ['ui:sidebar-widget'], entrypoint: 'index.js',
@@ -42,7 +42,7 @@ function offer(id: string, name: string, slot: string) {
code: '',
tier: 'untrusted',
background: { evaluateShouldShow: vi.fn(async () => true) } as never,
- slotOffers: [{ name: slot as never, order: 100, hasShouldShow: false }],
+ slotOffers: [{ name: slot as never, order: 100, hasShouldShow: false }, ...extraSlots.map((name) => ({ name: name as never, order: 100, hasShouldShow: false }))],
hookDisposables: [],
});
}
@@ -84,6 +84,24 @@ describe('Sidebar plugin sections', () => {
expect(opts.extraProps).toEqual({ mailboxId: 'inbox' });
});
+ it('places inline plugin actions next to the collapsible heading, never inside its button', async () => {
+ offer('cal', 'Agenda', 'sidebar-section', ['sidebar-section-actions']);
+ const { container } = render(