[MM-47312] Migrate /enterprise/saml e2e tests to TypeScript (#28367)

Этот коммит содержится в:
Angel Mendez
2024-10-09 03:03:08 -06:00
коммит произвёл GitHub
родитель 035f3c14f1
Коммит 6fadc0c041
9 изменённых файлов: 444 добавлений и 430 удалений

Просмотреть файл

@@ -11,6 +11,7 @@
// Group: @channels @enterprise @saml
// Skip: @headless @electron @firefox // run on Chrome (headed) only
import {UserCollection} from 'tests/support/okta_commands';
import users from '../../../../fixtures/saml_users.json';
//Manual Setup required: Follow the instructions mentioned in the mattermost/platform-private/config/saml-okta-setup.txt file
@@ -92,7 +93,7 @@ context('Okta', () => {
// # Check SAML metadata if working properly
cy.apiGetMetadataFromIdp(idpMetadataUrl);
cy.oktaAddUsers(users);
cy.oktaAddUsers(users as unknown as UserCollection);
cy.apiUpdateConfig(newConfig).then(({config}) => {
cy.setTestSettings(loginButtonText, config).then((_response) => {
testSettings = _response;

Просмотреть файл

@@ -11,6 +11,7 @@
// Group: @channels @enterprise @saml
// Skip: @headless @electron @firefox // run on Chrome (headed) only
import {UserCollection} from 'tests/support/okta_commands';
import users from '../../../../fixtures/saml_users.json';
//Manual Setup required: Follow the instructions mentioned in the mattermost/platform-private/config/saml-okta-setup.txt file
@@ -88,7 +89,7 @@ context('LDAP SAML - Automated Tests (SAML TESTS)', () => {
// # Check SAML metadata if working properly
cy.apiGetMetadataFromIdp(idpMetadataUrl);
cy.oktaAddUsers(users);
cy.oktaAddUsers(users as unknown as UserCollection);
cy.apiUpdateConfig(newConfig).then(({config}) => {
cy.setTestSettings(loginButtonText, config).then((_response) => {
testSettings = _response;

Просмотреть файл

@@ -82,7 +82,7 @@ describe('SAML Guest', () => {
cy.apiUpdateConfig(newConfig).then(({config}) => {
cy.setTestSettings(loginButtonText, config).then((_response) => {
testSettings = _response;
cy.keycloakResetUsers({guestUser});
cy.keycloakResetUsers([guestUser]);
});
});
});
@@ -147,7 +147,7 @@ describe('SAML Guest', () => {
const testConfig = {
...newConfig,
GuestAccountsSettings: {
...newConfig.GuestAccountSettings,
...newConfig.GuestAccountsSettings,
Enable: true,
},
SamlSettings: {

Просмотреть файл

@@ -1,6 +1,8 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {AdminConfig} from '@mattermost/types/config';
// ***************************************************************
// - [#] indicates a test step (e.g. # Go to a page)
// - [*] indicates an assertion (e.g. * Check the title)
@@ -18,7 +20,7 @@ const testIdpURL = 'http://test_idp_url';
const testIdpDescriptorURL = 'http://test_idp_descriptor_url';
const getSamlMetadataErrorMessage = 'SAML Metadata URL did not connect and pull data successfully';
let config;
let config: AdminConfig;
describe('SystemConsole->SAML 2.0 - Get Metadata from Idp Flow', () => {
before(() => {