[MM-47306] Migrate /enterprise/integrations e2e tests to TypeScript (#25720)

Этот коммит содержится в:
Angel Mendez
2023-12-25 03:45:00 -06:00
коммит произвёл GitHub
родитель bc1a53472a
Коммит 3a6264ad19
2 изменённых файлов: 20 добавлений и 12 удалений

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

@@ -98,15 +98,14 @@ describe('Category muting', () => {
create_at: 0, create_at: 0,
creator_id: '', creator_id: '',
delete_at: 0, delete_at: 0,
extra_update_at: 0,
group_constrained: false, group_constrained: false,
header: '', header: '',
id: '', id: '',
last_post_at: 0, last_post_at: 0,
purpose: '', purpose: '',
scheme_id: '', scheme_id: '',
total_msg_count: 0,
update_at: 0, update_at: 0,
last_root_post_at: 0,
})).then((channel: Cypress.Channel) => { })).then((channel: Cypress.Channel) => {
// # And then invite us to it // # And then invite us to it
cy.wrap(client.addToChannel(testUser.id, channel.id)); cy.wrap(client.addToChannel(testUser.id, channel.id));

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

@@ -11,9 +11,7 @@
// Group: @channels @enterprise @elasticsearch @incoming_webhook @not_cloud // Group: @channels @enterprise @elasticsearch @incoming_webhook @not_cloud
import * as TIMEOUTS from '../../../../fixtures/timeouts'; import * as TIMEOUTS from '../../../../fixtures/timeouts';
import { import {enableElasticSearch} from '../../autocomplete/helpers';
enableElasticSearch,
} from '../elasticsearch_autocomplete/helpers';
describe('Incoming webhook', () => { describe('Incoming webhook', () => {
let testTeam; let testTeam;
@@ -49,19 +47,30 @@ describe('Incoming webhook', () => {
const payload = { const payload = {
title: 'Title', title: 'Title',
attachments: [{ attachments: [
type: 'slack_attachment', {
color: '#7CD197', type: 'slack_attachment',
fields: [{short: false, title: 'Area', value: 'This is a test post from the Integrations tab of release testing that will be deleted by someone who has the admin level permissions to do so.'}], color: '#7CD197',
text: `${id} This is the text of the attachment. This text should be searchable. Findme.`, fields: [
}], {
short: false,
title: 'Area',
value: 'This is a test post from the Integrations tab of release testing that will be deleted by someone who has the admin level permissions to do so.',
},
],
text: `${id} This is the text of the attachment. This text should be searchable. Findme.`,
},
],
}; };
cy.visit(`/${testTeam.name}/channels/${testChannel.name}`); cy.visit(`/${testTeam.name}/channels/${testChannel.name}`);
cy.postIncomingWebhook({url: incomingWebhook.url, data: payload}); cy.postIncomingWebhook({url: incomingWebhook.url, data: payload});
cy.get('#searchBox').wait(TIMEOUTS.HALF_SEC).typeWithForce('findme').typeWithForce('{enter}'); cy.get('#searchBox').
wait(TIMEOUTS.HALF_SEC).
typeWithForce('findme').
typeWithForce('{enter}');
cy.get('#search-items-container').within(() => { cy.get('#search-items-container').within(() => {
cy.get('.attachment__body').should('contain', id); cy.get('.attachment__body').should('contain', id);