[MM-47312] Migrate /enterprise/saml e2e tests to TypeScript (#28367)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
035f3c14f1
Коммит
6fadc0c041
@@ -51,7 +51,7 @@ function doSamlLogin(settings) {
|
||||
cy.checkLoginPage(settings);
|
||||
|
||||
//click the login button
|
||||
cy.findByText(settings.loginButtonText).should('be.visible').click().wait(TIMEOUTS.ONE_SEC);
|
||||
return cy.findByText(settings.loginButtonText).should('be.visible').click().wait(TIMEOUTS.ONE_SEC);
|
||||
}
|
||||
|
||||
Cypress.Commands.add('doSamlLogin', doSamlLogin);
|
||||
@@ -65,7 +65,7 @@ function doSamlLogout(settings) {
|
||||
|
||||
// # Logout then check login page
|
||||
cy.uiLogout();
|
||||
cy.checkLoginPage(settings);
|
||||
return cy.checkLoginPage(settings);
|
||||
}
|
||||
|
||||
Cypress.Commands.add('doSamlLogout', doSamlLogout);
|
||||
@@ -99,14 +99,14 @@ Cypress.Commands.add('getInvitePeopleLink', getInvitePeopleLink);
|
||||
* @param {AdminConfig} config - The config object
|
||||
* @returns {TestSettings} - The settings to use for SAML tests
|
||||
*/
|
||||
function setTestSettings(loginButtonText: string, config: AdminConfig): TestSettings {
|
||||
return {
|
||||
function setTestSettings(loginButtonText: string, config: AdminConfig): ChainableT<TestSettings> {
|
||||
return cy.wrap({
|
||||
loginButtonText,
|
||||
siteName: config.TeamSettings.SiteName,
|
||||
siteUrl: config.ServiceSettings.SiteURL,
|
||||
teamName: '',
|
||||
user: null,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Cypress.Commands.add('setTestSettings', setTestSettings);
|
||||
|
||||
Ссылка в новой задаче
Block a user