From 84fba1e1d4da12e56f45b84128e194459a09c9d6 Mon Sep 17 00:00:00 2001 From: Angel Mendez Date: Tue, 8 Oct 2024 16:24:40 -0600 Subject: [PATCH] refactor: convert auth_sso files to ts (#28349) - convert js files to ts - update types Fixes #21311 --- .../{authentication_spec.js => authentication_spec.ts} | 3 ++- ...thentication_spec.js => mfa_authentication_spec.ts} | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) rename e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/{authentication_spec.js => authentication_spec.ts} (98%) rename e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/{mfa_authentication_spec.js => mfa_authentication_spec.ts} (96%) diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/authentication_spec.js b/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/authentication_spec.ts similarity index 98% rename from e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/authentication_spec.js rename to e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/authentication_spec.ts index 3a0abcd99a..19797b11f4 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/authentication_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/authentication_spec.ts @@ -10,13 +10,14 @@ // Stage: @prod // Group: @channels @enterprise @system_console @authentication +import {Team} from '@mattermost/types/teams'; import * as TIMEOUTS from '../../../../fixtures/timeouts'; import {getRandomId} from '../../../../utils'; describe('Authentication', () => { const restrictCreationToDomains = 'mattermost.com, test.com'; - let testTeam; + let testTeam: Team; before(() => { cy.apiRequireLicense(); diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/mfa_authentication_spec.js b/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/mfa_authentication_spec.ts similarity index 96% rename from e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/mfa_authentication_spec.js rename to e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/mfa_authentication_spec.ts index 13ec3ebc9c..5c49796fe8 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/mfa_authentication_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/auth_sso/mfa_authentication_spec.ts @@ -10,14 +10,14 @@ // Stage: @prod // Group: @channels @enterprise @system_console @authentication @mfa +import {UserProfile} from '@mattermost/types/users'; +import * as authenticator from 'authenticator'; import * as TIMEOUTS from '../../../../fixtures/timeouts'; -const authenticator = require('authenticator'); - describe('Authentication', () => { - let mfaSysAdmin; - let testUser; - let adminMFASecret; + let mfaSysAdmin: UserProfile; + let testUser: UserProfile; + let adminMFASecret: string; before(() => { cy.apiRequireLicenseForFeature('MFA');