From ee1fea3db638af52d3196285ace54b8c98990445 Mon Sep 17 00:00:00 2001 From: shweta2101 Date: Thu, 27 Aug 2026 12:27:01 +0530 Subject: [PATCH 1/3] Add TDEI register/forgot links to sign-in Expose VITE_TDEI_REGISTER_URL and VITE_TDEI_FORGOT_PASSWORD_URL across the app and add account links to the sign-in form. Dockerfile ARGs were added, the SigninForm component now reads the env vars, renders register/forgot-password links and styles them, Playwright config seeds the test env with portal-dev URLs, and an e2e test + snapshot were added to verify the links. --- Dockerfile | 2 + components/SigninForm.vue | 38 +++++++++++++++++++ playwright.config.ts | 2 + test/e2e/signin.spec.ts | 10 +++++ ...m-to-an-unauthenticated-visitor-1.aria.yml | 9 ++++- 5 files changed, 60 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 453e090..8d171cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ FROM node as builder # ARG VITE_TDEI_API_URL ARG VITE_TDEI_USER_API_URL +ARG VITE_TDEI_REGISTER_URL +ARG VITE_TDEI_FORGOT_PASSWORD_URL ARG VITE_API_URL ARG VITE_NEW_API_URL ARG VITE_OSM_URL diff --git a/components/SigninForm.vue b/components/SigninForm.vue index c257d17..07eb35f 100644 --- a/components/SigninForm.vue +++ b/components/SigninForm.vue @@ -3,6 +3,7 @@ @test e2e: the Sign In button is disabled until both username and password are entered @test e2e: invalid credentials (401) surface "Incorrect TDEI username/password." @test e2e: the show/hide toggle switches the password field between hidden and visible text + @test e2e: registration and password recovery link back to the configured TDEI Portal pages --> @@ -94,6 +106,8 @@ const username = ref('') const password = ref('') const showPassword = ref(false) const disabled = computed(() => loading.active || !username.value.length || !password.value.length) +const registerUrl = import.meta.env.VITE_TDEI_REGISTER_URL +const forgotPasswordUrl = import.meta.env.VITE_TDEI_FORGOT_PASSWORD_URL async function submit() { error.value = '' @@ -263,6 +277,30 @@ async function signIn() { color: #cc2c47; } +.signin-account-links { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.5rem; + margin-top: 2rem; + font-size: 0.9375rem; + line-height: 1.5; + color: $text-navy; + + a { + color: $primary; + font-weight: 600; + + &:hover { + color: $primary-hover; + } + } +} + +.signin-register-prompt { + margin: 0; +} + @include media-breakpoint-down(sm) { .signin-card { max-width: 100%; diff --git a/playwright.config.ts b/playwright.config.ts index f454fab..b28568d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,6 +12,8 @@ const E2E_ENV = { VITE_NEW_API_URL: 'http://api.test/', VITE_TDEI_API_URL: 'http://api.test/tdei/', VITE_TDEI_USER_API_URL: 'http://api.test/tdei-user/', + VITE_TDEI_REGISTER_URL: 'https://portal.test/register', + VITE_TDEI_FORGOT_PASSWORD_URL: 'https://portal.test/ForgotPassword', VITE_OSM_URL: 'http://api.test/osm/', VITE_RAPID_URL: 'http://api.test/rapid/', VITE_RAPID3_URL: 'http://api.test/rapid3/', diff --git a/test/e2e/signin.spec.ts b/test/e2e/signin.spec.ts index ef70c1d..ac6a944 100644 --- a/test/e2e/signin.spec.ts +++ b/test/e2e/signin.spec.ts @@ -96,4 +96,14 @@ test.describe('signin form', () => { await page.getByRole('button', { name: 'Hide password' }).click(); await expect(password).toHaveAttribute('type', 'password'); }); + + // @test e2e: registration and password recovery link back to the configured TDEI Portal pages + test('links to the TDEI Portal account pages', async ({ page }) => { + await page.goto('/signin'); + + await expect(page.getByRole('link', { name: 'Register', exact: true })) + .toHaveAttribute('href', 'https://portal.test/register'); + await expect(page.getByRole('link', { name: 'Forgot Password', exact: true })) + .toHaveAttribute('href', 'https://portal.test/ForgotPassword'); + }); }); diff --git a/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml b/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml index a6d289c..c3b8879 100644 --- a/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml +++ b/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml @@ -5,4 +5,11 @@ - text: Enter the same username that you provide to use the TDEI API. Password - textbox "Password" - button "Show password":  -- button "Sign In" [disabled] \ No newline at end of file +- button "Sign In" [disabled] +- navigation "TDEI account": + - paragraph: + - text: New to TDEI? + - link "Register": + - /url: /.+/ + - link "Forgot Password": + - /url: /.+/ From fe80951888c44754217cc5a2a56056f091bf0b49 Mon Sep 17 00:00:00 2001 From: shweta2101 Date: Thu, 27 Aug 2026 12:39:56 +0530 Subject: [PATCH 2/3] Update signin links copy and link styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change account link labels in SigninForm.vue: 'Register' → 'Register Now' and 'Forgot Password' → 'Forgot Password?'. Add CSS to remove link underlines (no text-decoration on normal and hover) while keeping existing color/hover behavior. Update Playwright e2e test and the ARIA snapshot to reflect the new link text. --- components/SigninForm.vue | 6 ++++-- test/e2e/signin.spec.ts | 4 ++-- ...he-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/SigninForm.vue b/components/SigninForm.vue index 07eb35f..96a2739 100644 --- a/components/SigninForm.vue +++ b/components/SigninForm.vue @@ -88,9 +88,9 @@ > - Forgot Password + Forgot Password? @@ -290,9 +290,11 @@ async function signIn() { a { color: $primary; font-weight: 600; + text-decoration: none; &:hover { color: $primary-hover; + text-decoration: none; } } } diff --git a/test/e2e/signin.spec.ts b/test/e2e/signin.spec.ts index ac6a944..bfa725a 100644 --- a/test/e2e/signin.spec.ts +++ b/test/e2e/signin.spec.ts @@ -101,9 +101,9 @@ test.describe('signin form', () => { test('links to the TDEI Portal account pages', async ({ page }) => { await page.goto('/signin'); - await expect(page.getByRole('link', { name: 'Register', exact: true })) + await expect(page.getByRole('link', { name: 'Register Now', exact: true })) .toHaveAttribute('href', 'https://portal.test/register'); - await expect(page.getByRole('link', { name: 'Forgot Password', exact: true })) + await expect(page.getByRole('link', { name: 'Forgot Password?', exact: true })) .toHaveAttribute('href', 'https://portal.test/ForgotPassword'); }); }); diff --git a/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml b/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml index c3b8879..2d54b3c 100644 --- a/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml +++ b/test/e2e/signin.spec.ts-snapshots/shows-the-sign-in-form-to-an-unauthenticated-visitor-1.aria.yml @@ -9,7 +9,7 @@ - navigation "TDEI account": - paragraph: - text: New to TDEI? - - link "Register": + - link "Register Now": - /url: /.+/ - - link "Forgot Password": + - link "Forgot Password?": - /url: /.+/ From 4245247b5a955aee9ea2ab62ad17f25dda306c99 Mon Sep 17 00:00:00 2001 From: shweta2101 Date: Thu, 27 Aug 2026 13:06:07 +0530 Subject: [PATCH 3/3] Use VITE_TDEI_PORTAL_URL for auth links Replace separate VITE_TDEI_REGISTER_URL and VITE_TDEI_FORGOT_PASSWORD_URL with a single VITE_TDEI_PORTAL_URL. SigninForm now builds register (/register) and forgot password (/ForgotPassword) URLs from the portal base, Playwright e2e env is updated to provide the portal base, and the Dockerfile ARG was renamed to VITE_TDEI_PORTAL_URL for the build environment. --- Dockerfile | 3 +-- components/SigninForm.vue | 5 +++-- playwright.config.ts | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d171cd..ea0d743 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,7 @@ FROM node as builder # ARG VITE_TDEI_API_URL ARG VITE_TDEI_USER_API_URL -ARG VITE_TDEI_REGISTER_URL -ARG VITE_TDEI_FORGOT_PASSWORD_URL +ARG VITE_TDEI_PORTAL_URL ARG VITE_API_URL ARG VITE_NEW_API_URL ARG VITE_OSM_URL diff --git a/components/SigninForm.vue b/components/SigninForm.vue index 96a2739..33508d6 100644 --- a/components/SigninForm.vue +++ b/components/SigninForm.vue @@ -106,8 +106,9 @@ const username = ref('') const password = ref('') const showPassword = ref(false) const disabled = computed(() => loading.active || !username.value.length || !password.value.length) -const registerUrl = import.meta.env.VITE_TDEI_REGISTER_URL -const forgotPasswordUrl = import.meta.env.VITE_TDEI_FORGOT_PASSWORD_URL +const tdeiPortalUrl = import.meta.env.VITE_TDEI_PORTAL_URL +const registerUrl = new URL('/register', tdeiPortalUrl).toString() +const forgotPasswordUrl = new URL('/ForgotPassword', tdeiPortalUrl).toString() async function submit() { error.value = '' diff --git a/playwright.config.ts b/playwright.config.ts index b28568d..87410c7 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,8 +12,7 @@ const E2E_ENV = { VITE_NEW_API_URL: 'http://api.test/', VITE_TDEI_API_URL: 'http://api.test/tdei/', VITE_TDEI_USER_API_URL: 'http://api.test/tdei-user/', - VITE_TDEI_REGISTER_URL: 'https://portal.test/register', - VITE_TDEI_FORGOT_PASSWORD_URL: 'https://portal.test/ForgotPassword', + VITE_TDEI_PORTAL_URL: 'https://portal.test', VITE_OSM_URL: 'http://api.test/osm/', VITE_RAPID_URL: 'http://api.test/rapid/', VITE_RAPID3_URL: 'http://api.test/rapid3/',