Files
0418acb65a MM-66362 feat: run e2e full tests after successful smoke tests both in cypress and playwright (#34868)
* feat: run e2e full tests after successful smoke tests both in cypress and playwright

* fix lint check on jsdoc req in playwright test

* update smoke test filter

* update test filter for cypress tests

* update docker services, fix branch convention and rearrange secrets

* update e2e-test workflow docs

* reorganized

* fix lint

* fix playwright template

* fix results assertion

* add retest, e2e-test-verified, gh comments of failed tests, path filters, run e2e-tests check first and demote unstable tests

* run using master image for e2e-only changes, add ts/js actions for cypress and playwright calculations, add verified by label

---------

Co-authored-by: Mattermost Build <[email protected]>
2026-02-02 08:37:55 +08:00

57 lines
2.0 KiB
JavaScript

// 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 @toast
describe('Toast', () => {
let testTeam;
before(() => {
cy.apiInitSetup({loginAfer: true}).then(({team, offTopicUrl}) => {
testTeam = team;
cy.visit(offTopicUrl);
});
});
it('MM-T1792 Permalink post', () => {
// # Add a message to the channel
cy.postMessage('test');
cy.getLastPostId().then((id) => {
const permalink = `${Cypress.config('baseUrl')}/${testTeam.name}/pl/${id}`;
// # Check if ... button is visible in last post right side
cy.get(`#CENTER_button_${id}`).should('not.be.visible');
// # Click on ... button of last post
cy.clickPostDotMenu(id);
// * Click on "Copy Link" and verify the permalink in clipboard is same as we formed
cy.uiClickCopyLink(permalink, id);
// # post the permalink in the channel
cy.postMessage(permalink);
// # Click on permalink
cy.getLastPost().get('.post-message__text a').last().scrollIntoView().click();
// * check the URL should be changed to permalink post
cy.url().should('include', `/${testTeam.name}/channels/off-topic/${id}`);
// * Post is highlighted then fades out
cy.get(`#post_${id}`).should('have.class', 'post--highlight');
cy.get(`#post_${id}`).should('not.have.class', 'post--highlight');
// * URL changes to channel url
cy.url().should('include', `/${testTeam.name}/channels/off-topic`).and('not.include', id);
});
});
});