[MM-47303] Migrate /enterprise/extend_session/not_extended_when_disabled e2e tests to TypeScript (#28465)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b4f337f191
Коммит
2aaa38b368
@@ -19,7 +19,7 @@ export function verifyExtendedSession(testUser, sessionLengthInDays, channelUrl)
|
||||
|
||||
// # Post a message to a channel
|
||||
const now = Date.now();
|
||||
cy.postMessage(now);
|
||||
cy.postMessage(`${now}`);
|
||||
|
||||
// # Update user session which is to expire 20 sec from now
|
||||
const soonToExpire = getExpirationFromNow(thirtySeconds);
|
||||
@@ -53,7 +53,7 @@ export function verifyExtendedSession(testUser, sessionLengthInDays, channelUrl)
|
||||
|
||||
// # Post multiple times to check that the session continues and doesn't redirect to login page
|
||||
Cypress._.times(20, (i) => {
|
||||
cy.postMessage(i);
|
||||
cy.postMessage(`${i}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
// Group: @channels @enterprise @not_cloud @extend_session
|
||||
|
||||
import {UserProfile} from '@mattermost/types/users';
|
||||
import {verifyExtendedSession, verifyNotExtendedSession} from './helpers';
|
||||
|
||||
describe('Extended Session Length', () => {
|
||||
@@ -16,10 +17,11 @@ describe('Extended Session Length', () => {
|
||||
const setting = {
|
||||
ServiceSettings: {
|
||||
SessionLengthWebInHours: sessionLengthInHours,
|
||||
ExtendSessionLengthWithActivity: false,
|
||||
},
|
||||
};
|
||||
let emailUser;
|
||||
let offTopicUrl;
|
||||
let emailUser: UserProfile;
|
||||
let offTopicUrl: string;
|
||||
|
||||
before(() => {
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
// Group: @channels @enterprise @not_cloud @extend_session @ldap
|
||||
|
||||
import {UserProfile} from '@mattermost/types/users';
|
||||
import ldapUsers from '../../../../../fixtures/ldap_users.json';
|
||||
|
||||
import {verifyExtendedSession, verifyNotExtendedSession} from './helpers';
|
||||
@@ -18,10 +19,11 @@ describe('Extended Session Length', () => {
|
||||
const setting = {
|
||||
ServiceSettings: {
|
||||
SessionLengthWebInHours: sessionLengthInHours,
|
||||
ExtendSessionLengthWithActivity: false,
|
||||
},
|
||||
};
|
||||
let testLdapUser;
|
||||
let offTopicUrl;
|
||||
let testLdapUser: UserProfile;
|
||||
let offTopicUrl: string;
|
||||
|
||||
before(() => {
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
@@ -14,9 +14,11 @@
|
||||
|
||||
// Group: @channels @enterprise @not_cloud @extend_session @ldap @saml @keycloak
|
||||
|
||||
import {UserProfile} from '@mattermost/types/users';
|
||||
import {getKeycloakServerSettings} from '../../../../../utils/config';
|
||||
|
||||
import {verifyExtendedSession, verifyNotExtendedSession} from './helpers';
|
||||
import {LdapUser} from 'tests/support/ldap_server_commands';
|
||||
|
||||
describe('Extended Session Length', () => {
|
||||
const sessionLengthInDays = 1;
|
||||
@@ -24,13 +26,14 @@ describe('Extended Session Length', () => {
|
||||
const sessionConfig = {
|
||||
ServiceSettings: {
|
||||
SessionLengthSSOInDays: sessionLengthInDays,
|
||||
ExtendSessionLengthWithActivity: false,
|
||||
},
|
||||
};
|
||||
|
||||
let testTeamId;
|
||||
let testSamlUser;
|
||||
let offTopicUrl;
|
||||
let samlLdapUser;
|
||||
let testTeamId: string;
|
||||
let testSamlUser: UserProfile;
|
||||
let offTopicUrl: string;
|
||||
let samlLdapUser: LdapUser;
|
||||
|
||||
before(() => {
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
Ссылка в новой задаче
Block a user