fix failed e2e tests (#23741)

This commit is contained in:
Saturnino Abril 2023-06-15 21:58:00 +08:00 committed by GitHub
parent d7a3d14c5e
commit 75a0e61de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 10 deletions

View File

@ -1,3 +1,3 @@
### In-line Images
![test image](https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/image-small-height.png)
![test image](https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/image-small-height.png)

View File

@ -30,7 +30,7 @@ describe('Image Link Preview', () => {
});
it('MM-T329 Image link preview', () => {
const link = 'https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/image-small-height.png';
const link = 'https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/image-small-height.png';
const baseUrl = Cypress.config('baseUrl');
const encodedIconUrl = encodeURIComponent(link);

View File

@ -38,7 +38,7 @@ describe('Image Link Preview', () => {
});
it('MM-T331 Image link preview - Collapse and expand', () => {
const link = 'https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/small-image.png';
const link = 'https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/small-image.png';
// # Post a link to an externally hosted image
cy.postMessage(link);
@ -178,13 +178,13 @@ describe('Image Link Preview', () => {
{
filename: 'image-1000x40.jpg',
originalSize: {width: 1000, height: 40},
thumbnailSize: {width: 948, height: 38},
thumbnailSize: {width: 899, height: 36},
containerSize: {height: 46},
},
{
filename: 'image-1600x40.jpg',
originalSize: {width: 1600, height: 40},
thumbnailSize: {width: 948, height: 24},
thumbnailSize: {width: 899, height: 23},
previewSize: {width: 1204, height: 30},
containerSize: {height: 46},
},

View File

@ -188,7 +188,7 @@ describe('Integrations', () => {
cy.getLastPost().should('contain', 'Image links now expand by default').and('contain', 'System');
// # Post message
cy.postMessage('https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/png-image-file.png');
cy.postMessage('https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/png-image-file.png');
cy.getLastPostId().as('postID');
cy.get('@postID').then((postID) => {
@ -208,7 +208,7 @@ describe('Integrations', () => {
cy.visit(offTopicUrl1);
// # Post message
cy.postMessage('https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/png-image-file.png');
cy.postMessage('https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/png-image-file.png');
cy.getLastPostId().as('postID');
// # Open RHS
@ -244,6 +244,7 @@ describe('Integrations', () => {
it('MM-T705 Ephemeral message', () => {
cy.apiAdminLogin();
cy.visit(offTopicUrl1);
cy.postMessage('hello');
// # Navigate to slash commands and create the slash command
cy.uiOpenProductMenu('Integrations');

View File

@ -122,7 +122,7 @@ describe('Markdown', () => {
it('channel header is markdown image', () => {
// # Update channel header
cy.updateChannelHeader('![MM Logo](https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/small-image.png)').wait(TIMEOUTS.TWO_SEC);
cy.updateChannelHeader('![MM Logo](https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/small-image.png)').wait(TIMEOUTS.TWO_SEC);
// * Verify image in header
cy.get('#channelHeaderDescription').find('span.markdown__paragraph-inline').as('imageDiv');
@ -145,7 +145,7 @@ describe('Markdown', () => {
it('channel header is markdown image that is also a link', () => {
// # Update channel header
cy.updateChannelHeader('[![Build Status](https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/small-image.png)](https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/small-image.png)').wait(TIMEOUTS.TWO_SEC);
cy.updateChannelHeader('[![Build Status](https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/small-image.png)](https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/small-image.png)').wait(TIMEOUTS.TWO_SEC);
// * Verify image in header
cy.get('#channelHeaderDescription').find('span.markdown__paragraph-inline').as('imageDiv');

View File

@ -21,7 +21,7 @@ describe('Messaging', () => {
it('MM-T187 Inline markdown images open preview window', () => {
// # Post the image link to the channel
cy.postMessage('Hello ![test image](https://raw.githubusercontent.com/furqanmlk/furqanmlk.github.io/main/images/image-small-height.png)');
cy.postMessage('Hello ![test image](https://raw.githubusercontent.com/mattermost/mattermost/master/e2e-tests/cypress/tests/fixtures/image-small-height.png)');
// * Confirm the image container is visible
cy.uiWaitUntilMessagePostedIncludes('Hello');