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 Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (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 Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
// 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.
|
||||
// ***************************************************************
|
||||
|
||||
// Group: @channels @subpath
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
|
||||
describe('Subpath Channel routing', () => {
|
||||
let testUser;
|
||||
let testTeam;
|
||||
let otherUser;
|
||||
|
||||
before(() => {
|
||||
cy.shouldRunWithSubpath();
|
||||
|
||||
cy.apiInitSetup().then(({team, user}) => {
|
||||
testTeam = team;
|
||||
testUser = user;
|
||||
|
||||
cy.apiCreateUser({prefix: 'otherUser'}).then(({user: newUser}) => {
|
||||
otherUser = newUser;
|
||||
cy.apiAddUserToTeam(team.id, newUser.id);
|
||||
});
|
||||
|
||||
// # Login as test user
|
||||
cy.apiLogin(testUser);
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T986 - Should go to town square channel view', () => {
|
||||
// # Go to town square channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
// * Check if the channel is loaded correctly
|
||||
cy.get('#channelHeaderTitle', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible').should('contain', 'Town Square');
|
||||
});
|
||||
|
||||
it('MM-T987 - Rejoin channel with permalink', () => {
|
||||
// # Visit Town Square channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
// # Create a new channel
|
||||
cy.apiCreateChannel(testTeam.id, 'subpath-channel', 'subpath-channel', 'O', 'subpath-ch').then(({channel}) => {
|
||||
// # Visit newly created channel
|
||||
cy.visit(`/${testTeam.name}/channels/${channel.name}`);
|
||||
|
||||
// # Post a message
|
||||
cy.postMessage('Subpath Test Message');
|
||||
|
||||
// # Create permalink to post
|
||||
cy.getLastPostId().then((id) => {
|
||||
const permalink = `${Cypress.config('baseUrl')}/${testTeam.name}/pl/${id}`;
|
||||
|
||||
// # Click on ... button of last post
|
||||
cy.clickPostDotMenu(id);
|
||||
|
||||
// # Click on "Copy Link"
|
||||
cy.uiClickCopyLink(permalink, id);
|
||||
|
||||
// # Leave the channel
|
||||
cy.uiLeaveChannel();
|
||||
|
||||
// # Visit the permalink
|
||||
cy.visit(permalink);
|
||||
|
||||
// * Check that we have rejoined the channel
|
||||
cy.get('#channelHeaderTitle', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible').should('contain', 'subpath-channel');
|
||||
|
||||
// * Check that the post message is the correct one
|
||||
cy.get(`#postMessageText_${id}`).should('contain', 'Subpath Test Message');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T988 - Should redirect to DM on login', () => {
|
||||
// # Create a direct channel between two users
|
||||
cy.apiCreateDirectChannel([testUser.id, otherUser.id]).then(() => {
|
||||
const dmChannelURL = `/${testTeam.name}/messages/@${otherUser.username}`;
|
||||
|
||||
// # Logout
|
||||
cy.apiLogout();
|
||||
|
||||
// # Visit the channel using the channel name
|
||||
cy.visit(dmChannelURL);
|
||||
|
||||
// # Login
|
||||
cy.findByPlaceholderText('Email or Username').clear().type(testUser.username);
|
||||
cy.findByPlaceholderText('Password').clear().type(testUser.password);
|
||||
cy.get('#saveSetting').should('not.be.disabled').click();
|
||||
|
||||
// * Check that we in are in DM channel
|
||||
cy.get('#channelHeaderTitle', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible').should('contain', otherUser.username);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,69 @@
|
||||
// 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.
|
||||
// ***************************************************************
|
||||
|
||||
// Group: @channels @subpath
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {generateRandomUser} from '@/support/api/user';
|
||||
import {getAdminAccount} from '@/support/env';
|
||||
|
||||
describe('Subpath Direct Message Search', () => {
|
||||
let testTeam;
|
||||
|
||||
before(() => {
|
||||
cy.shouldRunWithSubpath();
|
||||
|
||||
cy.apiInitSetup().then(({team, user}) => {
|
||||
testTeam = team;
|
||||
cy.apiLogin(user);
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T989 - User on other subpath, but not on this one, should not show in DM More list', () => {
|
||||
const admin = getAdminAccount();
|
||||
const secondServer = Cypress.expose('secondServerURL');
|
||||
|
||||
// # Log into admin account of other subpath server
|
||||
cy.request({
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
url: `${secondServer}/api/v4/users/login`,
|
||||
method: 'POST',
|
||||
body: {login_id: admin.username, password: admin.password},
|
||||
}).then((response) => {
|
||||
expect(response.status).to.equal(200);
|
||||
|
||||
// # Create a user on other subpath server
|
||||
const newUser = generateRandomUser('otherSubpathUser');
|
||||
const createUserOption = {
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
method: 'POST',
|
||||
url: `${secondServer}/api/v4/users`,
|
||||
body: newUser,
|
||||
};
|
||||
cy.request(createUserOption).then((userRes) => {
|
||||
expect(userRes.status).to.equal(201);
|
||||
const otherSubpathUser = userRes.body;
|
||||
|
||||
// # Go to town square channel of primary subpath server
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
// # Open DM modal
|
||||
cy.uiAddDirectMessage().click().wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
// # Search for username from other subpath server
|
||||
cy.get('#selectItems input').
|
||||
typeWithForce(otherSubpathUser.username).
|
||||
wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
// * Verify username does not show up in search result
|
||||
cy.get(`#displayedUserName${otherSubpathUser.username}`).should('not.exist');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,66 @@
|
||||
// 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.
|
||||
// ***************************************************************
|
||||
|
||||
// Group: @channels @subpath @not_cloud @signin_authentication
|
||||
|
||||
describe('Cookie with Subpath', () => {
|
||||
let testUser;
|
||||
let townsquareLink;
|
||||
|
||||
before(() => {
|
||||
cy.shouldRunWithSubpath();
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
|
||||
// # Create new team and user
|
||||
cy.apiInitSetup().then(({team, user}) => {
|
||||
testUser = user;
|
||||
|
||||
// Logout current session and try to visit town-square
|
||||
cy.apiLogout().then(() => {
|
||||
townsquareLink = `/${team.name}/channels/town-square`;
|
||||
cy.visit(townsquareLink);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should generate cookie with subpath', () => {
|
||||
cy.url().then((url) => {
|
||||
cy.location().its('origin').then((origin) => {
|
||||
let subpath = '';
|
||||
if (url !== origin) {
|
||||
subpath = url.replace(origin, '').replace(townsquareLink, '');
|
||||
}
|
||||
|
||||
// * Check login page is loaded
|
||||
cy.get('.login-body-card').should('be.visible');
|
||||
|
||||
// # Login as testUser
|
||||
cy.get('#input_loginId').should('be.visible').type(testUser.username);
|
||||
cy.get('#input_password-input').should('be.visible').type(testUser.password);
|
||||
cy.get('#saveSetting').should('be.visible').click();
|
||||
|
||||
// * Check login success
|
||||
cy.get('#channel_view').should('be.visible');
|
||||
|
||||
// * Check subpath included in url
|
||||
cy.url().should('include', subpath);
|
||||
cy.url().should('include', '/channels/town-square');
|
||||
|
||||
// * Check cookies have correct path parameter
|
||||
cy.getCookies().should('have.length', 5).each((cookie) => {
|
||||
if (subpath) {
|
||||
expect(cookie).to.have.property('path', subpath);
|
||||
} else {
|
||||
expect(cookie).to.have.property('path', '/');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user