Support E2E stress tests in run_tests.js (#29682)

* [skip ci] Adapt run_tests.js for stress testing
* [skip ci] Make channel_read_after_permalink_spec.js retry-able
* [skip ci] Fix ui_commands.ts fix
* [skip ci] Improve postMessageAndWait
* [skip ci] Fix unread_on_public_channel_spec.js
* [skip ci] Demote unread_on_public_channel_spec.js
* Update e2e-tests/README.md

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

* [skip ci] Fix mesage_reply_bot_post_spec.js

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Этот коммит содержится в:
Mario Vitale
2025-01-23 14:07:38 +01:00
коммит произвёл GitHub
родитель 7fb6901ad1
Коммит d3bd91843f
8 изменённых файлов: 51 добавлений и 15 удалений

Просмотреть файл

@@ -18,7 +18,7 @@ describe('Messaging', () => {
let testUser;
let otherUser;
before(() => {
beforeEach(() => {
cy.apiInitSetup().then(({team, channel, user}) => {
testTeam = team;
testChannel = channel;

Просмотреть файл

@@ -144,7 +144,7 @@ describe('Messaging', () => {
cy.uiCloseRHS();
// * Verify that the reply is in the channel view with matching text
cy.get(`#post_${replyId}`).within(() => {
cy.get(`#post_${replyId}`).scrollIntoView().within(() => {
cy.findByTestId('post-link').should('be.visible').and('have.text', 'Commented on ' + bot.username + 'BOT\'s message: Hello message from ' + bot.username);
cy.get(`#postMessageText_${replyId}`).should('be.visible').and('have.text', replyMessage);
});

Просмотреть файл

@@ -7,7 +7,6 @@
// - Use element ID when selecting an element. Create one if none.
// ***************************************************************
// Stage: @prod
// Group: @channels @notifications
import * as TIMEOUTS from '../../../fixtures/timeouts';
@@ -18,7 +17,7 @@ describe('Notifications', () => {
let testTeam;
beforeEach(() => {
cy.apiInitSetup().then(({team, user}) => {
cy.apiAdminLogin().apiInitSetup().then(({team, user}) => {
testUser = user;
testTeam = team;
@@ -48,11 +47,6 @@ describe('Notifications', () => {
// # Go to test channel
cy.visit(`/${team.name}/channels/${channel.name}`);
// # Scroll above the last few messages
cy.get('div.post-list__dynamic', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible').
scrollTo(0, '70%', {duration: TIMEOUTS.ONE_SEC}).
wait(TIMEOUTS.ONE_SEC);
// # scroll to the last channel
cy.get('#sidebar-left li').last().scrollIntoView();
});
@@ -66,7 +60,11 @@ describe('Notifications', () => {
// # Get last post and reply a message
cy.getLastPostId().then((postId) => {
// # Open the RHS reply form, then scroll above the last few messages
cy.clickPostCommentIcon(postId);
cy.get('div.post-list__dynamic', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible').
scrollTo(0, '70%', {duration: TIMEOUTS.ONE_SEC}).
wait(TIMEOUTS.ONE_SEC);
const replyMessage = 'A reply to an older post';
cy.postMessageReplyInRHS(replyMessage);
});