snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 1s
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 1s
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @onboarding
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {getRandomId, newTestPassword} from '@/utils';
|
||||
|
||||
const uniqueUserId = getRandomId();
|
||||
|
||||
function signupWithEmail(name, pw) {
|
||||
// # Go to /login
|
||||
cy.visit('/login');
|
||||
|
||||
// # Click on sign up button
|
||||
cy.findByText('Don\'t have an account?', {timeout: TIMEOUTS.HALF_MIN}).should('be.visible').click();
|
||||
|
||||
// # Type email address (by adding the uniqueUserId in the email address)
|
||||
cy.get('#input_email').type('unique.' + uniqueUserId + '@sample.mattermost.com');
|
||||
|
||||
// # Type 'unique-1' for username
|
||||
cy.get('#input_name').type(name);
|
||||
|
||||
// # Type 'unique1pw' for password
|
||||
cy.get('#input_password-input').type(pw);
|
||||
|
||||
// # Check the terms and privacy checkbox
|
||||
cy.get('#signup-body-card-form-check-terms-and-privacy').check();
|
||||
|
||||
// # Click on Create Account button
|
||||
cy.findByText('Create account').click();
|
||||
}
|
||||
|
||||
describe('Cloud Onboarding', () => {
|
||||
before(() => {
|
||||
// # Disable other auth options
|
||||
const newSettings = {
|
||||
Office365Settings: {Enable: false},
|
||||
LdapSettings: {Enable: false},
|
||||
};
|
||||
cy.apiUpdateConfig(newSettings);
|
||||
cy.apiLogout();
|
||||
});
|
||||
|
||||
it('MM-T403 Email address already exists', () => {
|
||||
// # Signup a new user with an email address and user generated in signupWithEmail
|
||||
signupWithEmail('unique.' + uniqueUserId, newTestPassword());
|
||||
|
||||
// * Verify there is Logout Button
|
||||
cy.contains('Logout').should('be.visible');
|
||||
|
||||
// * Verify 'Teams you can join' is visible
|
||||
cy.get('#teamsYouCanJoinContent').should('be.visible');
|
||||
|
||||
// * Verify the link to create a new team is available
|
||||
cy.get('#createNewTeamLink').should('have.attr', 'href', '/create_team').and('be.visible', 'contain', 'Create a team');
|
||||
|
||||
// # Logout and signup another user with the same email but different username and password
|
||||
cy.apiLogout();
|
||||
signupWithEmail('unique-2', newTestPassword());
|
||||
|
||||
// * Error message displays below the Create Account button that says "An account with that email already exists"
|
||||
cy.findByText('An account with that email already exists.').should('be.visible');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,108 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @te_only @onboarding
|
||||
|
||||
import {inviteUserByEmail, verifyEmailInviteAndVisitLink, signupAndVerifyTutorial} from '../team_settings/helpers';
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {getAdminAccount} from '@/support/env';
|
||||
import {getRandomId, newTestPassword} from '@/utils';
|
||||
|
||||
describe('Onboarding', () => {
|
||||
const sysadmin = getAdminAccount();
|
||||
const usernameOne = `user${getRandomId()}`;
|
||||
const usernameTwo = `user${getRandomId()}`;
|
||||
const usernameThree = `user${getRandomId()}`;
|
||||
const emailOne = `${usernameOne}@sample.mattermost.com`;
|
||||
const emailTwo = `${usernameTwo}@sample.mattermost.com`;
|
||||
const emailThree = `${usernameThree}@sample.mattermost.com`;
|
||||
const password = newTestPassword();
|
||||
|
||||
let testTeam;
|
||||
let siteName;
|
||||
|
||||
before(() => {
|
||||
cy.shouldRunOnTeamEdition();
|
||||
|
||||
// # Disable LDAP, enable onboarding and do email test if setup properly
|
||||
cy.apiUpdateConfig({
|
||||
LdapSettings: {Enable: false},
|
||||
ServiceSettings: {EnableOnboardingFlow: true},
|
||||
}).then(({config}) => {
|
||||
siteName = config.TeamSettings.SiteName;
|
||||
});
|
||||
cy.shouldHaveEmailEnabled();
|
||||
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
testTeam = team;
|
||||
cy.visit(`/${team.name}/channels/town-square`);
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T399 Invalidate Pending Email Invitations', () => {
|
||||
// # As sysadmin, invite the first user and logout
|
||||
inviteUserByEmail(emailOne);
|
||||
cy.apiLogout();
|
||||
|
||||
// # Get the email sent to the first user, verify the email and go to the provided link
|
||||
verifyEmailInviteAndVisitLink(sysadmin.username, usernameOne, emailOne, testTeam, siteName);
|
||||
|
||||
// # Signup as as the first user and verify that signup was successful
|
||||
signupAndVerifyTutorial(usernameOne, password, testTeam.display_name);
|
||||
|
||||
// # Logout from the current user and login as sysadmin
|
||||
cy.apiLogout();
|
||||
cy.apiAdminLogin();
|
||||
cy.reload();
|
||||
|
||||
// # Open the 'Invite People' modal
|
||||
cy.uiOpenTeamMenu('Invite people');
|
||||
|
||||
// # Wait half a second to ensure that the modal has been fully loaded
|
||||
cy.wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
// # Invite two more users and close the modal
|
||||
inviteNewUser(emailTwo);
|
||||
cy.findByTestId('invite-more').click();
|
||||
inviteNewUser(emailThree);
|
||||
cy.findByText('Done').should('be.visible').click();
|
||||
|
||||
// # Go to system console and invalidate the last two email invites
|
||||
cy.uiOpenProductMenu('System Console');
|
||||
cy.findByText('Signup').scrollIntoView().should('be.visible').click();
|
||||
cy.get('#InvalidateEmailInvitesButton').should('be.visible').within(() => {
|
||||
cy.findByText('Invalidate pending email invites').should('be.visible').click();
|
||||
});
|
||||
|
||||
// # Logout from sysadmin account
|
||||
cy.apiLogout();
|
||||
|
||||
// # Get the email sent to the second user, verify the email and go to the provided link
|
||||
verifyEmailInviteAndVisitLink(sysadmin.username, usernameTwo, emailTwo, testTeam, siteName);
|
||||
|
||||
// # Type username and password
|
||||
cy.get('#name').should('be.visible').type(usernameTwo);
|
||||
cy.get('#password').should('be.visible').type(password);
|
||||
|
||||
// # Attempt to create an account by clicking on the 'Create account' button
|
||||
cy.get('#createAccountButton').click();
|
||||
|
||||
// * Ensure that since the invite was invalidated, the correct error message should be shown
|
||||
cy.get('#existingEmailErrorContainer').should('exist').and('have.text', 'The signup link does not appear to be valid.');
|
||||
});
|
||||
|
||||
function inviteNewUser(email) {
|
||||
cy.findByRole('textbox', {name: 'Invite People'}).
|
||||
typeWithForce(email).wait(TIMEOUTS.HALF_SEC).
|
||||
typeWithForce('{enter}');
|
||||
cy.findByTestId('inviteButton').click();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,118 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @enterprise @onboarding
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {generateRandomUser} from '@/support/api/user';
|
||||
import {
|
||||
getWelcomeEmailTemplate,
|
||||
reUrl,
|
||||
verifyEmailBody,
|
||||
} from '@/utils';
|
||||
|
||||
describe('Onboarding', () => {
|
||||
let siteName;
|
||||
let siteUrl;
|
||||
let testTeam;
|
||||
const {username, email, password} = generateRandomUser();
|
||||
|
||||
before(() => {
|
||||
// # Disable LDAP, require email invitation, and do email test if setup properly
|
||||
cy.apiUpdateConfig({
|
||||
LdapSettings: {Enable: false},
|
||||
EmailSettings: {RequireEmailVerification: true},
|
||||
ServiceSettings: {EnableOnboardingFlow: true},
|
||||
}).then(({config}) => {
|
||||
siteName = config.TeamSettings.SiteName;
|
||||
siteUrl = config.ServiceSettings.SiteURL;
|
||||
});
|
||||
cy.shouldHaveEmailEnabled();
|
||||
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
testTeam = team;
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T400 Create account from login page link using email-password', () => {
|
||||
// # Open team menu and click on "Team Settings"
|
||||
cy.uiOpenTeamMenu('Team settings');
|
||||
|
||||
// * Check that the 'Team Settings' modal was opened
|
||||
cy.get('#teamSettingsModal').should('exist').within(() => {
|
||||
cy.get('#accessButton').should('be.visible').click();
|
||||
|
||||
// # Click 'Public Team' card to allow any user to join the team
|
||||
cy.get('#public-private-selector-button-O').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="SaveChangesPanel__save-btn"]').should('be.visible').click();
|
||||
|
||||
// # Close the modal
|
||||
cy.findByLabelText('Close').should('be.visible').click();
|
||||
});
|
||||
|
||||
// # Logout from sysadmin account
|
||||
cy.apiLogout();
|
||||
|
||||
// # Visit the team url
|
||||
cy.visit(`/${testTeam.name}`);
|
||||
|
||||
// # Attempt to create a new account
|
||||
cy.get('.login-body-card', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
||||
cy.findByText('Don\'t have an account?').should('be.visible').click();
|
||||
cy.get('#input_email').should('be.focused').and('be.visible').type(email);
|
||||
cy.get('#input_name').should('be.visible').type(username);
|
||||
cy.get('#input_password-input').should('be.visible').type(password);
|
||||
cy.get('#signup-body-card-form-check-terms-and-privacy').check();
|
||||
cy.findByText('Create account').click();
|
||||
|
||||
cy.findByText('You’re almost done!').should('be.visible');
|
||||
|
||||
// # Get invitation email and go to the provided link
|
||||
getEmail(username, email);
|
||||
|
||||
// * Ensure that the email was pre-filled and the password input box is focused
|
||||
cy.get('#input_loginId').should('be.visible').and('have.value', email);
|
||||
cy.get('#input_password-input').should('be.visible').and('be.focused').type(password);
|
||||
|
||||
// # Click on the login button
|
||||
cy.get('#saveSetting').click();
|
||||
|
||||
// # Close the onboarding tutorial
|
||||
cy.uiCloseOnboardingTaskList();
|
||||
|
||||
// * Check that the display name of the team the user was invited to is being correctly displayed
|
||||
cy.uiGetLHSHeader().findByText(testTeam.display_name);
|
||||
|
||||
// * Check that 'Town Square' is currently being selected
|
||||
cy.get('.SidebarChannel.active').within(() => {
|
||||
cy.get('#sidebarItem_town-square').should('exist');
|
||||
});
|
||||
|
||||
// * Check that the 'Town Square' message is visible
|
||||
cy.url().should('include', `/${testTeam.name}/channels/town-square`);
|
||||
});
|
||||
|
||||
function getEmail(username, email) {
|
||||
cy.getRecentEmail({username, email}).then((data) => {
|
||||
// * Verify that the email subject is correct
|
||||
expect(data.subject).to.equal(`[${siteName}] You joined ${siteUrl.split('/')[2]}`);
|
||||
|
||||
// * Verify that the email body is correct
|
||||
const expectedEmailBody = getWelcomeEmailTemplate(email, siteName, testTeam.name);
|
||||
verifyEmailBody(expectedEmailBody, data.body);
|
||||
|
||||
// # Visit permalink (e.g. click on email link)
|
||||
const permalink = data.body[4].match(reUrl)[0];
|
||||
cy.visit(permalink);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,121 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @onboarding
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {generateRandomUser} from '@/support/api/user';
|
||||
import {
|
||||
getWelcomeEmailTemplate,
|
||||
reUrl,
|
||||
verifyEmailBody,
|
||||
stubClipboard,
|
||||
} from '@/utils';
|
||||
|
||||
describe('Onboarding', () => {
|
||||
let testTeam;
|
||||
let siteName;
|
||||
|
||||
before(() => {
|
||||
// # Do email test if setup properly
|
||||
cy.shouldHaveEmailEnabled();
|
||||
|
||||
// # Update config to require email verification and onboarding flow
|
||||
cy.apiUpdateConfig({
|
||||
ServiceSettings: {EnableOnboardingFlow: true},
|
||||
EmailSettings: {
|
||||
RequireEmailVerification: true,
|
||||
},
|
||||
}).then(({config}) => {
|
||||
siteName = config.TeamSettings.SiteName;
|
||||
});
|
||||
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
testTeam = team;
|
||||
cy.visit(`/${team.name}`);
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T398 Use team invite link to sign up using email and password', () => {
|
||||
stubClipboard().as('clipboard');
|
||||
|
||||
// # Open the 'Invite People' full screen modal and get the invite url
|
||||
cy.uiOpenTeamMenu('Invite people');
|
||||
|
||||
// # Copy invite link to clipboard
|
||||
cy.findByTestId('InviteView__copyInviteLink').click();
|
||||
|
||||
cy.get('@clipboard').its('contents').then((val) => {
|
||||
const inviteLink = val;
|
||||
|
||||
// # Logout from admin account and visit the invite url
|
||||
cy.apiLogout();
|
||||
cy.visit(inviteLink);
|
||||
});
|
||||
|
||||
// * Verify it's on email signup page
|
||||
cy.findByText('Email address').should('be.visible');
|
||||
cy.findByPlaceholderText('Choose a Password').should('be.visible');
|
||||
|
||||
// # Type email, username and password
|
||||
const user = generateRandomUser();
|
||||
const {username, email, password} = user;
|
||||
cy.get('#input_email', {timeout: TIMEOUTS.HALF_MIN}).should('be.visible').type(email);
|
||||
cy.get('#input_name').should('be.visible').type(username);
|
||||
cy.get('#input_password-input').should('be.visible').type(password);
|
||||
|
||||
// # Check the terms and privacy checkbox
|
||||
cy.get('#signup-body-card-form-check-terms-and-privacy').check();
|
||||
|
||||
// # Attempt to create an account by clicking on the 'Create account' button
|
||||
cy.findByText('Create account').click();
|
||||
|
||||
cy.wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
// * Check that 'Mattermost: You are almost done' text should be visible when email hasn't been verified yet
|
||||
cy.findByText('You’re almost done!').should('be.visible');
|
||||
|
||||
cy.getRecentEmail(user).then((data) => {
|
||||
const {body: expectedBody} = data;
|
||||
const expectedEmailBody = getWelcomeEmailTemplate(user.email, siteName, testTeam.name);
|
||||
|
||||
// * Verify email body
|
||||
verifyEmailBody(expectedEmailBody, expectedBody);
|
||||
|
||||
const permalink = expectedBody[4].match(reUrl)[0];
|
||||
|
||||
// * Check that URL in address bar does not have an `undefined` team name appended
|
||||
cy.url().should('not.include', 'undefined');
|
||||
|
||||
// # Visit permalink (e.g. click on email link)
|
||||
cy.visit(permalink);
|
||||
|
||||
// # Check that 'Email Verified' text should be visible, email is pre-filled, and password field is focused, then login
|
||||
cy.get('#input_loginId').should('have.value', email);
|
||||
cy.get('#input_password-input').should('be.visible').type(password);
|
||||
cy.get('#saveSetting').click();
|
||||
cy.findByText('The email/username or password is invalid.').should('not.exist');
|
||||
});
|
||||
|
||||
// # Close the onboarding tutorial
|
||||
cy.uiCloseOnboardingTaskList();
|
||||
|
||||
// * Check that the display name of the team the user successfully joined is correct
|
||||
cy.uiGetLHSHeader().findByText(testTeam.display_name);
|
||||
|
||||
// * Check that 'Town Square' is currently being selected
|
||||
cy.get('.active').within(() => {
|
||||
cy.findByText('Town Square').should('exist');
|
||||
});
|
||||
|
||||
// * Check that the 'Town Square' message is visible
|
||||
cy.url().should('include', `/${testTeam.name}/channels/town-square`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user