MM-52428: Fix few E2E integration tests (#23311)

* Fixed E2E Integration tests

* Fixed step to close emoji picker
This commit is contained in:
Rohitesh Gupta 2023-05-05 17:15:54 +05:30 committed by GitHub
parent d030f681eb
commit 4db0512580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -11,6 +11,7 @@
// Group: @channels @bot_accounts // Group: @channels @bot_accounts
import {createBotPatch} from '../../../support/api/bots'; import {createBotPatch} from '../../../support/api/bots';
import * as TIMEOUTS from '../../../fixtures/timeouts';
describe('Bot tags', () => { describe('Bot tags', () => {
let me; let me;
@ -48,8 +49,8 @@ describe('Bot tags', () => {
await client.pinPost(postId); await client.pinPost(postId);
cy.visit(`/${team.name}/channels/${channel.name}`); cy.visit(`/${team.name}/channels/${channel.name}`);
cy.clickPostDotMenu(postId); cy.get(`#post_${postId}`).trigger('mouseover', {force: true});
cy.get(`#CENTER_flagIcon_${postId}`).click(); cy.wait(TIMEOUTS.HALF_SEC).get(`#CENTER_flagIcon_${postId}`).click();
}); });
}); });
}); });

View File

@ -69,6 +69,12 @@ describe('Incoming webhook', () => {
cy.getLastPost().within(() => { cy.getLastPost().within(() => {
cy.findByRole('link', {name: 'Testing Integration Attachments', hidden: true}); cy.findByRole('link', {name: 'Testing Integration Attachments', hidden: true});
});
// # Scroll to the bottom of the posts
cy.get('.post-list__dynamic').scrollTo('bottom');
cy.getLastPost().within(() => {
cy.get('.attachment__image').should('be.visible'); cy.get('.attachment__image').should('be.visible');
cy.get(':nth-child(2) > thead > tr > .attachment-field__caption').should('have.text', 'Area'); cy.get(':nth-child(2) > thead > tr > .attachment-field__caption').should('have.text', 'Area');
cy.get(':nth-child(3) > thead > tr > :nth-child(1)').should('have.text', 'Iteration'); cy.get(':nth-child(3) > thead > tr > :nth-child(1)').should('have.text', 'Iteration');

View File

@ -191,7 +191,9 @@ describe('Keyboard shortcut CTRL/CMD+Shift+\\ for adding reaction to last messag
Cypress._.times(3, () => { Cypress._.times(3, () => {
doReactToLastMessageShortcut('CENTER'); doReactToLastMessageShortcut('CENTER');
cy.get('#emojiPicker').should('exist'); cy.get('#emojiPicker').should('exist');
cy.get('body').click();
// # Click anywhere to close emoji picker
cy.get('#channelHeaderInfo').click();
cy.get('#emojiPicker').should('not.exist'); cy.get('#emojiPicker').should('not.exist');
}); });