From 3a6264ad195bc80f1d2be9074aced549bbae3fe7 Mon Sep 17 00:00:00 2001 From: Angel Mendez Date: Mon, 25 Dec 2023 03:45:00 -0600 Subject: [PATCH] [MM-47306] Migrate /enterprise/integrations e2e tests to TypeScript (#25720) --- .../channel_sidebar/category_muting_spec.ts | 3 +- ...bhook_spec.js => incoming_webhook_spec.ts} | 29 ++++++++++++------- 2 files changed, 20 insertions(+), 12 deletions(-) rename e2e-tests/cypress/tests/integration/channels/enterprise/integrations/{incoming_webhook_spec.js => incoming_webhook_spec.ts} (69%) diff --git a/e2e-tests/cypress/tests/integration/channels/channel_sidebar/category_muting_spec.ts b/e2e-tests/cypress/tests/integration/channels/channel_sidebar/category_muting_spec.ts index a4b3d60a96..7c2fc9c65a 100644 --- a/e2e-tests/cypress/tests/integration/channels/channel_sidebar/category_muting_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/channel_sidebar/category_muting_spec.ts @@ -98,15 +98,14 @@ describe('Category muting', () => { create_at: 0, creator_id: '', delete_at: 0, - extra_update_at: 0, group_constrained: false, header: '', id: '', last_post_at: 0, purpose: '', scheme_id: '', - total_msg_count: 0, update_at: 0, + last_root_post_at: 0, })).then((channel: Cypress.Channel) => { // # And then invite us to it cy.wrap(client.addToChannel(testUser.id, channel.id)); diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/integrations/incoming_webhook_spec.js b/e2e-tests/cypress/tests/integration/channels/enterprise/integrations/incoming_webhook_spec.ts similarity index 69% rename from e2e-tests/cypress/tests/integration/channels/enterprise/integrations/incoming_webhook_spec.js rename to e2e-tests/cypress/tests/integration/channels/enterprise/integrations/incoming_webhook_spec.ts index 53e846991c..d287dc178f 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/integrations/incoming_webhook_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/integrations/incoming_webhook_spec.ts @@ -11,9 +11,7 @@ // Group: @channels @enterprise @elasticsearch @incoming_webhook @not_cloud import * as TIMEOUTS from '../../../../fixtures/timeouts'; -import { - enableElasticSearch, -} from '../elasticsearch_autocomplete/helpers'; +import {enableElasticSearch} from '../../autocomplete/helpers'; describe('Incoming webhook', () => { let testTeam; @@ -49,19 +47,30 @@ describe('Incoming webhook', () => { const payload = { title: 'Title', - attachments: [{ - type: 'slack_attachment', - color: '#7CD197', - 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.`, - }], + attachments: [ + { + type: 'slack_attachment', + color: '#7CD197', + 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.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('.attachment__body').should('contain', id);