fix: known failed E2E tests (#23708)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
bc66807acc
Коммит
16ad573979
@@ -15,6 +15,7 @@ import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
||||
import {getRandomId} from '../../../../utils';
|
||||
|
||||
describe('Authentication', () => {
|
||||
const restrictCreationToDomains = 'mattermost.com, test.com';
|
||||
let testTeam;
|
||||
|
||||
before(() => {
|
||||
@@ -34,34 +35,33 @@ describe('Authentication', () => {
|
||||
// # Set restricted domain
|
||||
cy.apiUpdateConfig({
|
||||
TeamSettings: {
|
||||
RestrictCreationToDomains: 'mattermost.com, test.com',
|
||||
RestrictCreationToDomains: restrictCreationToDomains,
|
||||
},
|
||||
}).then(() => {
|
||||
cy.visit(`/admin_console/user_management/teams/${testTeam.id}`);
|
||||
|
||||
cy.findByTestId('allowAllToggleSwitch', {timeout: TIMEOUTS.ONE_MIN}).click();
|
||||
|
||||
// # Click "Save"
|
||||
cy.findByText('Save').scrollIntoView().click();
|
||||
|
||||
// # Wait until we are at the Mattermost Teams page
|
||||
cy.findByText('Mattermost Teams', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
||||
|
||||
cy.apiLogout();
|
||||
|
||||
cy.visit(`/signup_user_complete/?id=${testTeam.invite_id}`);
|
||||
|
||||
cy.get('#input_email', {timeout: TIMEOUTS.ONE_MIN}).type(`Hossein_Is_The_Best_PROGRAMMER${getRandomId()}@BestInTheWorld.com`);
|
||||
|
||||
cy.get('#input_password-input').type('Test123456!');
|
||||
|
||||
cy.get('#input_name').clear().type(`HosseinIs2Cool${getRandomId()}`);
|
||||
|
||||
cy.findByText('Create Account').click();
|
||||
|
||||
// * Make sure account was not created successfully
|
||||
cy.findByText('The email you provided does not belong to an accepted domain. Please contact your administrator or sign up with a different email.').should('be.visible').and('exist');
|
||||
});
|
||||
|
||||
cy.visit(`/admin_console/user_management/teams/${testTeam.id}`);
|
||||
|
||||
cy.findByTestId('allowAllToggleSwitch', {timeout: TIMEOUTS.ONE_MIN}).click();
|
||||
|
||||
// # Click "Save"
|
||||
cy.findByText('Save').scrollIntoView().click();
|
||||
|
||||
// # Wait until we are at the Mattermost Teams page
|
||||
cy.findByText('Mattermost Teams', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
||||
|
||||
cy.apiLogout().visit(`/signup_user_complete/?id=${testTeam.invite_id}`);
|
||||
|
||||
cy.get('#input_email', {timeout: TIMEOUTS.ONE_MIN}).type(`test-${getRandomId()}@example.com`);
|
||||
|
||||
cy.get('#input_password-input').type('Test123456!');
|
||||
|
||||
cy.get('#input_name').clear().type(`Test${getRandomId()}`);
|
||||
|
||||
cy.findByText('Create Account').click();
|
||||
|
||||
// * Make sure account was not created successfully
|
||||
cy.get('.AlertBanner__title').scrollIntoView().should('be.visible');
|
||||
cy.findByText('The email you provided does not belong to an accepted domain. Please contact your administrator or sign up with a different email.').should('be.visible').and('exist');
|
||||
});
|
||||
|
||||
it('MM-T1761 - Enable Open Server - Create link appears if email account creation is false and other signin methods are true', () => {
|
||||
@@ -73,13 +73,12 @@ describe('Authentication', () => {
|
||||
LdapSettings: {
|
||||
Enable: true,
|
||||
},
|
||||
}).then(() => {
|
||||
cy.apiLogout();
|
||||
cy.visit('/');
|
||||
|
||||
// * Assert that create account button is visible
|
||||
cy.findByText('Don\'t have an account?', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
||||
});
|
||||
|
||||
cy.apiLogout().visit('/');
|
||||
|
||||
// * Assert that create account button is visible
|
||||
cy.findByText('Don\'t have an account?', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
||||
});
|
||||
|
||||
it('MM-T1766 - Authentication - Email - Creation with email = true', () => {
|
||||
@@ -89,16 +88,14 @@ describe('Authentication', () => {
|
||||
EnableSignUpWithEmail: true,
|
||||
},
|
||||
TeamSettings: {
|
||||
RestrictCreationToDomains: 'mattermost.com, test.com',
|
||||
RestrictCreationToDomains: restrictCreationToDomains,
|
||||
},
|
||||
}).then(() => {
|
||||
cy.apiLogout();
|
||||
|
||||
cy.visit(`/signup_user_complete/?id=${testTeam.invite_id}`);
|
||||
|
||||
// * Email and Password option exist
|
||||
cy.findByText('Email address').should('exist').and('be.visible');
|
||||
cy.findByPlaceholderText('Choose a Password').should('exist').and('be.visible');
|
||||
});
|
||||
|
||||
cy.apiLogout().visit(`/signup_user_complete/?id=${testTeam.invite_id}`);
|
||||
|
||||
// * Email and Password option exist
|
||||
cy.findByText('Email address').should('exist').and('be.visible');
|
||||
cy.findByPlaceholderText('Choose a Password').should('exist').and('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
Ссылка в новой задаче
Block a user