Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-13 15:12:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-13 15:12:50 +0300
commit37a739daec0d7021b2af6ad03c60d37ac3461d88 (patch)
treee9621e1d5b8c59a2f2768deb3f153e1e5fb01437 /spec/frontend/alerts_settings/components
parentbfd344aeac677543c2a2f623fd103d4cf0f4e247 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/alerts_settings/components')
-rw-r--r--spec/frontend/alerts_settings/components/alert_mapping_builder_spec.js12
-rw-r--r--spec/frontend/alerts_settings/components/alerts_form_spec.js2
-rw-r--r--spec/frontend/alerts_settings/components/alerts_integrations_list_spec.js8
-rw-r--r--spec/frontend/alerts_settings/components/alerts_settings_form_spec.js6
-rw-r--r--spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js6
5 files changed, 17 insertions, 17 deletions
diff --git a/spec/frontend/alerts_settings/components/alert_mapping_builder_spec.js b/spec/frontend/alerts_settings/components/alert_mapping_builder_spec.js
index dba9c8be669..1e125bdfd3a 100644
--- a/spec/frontend/alerts_settings/components/alert_mapping_builder_spec.js
+++ b/spec/frontend/alerts_settings/components/alert_mapping_builder_spec.js
@@ -47,7 +47,7 @@ describe('AlertMappingBuilder', () => {
expect(findColumnInRow(0, 2).text()).toContain(i18n.columns.payloadKeyTitle);
expect(findColumnInRow(0, 3).text()).toContain(i18n.columns.fallbackKeyTitle);
- const fallbackColumnIcon = findColumnInRow(0, 3).find(GlIcon);
+ const fallbackColumnIcon = findColumnInRow(0, 3).findComponent(GlIcon);
expect(fallbackColumnIcon.exists()).toBe(true);
expect(fallbackColumnIcon.attributes('name')).toBe('question');
expect(fallbackColumnIcon.attributes('title')).toBe(i18n.fallbackTooltip);
@@ -55,7 +55,7 @@ describe('AlertMappingBuilder', () => {
it('renders disabled form input for each mapped field', () => {
alertFields.forEach((field, index) => {
- const input = findColumnInRow(index + 1, 0).find(GlFormInput);
+ const input = findColumnInRow(index + 1, 0).findComponent(GlFormInput);
const types = field.types.map((t) => capitalizeFirstCharacter(t.toLowerCase())).join(' or ');
expect(input.attributes('value')).toBe(`${field.label} (${types})`);
expect(input.attributes('disabled')).toBe('');
@@ -71,7 +71,7 @@ describe('AlertMappingBuilder', () => {
it('renders mapping dropdown for each field', () => {
alertFields.forEach(({ types }, index) => {
- const dropdown = findColumnInRow(index + 1, 2).find(GlDropdown);
+ const dropdown = findColumnInRow(index + 1, 2).findComponent(GlDropdown);
const { searchBox, dropdownItems, mappingOptions } = getDropdownContent(dropdown, types);
expect(dropdown.exists()).toBe(true);
@@ -82,7 +82,7 @@ describe('AlertMappingBuilder', () => {
it('renders fallback dropdown only for the fields that have fallback', () => {
alertFields.forEach(({ types, numberOfFallbacks }, index) => {
- const dropdown = findColumnInRow(index + 1, 3).find(GlDropdown);
+ const dropdown = findColumnInRow(index + 1, 3).findComponent(GlDropdown);
expect(dropdown.exists()).toBe(Boolean(numberOfFallbacks));
if (numberOfFallbacks) {
@@ -96,8 +96,8 @@ describe('AlertMappingBuilder', () => {
it('emits event with selected mapping', () => {
const mappingToSave = { fieldName: 'TITLE', mapping: 'PARSED_TITLE' };
jest.spyOn(transformationUtils, 'transformForSave').mockReturnValue(mappingToSave);
- const dropdown = findColumnInRow(1, 2).find(GlDropdown);
- const option = dropdown.find(GlDropdownItem);
+ const dropdown = findColumnInRow(1, 2).findComponent(GlDropdown);
+ const option = dropdown.findComponent(GlDropdownItem);
option.vm.$emit('click');
expect(wrapper.emitted('onMappingUpdate')[0]).toEqual([mappingToSave]);
});
diff --git a/spec/frontend/alerts_settings/components/alerts_form_spec.js b/spec/frontend/alerts_settings/components/alerts_form_spec.js
index a045954dfb8..33098282bf8 100644
--- a/spec/frontend/alerts_settings/components/alerts_form_spec.js
+++ b/spec/frontend/alerts_settings/components/alerts_form_spec.js
@@ -5,7 +5,7 @@ describe('Alert integration settings form', () => {
let wrapper;
const service = { updateSettings: jest.fn().mockResolvedValue() };
- const findForm = () => wrapper.find({ ref: 'settingsForm' });
+ const findForm = () => wrapper.findComponent({ ref: 'settingsForm' });
beforeEach(() => {
wrapper = shallowMount(AlertsSettingsForm, {
diff --git a/spec/frontend/alerts_settings/components/alerts_integrations_list_spec.js b/spec/frontend/alerts_settings/components/alerts_integrations_list_spec.js
index 3ffbb7ab60a..6658db92524 100644
--- a/spec/frontend/alerts_settings/components/alerts_integrations_list_spec.js
+++ b/spec/frontend/alerts_settings/components/alerts_integrations_list_spec.js
@@ -53,8 +53,8 @@ describe('AlertIntegrationsList', () => {
mountComponent();
});
- const findTableComponent = () => wrapper.find(GlTable);
- const findTableComponentRows = () => wrapper.find(GlTable).findAll('table tbody tr');
+ const findTableComponent = () => wrapper.findComponent(GlTable);
+ const findTableComponentRows = () => wrapper.findComponent(GlTable).findAll('table tbody tr');
const finsStatusCell = () => wrapper.findAll('[data-testid="integration-activated-status"]');
it('renders a table', () => {
@@ -78,7 +78,7 @@ describe('AlertIntegrationsList', () => {
describe('integration status', () => {
it('enabled', () => {
const cell = finsStatusCell().at(0);
- const activatedIcon = cell.find(GlIcon);
+ const activatedIcon = cell.findComponent(GlIcon);
expect(cell.text()).toBe(i18n.status.enabled.name);
expect(activatedIcon.attributes('name')).toBe('check');
expect(activatedIcon.attributes('title')).toBe(i18n.status.enabled.tooltip);
@@ -86,7 +86,7 @@ describe('AlertIntegrationsList', () => {
it('disabled', () => {
const cell = finsStatusCell().at(1);
- const notActivatedIcon = cell.find(GlIcon);
+ const notActivatedIcon = cell.findComponent(GlIcon);
expect(cell.text()).toBe(i18n.status.disabled.name);
expect(notActivatedIcon.attributes('name')).toBe('warning-solid');
expect(notActivatedIcon.attributes('title')).toBe(i18n.status.disabled.tooltip);
diff --git a/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js b/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js
index 7d9d2875cf8..fb9e97e7505 100644
--- a/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js
+++ b/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js
@@ -325,9 +325,9 @@ describe('AlertsSettingsForm', () => {
});
await nextTick();
- expect(findSamplePayloadSection().find(GlFormTextarea).attributes('disabled')).toBe(
- disabled,
- );
+ expect(
+ findSamplePayloadSection().findComponent(GlFormTextarea).attributes('disabled'),
+ ).toBe(disabled);
});
});
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..aa9bee59e8c 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 });
}
@@ -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);
});
});