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 удалений

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

@@ -98,7 +98,7 @@ function postMessageAndWait(textboxSelector: string, message: string, isComment
waitForCommentDraft(message);
}
cy.get(textboxSelector).should('have.value', message).type('{enter}').wait(TIMEOUTS.HALF_SEC);
cy.get(textboxSelector).should('have.value', message).focus().type('{enter}').wait(TIMEOUTS.HALF_SEC);
cy.get(textboxSelector).invoke('val').then((value: string) => {
if (value.length > 0 && value === message) {
@@ -325,12 +325,12 @@ function clickPostHeaderItem(postId: string, location: string, item: string) {
}
if (postId) {
cy.get(`#${idPrefix}_${postId}`).trigger('mouseover', {force: true});
cy.wait(TIMEOUTS.HALF_SEC).get(`#${location}_${item}_${postId}`).click({force: true});
cy.get(`#${idPrefix}_${postId}`).trigger('mouseover', {force: true}).
get(`#${location}_${item}_${postId}`).scrollIntoView().trigger('mouseover', {force: true}).click({force: true});
} else {
cy.getLastPostId().then((lastPostId) => {
cy.get(`#${idPrefix}_${lastPostId}`).trigger('mouseover', {force: true});
cy.wait(TIMEOUTS.HALF_SEC).get(`#${location}_${item}_${lastPostId}`).click({force: true});
cy.get(`#${idPrefix}_${lastPostId}`).trigger('mouseover', {force: true}).
get(`#${location}_${item}_${lastPostId}`).scrollIntoView().trigger('mouseover', {force: true}).click({force: true});
});
}
}