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,52 @@
|
||||
// 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 @account_setting
|
||||
|
||||
describe('Profile > Security > View Access History', () => {
|
||||
before(() => {
|
||||
// # Login as new user and visit off-topic
|
||||
cy.apiInitSetup({loginAfter: true}).then(({offTopicUrl}) => {
|
||||
cy.visit(offTopicUrl);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Go to Profile
|
||||
cy.uiOpenProfileModal('Security');
|
||||
|
||||
// * Check that the Security tab is loaded
|
||||
cy.get('#securityButton').should('be.visible');
|
||||
|
||||
// # Click the Security tab
|
||||
cy.get('#securityButton').click();
|
||||
});
|
||||
|
||||
it('MM-T2087 View Access History', () => {
|
||||
// # Click "View Access History" link
|
||||
cy.findByText('View Access History').should('be.visible').click();
|
||||
|
||||
// * Check that the Access History modal and table are visible
|
||||
cy.get('#accessHistoryModalLabel').should('be.visible');
|
||||
cy.get('.modal-body table').should('be.visible');
|
||||
|
||||
// * Check that the Access History table has the expected length
|
||||
cy.get('.modal-body table thead tr th span').should('be.visible').should('have.length', 4);
|
||||
|
||||
// * Check that the Access History table header has the expected columns
|
||||
cy.get('.modal-body table thead tr th span').eq(0).should('be.visible').should('contain', 'Timestamp');
|
||||
cy.get('.modal-body table thead tr th span').eq(1).should('be.visible').should('contain', 'Action');
|
||||
cy.get('.modal-body table thead tr th span').eq(2).should('be.visible').should('contain', 'IP Address');
|
||||
cy.get('.modal-body table thead tr th span').eq(3).should('be.visible').should('contain', 'Session ID');
|
||||
|
||||
// * Check that the Access History table body is visible and not empty
|
||||
cy.findByTestId('auditTableBody').should('be.visible').should('not.empty');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,73 @@
|
||||
// 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 @account_setting
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
|
||||
describe('Profile > Security > View and Log Out of Active Sessions', () => {
|
||||
const platforms = [
|
||||
'Linux',
|
||||
'Macintosh',
|
||||
'Windows',
|
||||
'Native Desktop App',
|
||||
'iPhone Native App',
|
||||
'Android Native App',
|
||||
'iPhone Native Classic App',
|
||||
'Android Native Classic App',
|
||||
];
|
||||
const platformRegex = new RegExp(`${platforms.join('|')}`, 'g');
|
||||
|
||||
let testUser: Cypress.UserProfile;
|
||||
|
||||
before(() => {
|
||||
// # Login as new user and visit off-topic
|
||||
cy.apiInitSetup({loginAfter: true}).then(({offTopicUrl, user}) => {
|
||||
testUser = user;
|
||||
cy.visit(offTopicUrl);
|
||||
|
||||
// # Go to Profile
|
||||
cy.uiOpenProfileModal('Security');
|
||||
|
||||
// * Check that the Security tab is loaded
|
||||
cy.get('#securityButton').should('be.visible');
|
||||
|
||||
// # Click the Security tab
|
||||
cy.get('#securityButton').click();
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T2088 View and Logout of Active Sessions (Se)', () => {
|
||||
// # Go to "View and Logout of Active Sessions"
|
||||
cy.findByText('View and Log Out of Active Sessions').should('be.visible').click();
|
||||
|
||||
// * Verify an appropriate platform is shown
|
||||
cy.get('.report__platform').contains(platformRegex);
|
||||
|
||||
// # Click "More info" for the login session
|
||||
cy.get('.report__info a').should('be.visible').and('have.text', 'More info').click();
|
||||
|
||||
// * Verify info is displayed
|
||||
cy.get('.report__info').should('contain', 'Last activity:').
|
||||
and('contain', 'First time active:').
|
||||
and('contain', 'OS:').
|
||||
and('contain', 'Browser:').
|
||||
and('contain', 'Session ID:');
|
||||
|
||||
// # Click "Log Out" to log out of the specified session
|
||||
cy.findByText('Log Out').click();
|
||||
|
||||
// * Verify we have been logged out, and we can log back in
|
||||
cy.uiLogin(testUser);
|
||||
|
||||
// * Verify we have successfully logged back in
|
||||
cy.get('#channel_view', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,162 @@
|
||||
// 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 @account_setting
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {newTestPassword} from '@/utils';
|
||||
|
||||
describe('Profile', () => {
|
||||
let siteName: string;
|
||||
let testUser: Cypress.UserProfile;
|
||||
let offTopic: string;
|
||||
|
||||
before(() => {
|
||||
cy.apiGetConfig().then(({config}) => {
|
||||
siteName = config.TeamSettings.SiteName;
|
||||
});
|
||||
|
||||
// # Login as new user and visit off-topic
|
||||
cy.apiInitSetup({loginAfter: true}).then(({user, offTopicUrl}) => {
|
||||
testUser = user;
|
||||
offTopic = offTopicUrl;
|
||||
|
||||
cy.visit(offTopicUrl);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Reload the page to help run each test cleanly
|
||||
cy.reload();
|
||||
|
||||
// # Go to Profile
|
||||
cy.uiOpenProfileModal('Security');
|
||||
|
||||
// * Check that the Security tab is loaded
|
||||
cy.get('#securityButton').should('be.visible');
|
||||
|
||||
// # Click the Security tab
|
||||
cy.get('#securityButton').click();
|
||||
|
||||
// # Click "Edit" to the right of "Password"
|
||||
cy.get('#passwordEdit').should('be.visible').click();
|
||||
});
|
||||
|
||||
it('MM-T2085 Password: Valid values in password change fields allow the form to save successfully', () => {
|
||||
const newPassword = newTestPassword();
|
||||
|
||||
// # Enter valid values in password change fields
|
||||
enterPasswords(testUser.password, newPassword, newPassword);
|
||||
|
||||
// * Check that there are no errors
|
||||
cy.get('#error_currentPassword').should('not.exist');
|
||||
cy.get('#error_newPassword').should('not.exist');
|
||||
cy.get('#error_confirmPassword').should('not.exist');
|
||||
|
||||
// # Save the settings
|
||||
cy.uiSave();
|
||||
|
||||
// * Check that there are no errors
|
||||
cy.get('#serverError').should('not.exist');
|
||||
});
|
||||
|
||||
it('MM-T2082 Password: New password confirmation mismatch produces error', () => {
|
||||
// # Enter mismatching passwords for new password and confirm fields
|
||||
enterPasswords(testUser.password, 'MismatchPass14!', 'MISmatchPass14!');
|
||||
|
||||
// * Verify for error message: "The new passwords you entered do not match."
|
||||
cy.get('#error_confirmPassword').should('be.visible').should('have.text', 'The new passwords you entered do not match.');
|
||||
});
|
||||
|
||||
it('MM-T2083 Password: Too few characters in new password produces error', () => {
|
||||
// # Enter a New password two letters long
|
||||
enterPasswords(testUser.password, 'pw', 'pw');
|
||||
|
||||
// * Verify for error message about password length
|
||||
cy.get('#error_newPassword').should('be.visible').should('have.text', 'Your password must be 14-72 characters long.');
|
||||
});
|
||||
|
||||
it('MM-T2084 Password: Cancel out of password changes causes no changes to be made', () => {
|
||||
const newPassword = 'Changed4Testing!';
|
||||
|
||||
// # Enter new valid passwords
|
||||
enterPasswords(testUser.password, newPassword, newPassword);
|
||||
|
||||
// # Click 'Cancel'
|
||||
cy.uiCancel();
|
||||
|
||||
// * Check that user is no longer in password edit page to verify the 'Cancel' action
|
||||
cy.get('#currentPassword').should('not.exist');
|
||||
cy.get('#passwordEdit').should('be.visible');
|
||||
|
||||
// # Logout
|
||||
cy.apiLogout();
|
||||
|
||||
// * Verify that user cannot login with the cancelled password
|
||||
cy.get('#input_loginId').type(testUser.username);
|
||||
cy.get('#input_password-input').type(newPassword);
|
||||
cy.get('#saveSetting').should('not.be.disabled').click();
|
||||
cy.findByText('The email/username or password is invalid.').should('be.visible');
|
||||
|
||||
// * Verify that user can successfully login with the old password
|
||||
cy.apiLogin(testUser);
|
||||
cy.visit(offTopic);
|
||||
cy.get('#channelHeaderTitle').should('contain', 'Off-Topic');
|
||||
});
|
||||
|
||||
it.skip('MM-T2086 Password: Timestamp and email', () => {
|
||||
const newPassword = newTestPassword();
|
||||
|
||||
// # Enter valid values in password change fields
|
||||
enterPasswords(testUser.password, newPassword, newPassword);
|
||||
|
||||
// # Get current date
|
||||
const now = moment(Date.now());
|
||||
|
||||
// # Save the settings
|
||||
cy.uiSave();
|
||||
|
||||
// # Create expected date and time formats
|
||||
const date = now.format('MMM DD, YYYY');
|
||||
const time = now.format('hh:mm A');
|
||||
|
||||
// # Create expected timestamp
|
||||
const timestamp = `Last updated ${date} at ${time}`;
|
||||
|
||||
// * Verify that password description field contains valid timestamp
|
||||
cy.get('#passwordDesc').should('have.text', timestamp);
|
||||
|
||||
// # Wait for the mail to be sent out.
|
||||
cy.wait(TIMEOUTS.FIVE_SEC);
|
||||
|
||||
cy.getRecentEmail(testUser).then(({subject}) => {
|
||||
// * Verify the subject
|
||||
expect(subject).to.equal(
|
||||
`[${siteName}] Your password has been updated`,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function enterPasswords(currentPassword: string, newPassword: string, confirmPassword: string) {
|
||||
// # Enter Current password
|
||||
cy.get('#currentPassword').should('be.visible').type(currentPassword);
|
||||
|
||||
// # Enter New password
|
||||
cy.get('#newPassword').should('be.visible').type(newPassword);
|
||||
|
||||
// # Retype New password incorrectly
|
||||
cy.get('#confirmPassword').should('be.visible').type(confirmPassword);
|
||||
|
||||
// # Click on the input and blur it
|
||||
cy.get('#currentPassword').should('be.visible').click().blur();
|
||||
}
|
||||
Reference in New Issue
Block a user