From a05b666aab04de70ce0a130bb5dfdf1997bf05b3 Mon Sep 17 00:00:00 2001 From: TheMeinerLP Date: Sat, 28 Nov 2026 18:10:49 +0100 Subject: [PATCH 1/3] fix(ui): draw the sign-in and access errors with the shared alert Sign-in, second factor, SSO, team parent and inherited node messages were hand-built paragraphs, so each looked and announced differently from the rest of the dashboard. They now use MdAlert in the error tone, and the unreadable team notice uses the warning tone, which is announced politely instead of as an alert. --- .../access/SsoProviderDialog.card.test.ts | 21 +++++++++++ .../components/access/SsoProviderDialog.vue | 9 +++-- .../components/access/TeamParentsCard.test.ts | 16 ++++++++ .../src/components/access/TeamParentsCard.vue | 27 ++++++++------ .../access/nodes/NodeEditor.test.ts | 9 +++++ .../access/nodes/NodeInheritedSection.vue | 8 ++-- .../src/components/header/LoginModal.test.ts | 37 +++++++++++++++++++ .../src/components/header/LoginModal.vue | 25 +++++++------ .../components/identity/StepUpDialog.test.ts | 10 +++++ .../src/components/identity/StepUpDialog.vue | 8 ++-- 10 files changed, 135 insertions(+), 35 deletions(-) diff --git a/reposilite-frontend/src/components/access/SsoProviderDialog.card.test.ts b/reposilite-frontend/src/components/access/SsoProviderDialog.card.test.ts index 7a67b9f441..28db964b03 100644 --- a/reposilite-frontend/src/components/access/SsoProviderDialog.card.test.ts +++ b/reposilite-frontend/src/components/access/SsoProviderDialog.card.test.ts @@ -53,6 +53,27 @@ const openDialog = async (): Promise => { const registerSection = (): HTMLElement | null => document.querySelector('[aria-labelledby="sso-register-title"]') +describe('SsoProviderDialog refused save', () => { + afterEach(() => { + wrapper?.unmount() + wrapper = undefined + }) + + it('draws the refused save through MdAlert in the error state', async () => { + wrapper = mount(SsoProviderDialog, { + attachTo: document.body, + props: { modelValue: true, provider: KEYCLOAK, takenIds: [], productionUrl: 'http://localhost:3000/', failure: 'Issuer is unreachable' } + }) + await flushPromises() + + const alert = document.querySelector('[data-ingot-component="md-alert"]') + expect(alert?.textContent?.trim(), 'the refusal is shown').toContain('Issuer is unreachable') + expect(alert?.getAttribute('data-tone'), 'the refused save is drawn with the error tone').toBe('error') + expect(alert?.getAttribute('data-ingot-state'), 'the error alert carries the error state').toBe('error') + expect(alert?.getAttribute('role'), 'the refusal is announced once, on the alert root').toBe('alert') + }) +}) + describe('SsoProviderDialog register card', () => { afterEach(() => { wrapper?.unmount() diff --git a/reposilite-frontend/src/components/access/SsoProviderDialog.vue b/reposilite-frontend/src/components/access/SsoProviderDialog.vue index 0ac817ac02..e97e62fea0 100644 --- a/reposilite-frontend/src/components/access/SsoProviderDialog.vue +++ b/reposilite-frontend/src/components/access/SsoProviderDialog.vue @@ -16,6 +16,7 @@