chore(explorer): clear out slack webhook (#4320)

This commit is contained in:
Matthew Russell 2023-07-19 11:36:34 +01:00 committed by GitHub
parent 5b8df4c414
commit 071a6ff8bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 32 deletions

View File

@ -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();
}
});

View File

@ -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();

View File

@ -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<Subject> {
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,
});
});
}