summaryrefslogtreecommitdiff
path: root/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js')
-rw-r--r--spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js b/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js
index ed185c11732..0266adeb6c7 100644
--- a/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js
+++ b/spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js
@@ -63,14 +63,14 @@ describe('AlertsSettingsWrapper', () => {
const findLoader = () => wrapper.findComponent(IntegrationsList).findComponent(GlLoadingIcon);
const findIntegrationsList = () => wrapper.findComponent(IntegrationsList);
- const findIntegrations = () => wrapper.find(IntegrationsList).findAll('table tbody tr');
+ const findIntegrations = () => wrapper.findComponent(IntegrationsList).findAll('table tbody tr');
const findAddIntegrationBtn = () => wrapper.findByTestId('add-integration-btn');
const findAlertsSettingsForm = () => wrapper.findComponent(AlertsSettingsForm);
const findAlert = () => wrapper.findComponent(GlAlert);
function destroyHttpIntegration(localWrapper) {
localWrapper
- .find(IntegrationsList)
+ .findComponent(IntegrationsList)
.vm.$emit('delete-integration', { id: integrationToDestroy.id });
}
@@ -148,7 +148,7 @@ describe('AlertsSettingsWrapper', () => {
expect(findIntegrations()).toHaveLength(mockIntegrations.length);
});
- it('renders `Add new integration` button when multiple integrations are supported ', () => {
+ it('renders `Add new integration` button when multiple integrations are supported', () => {
createComponent({
data: {
integrations: mockIntegrations,
@@ -189,7 +189,7 @@ describe('AlertsSettingsWrapper', () => {
data: { integrations: [] },
loading: true,
});
- expect(wrapper.find(IntegrationsList).exists()).toBe(true);
+ expect(wrapper.findComponent(IntegrationsList).exists()).toBe(true);
expect(findLoader().exists()).toBe(true);
});
});
@@ -321,7 +321,7 @@ describe('AlertsSettingsWrapper', () => {
});
});
- it('shows an error alert when integration creation fails ', async () => {
+ it('shows an error alert when integration creation fails', async () => {
jest.spyOn(wrapper.vm.$apollo, 'mutate').mockRejectedValue(ADD_INTEGRATION_ERROR);
findAlertsSettingsForm().vm.$emit('create-new-integration', {});
@@ -330,7 +330,7 @@ describe('AlertsSettingsWrapper', () => {
expect(createFlash).toHaveBeenCalledWith({ message: ADD_INTEGRATION_ERROR });
});
- it('shows an error alert when integration token reset fails ', async () => {
+ it('shows an error alert when integration token reset fails', async () => {
jest.spyOn(wrapper.vm.$apollo, 'mutate').mockRejectedValue(RESET_INTEGRATION_TOKEN_ERROR);
findAlertsSettingsForm().vm.$emit('reset-token', {});
@@ -339,7 +339,7 @@ describe('AlertsSettingsWrapper', () => {
expect(createFlash).toHaveBeenCalledWith({ message: RESET_INTEGRATION_TOKEN_ERROR });
});
- it('shows an error alert when integration update fails ', async () => {
+ it('shows an error alert when integration update fails', async () => {
jest.spyOn(wrapper.vm.$apollo, 'mutate').mockRejectedValue(errorMsg);
findAlertsSettingsForm().vm.$emit('update-integration', {});
@@ -357,14 +357,14 @@ describe('AlertsSettingsWrapper', () => {
mock.restore();
});
- it('shows an error alert when integration test payload is invalid ', async () => {
+ it('shows an error alert when integration test payload is invalid', async () => {
mock.onPost(/(.*)/).replyOnce(httpStatusCodes.UNPROCESSABLE_ENTITY);
await wrapper.vm.testAlertPayload({ endpoint: '', data: '', token: '' });
expect(createFlash).toHaveBeenCalledWith({ message: INTEGRATION_PAYLOAD_TEST_ERROR });
expect(createFlash).toHaveBeenCalledTimes(1);
});
- it('shows an error alert when integration is not activated ', async () => {
+ it('shows an error alert when integration is not activated', async () => {
mock.onPost(/(.*)/).replyOnce(httpStatusCodes.FORBIDDEN);
await wrapper.vm.testAlertPayload({ endpoint: '', data: '', token: '' });
expect(createFlash).toHaveBeenCalledWith({