From 071a6ff8bb8ae67e7d1040300dc32cd997ee3198 Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Wed, 19 Jul 2023 11:36:34 +0100 Subject: [PATCH] chore(explorer): clear out slack webhook (#4320) --- .../src/integration/transactions.cy.js | 4 +-- libs/cypress/src/index.ts | 2 -- libs/cypress/src/lib/commands/slack.ts | 28 ------------------- 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 libs/cypress/src/lib/commands/slack.ts diff --git a/apps/explorer-e2e/src/integration/transactions.cy.js b/apps/explorer-e2e/src/integration/transactions.cy.js index 45ad30d18..fc846b1dd 100644 --- a/apps/explorer-e2e/src/integration/transactions.cy.js +++ b/apps/explorer-e2e/src/integration/transactions.cy.js @@ -40,7 +40,7 @@ context.skip('Transactions page', function () { .first() .click({ force: true }); } else { - cy.slack('Unable to find any transactions on page'); + cy.log('Unable to find any transactions on page'); cy.screenshot(); } }); @@ -78,7 +78,7 @@ context.skip('Transactions page', function () { } }); } else { - cy.slack('Unable to find any transactions on page'); + cy.log('Unable to find any transactions on page'); cy.screenshot(); } }); diff --git a/libs/cypress/src/index.ts b/libs/cypress/src/index.ts index 20bd283c1..cf17ca41a 100644 --- a/libs/cypress/src/index.ts +++ b/libs/cypress/src/index.ts @@ -3,7 +3,6 @@ import { addMockGQLCommand } from './lib/mock-gql'; import { addMockSubscription } from './lib/mock-ws'; import { addMockWalletCommand } from './lib/mock-rest'; import { addMockWeb3ProviderCommand } from './lib/commands/mock-web3-provider'; -import { addSlackCommand } from './lib/commands/slack'; import { addHighlightLog } from './lib/commands/highlight-log'; import { addGetAssets } from './lib/commands/get-assets'; import { addVegaWalletReceiveFaucetedAsset } from './lib/commands/vega-wallet-receive-fauceted-asset'; @@ -26,7 +25,6 @@ import { addVegaWalletTopUpRewardsPool } from './lib/commands/vega-wallet-top-up import { addAssociateTokensToVegaWallet } from './lib/commands/associate-tokens-to-vega-wallet'; addGetTestIdcommand(); -addSlackCommand(); addMockGQLCommand(); addMockSubscription(); addMockWalletCommand(); diff --git a/libs/cypress/src/lib/commands/slack.ts b/libs/cypress/src/lib/commands/slack.ts deleted file mode 100644 index cdfee5d6f..000000000 --- a/libs/cypress/src/lib/commands/slack.ts +++ /dev/null @@ -1,28 +0,0 @@ -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - slack(message: string): void; - } - } -} - -export function addSlackCommand() { - // @ts-ignore - ignoring Cypress type error which gets resolved when Cypress uses the command - Cypress.Commands.add('slack', (message) => { - const text = `${message}: ${JSON.stringify(Cypress.spec)}`; - - cy.log('NOTIFYING SLACK'); - - const webhook = Cypress.env('SLACK_WEBHOOK'); - - if (!webhook) { - return; - } - - cy.request('POST', webhook, { - text, - }); - }); -}