From f093359a838e4d2afccc0b4632beb0bb1cd1fc92 Mon Sep 17 00:00:00 2001 From: Kamen Bachvarov Date: Mon, 19 Jan 2026 09:09:09 +0000 Subject: [PATCH 1/2] adapt smokeLogin to use odscode as parameter with default --- app/cypress/support/e2e.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/cypress/support/e2e.ts b/app/cypress/support/e2e.ts index ffc2fec76..552a0cf05 100644 --- a/app/cypress/support/e2e.ts +++ b/app/cypress/support/e2e.ts @@ -73,10 +73,9 @@ Cypress.Commands.add('login', (role, featureFlags) => { cy.wait('@featureFlags'); }); -Cypress.Commands.add('smokeLogin', (role) => { +Cypress.Commands.add('smokeLogin', (role, odsCode = 'H81109') => { const baseUrl = Cypress.config('baseUrl'); const key = Cypress.env('KEY'); - const odsCode = Cypress.env('ODSCODE'); const startUrl = '/'; cy.visit(startUrl); @@ -145,8 +144,9 @@ declare global { /** * Real user login via CIS2 and redirect back to {baseUrl}/auth-callback. * @param {Roles} role - The user role to login with. Must be an enum of Roles + * @param {string} odsCode - The ODS code to use for login. Defaults to 'H81109' */ - smokeLogin(role: RoleKey | RoleId | string): Chainable; + smokeLogin(role: string, odsCode?: string): Chainable; /** * Add file to s3 bucket * @param {string} bucketName - Name of the target S3 bucket From 39da8a83640ccdb47f46f64f749a20178f503e8a Mon Sep 17 00:00:00 2001 From: Kamen Bachvarov Date: Mon, 19 Jan 2026 09:20:27 +0000 Subject: [PATCH 2/2] role type --- app/cypress/support/e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cypress/support/e2e.ts b/app/cypress/support/e2e.ts index 552a0cf05..1066af1d2 100644 --- a/app/cypress/support/e2e.ts +++ b/app/cypress/support/e2e.ts @@ -146,7 +146,7 @@ declare global { * @param {Roles} role - The user role to login with. Must be an enum of Roles * @param {string} odsCode - The ODS code to use for login. Defaults to 'H81109' */ - smokeLogin(role: string, odsCode?: string): Chainable; + smokeLogin(role: RoleKey | RoleId | string, odsCode?: string): Chainable; /** * Add file to s3 bucket * @param {string} bucketName - Name of the target S3 bucket