From f9016feef4a4d5bf61cf444894a8e24ec7e0b484 Mon Sep 17 00:00:00 2001 From: 00Chaotic Date: Tue, 19 Mar 2024 15:08:23 +1100 Subject: [PATCH 1/5] feat: allow admin login when using demo auth type --- .../src/component/user/DemoAuth/DemoAuth.tsx | 2 +- .../__snapshots__/create-config.test.ts.snap | 1 + src/lib/create-config.test.ts | 14 ++++ src/lib/create-config.ts | 4 + .../demo-authentication.e2e.test.ts | 73 +++++++++++++++++++ src/lib/middleware/demo-authentication.ts | 23 +++--- src/lib/services/user-service.ts | 6 ++ src/lib/types/option.ts | 1 + 8 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 src/lib/middleware/demo-authentication.e2e.test.ts diff --git a/frontend/src/component/user/DemoAuth/DemoAuth.tsx b/frontend/src/component/user/DemoAuth/DemoAuth.tsx index ff4054959f69..de29cfc970cd 100644 --- a/frontend/src/component/user/DemoAuth/DemoAuth.tsx +++ b/frontend/src/component/user/DemoAuth/DemoAuth.tsx @@ -63,7 +63,7 @@ const DemoAuth: VFC = ({ authDetails, redirect }) => { id='email' data-testid={LOGIN_EMAIL_ID} required - type='email' + type={email === 'admin' ? 'text' : 'email'} />