diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /spec/frontend/logs | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/frontend/logs')
-rw-r--r-- | spec/frontend/logs/components/environment_logs_spec.js | 16 | ||||
-rw-r--r-- | spec/frontend/logs/components/log_simple_filters_spec.js | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/spec/frontend/logs/components/environment_logs_spec.js b/spec/frontend/logs/components/environment_logs_spec.js index 559ce4f9414..e32deaea993 100644 --- a/spec/frontend/logs/components/environment_logs_spec.js +++ b/spec/frontend/logs/components/environment_logs_spec.js @@ -1,4 +1,4 @@ -import { GlSprintf, GlIcon, GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; +import { GlSprintf, GlDropdown, GlDropdownItem } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import EnvironmentLogs from '~/logs/components/environment_logs.vue'; @@ -121,7 +121,7 @@ describe('EnvironmentLogs', () => { it('displays UI elements', () => { initWrapper(); - expect(findEnvironmentsDropdown().is(GlDeprecatedDropdown)).toBe(true); + expect(findEnvironmentsDropdown().is(GlDropdown)).toBe(true); expect(findSimpleFilters().exists()).toBe(true); expect(findLogControlButtons().exists()).toBe(true); @@ -164,7 +164,7 @@ describe('EnvironmentLogs', () => { it('displays a disabled environments dropdown', () => { expect(findEnvironmentsDropdown().attributes('disabled')).toBe('true'); - expect(findEnvironmentsDropdown().findAll(GlDeprecatedDropdownItem).length).toBe(0); + expect(findEnvironmentsDropdown().findAll(GlDropdownItem).length).toBe(0); }); it('does not update buttons state', () => { @@ -241,7 +241,7 @@ describe('EnvironmentLogs', () => { }); it('populates environments dropdown', () => { - const items = findEnvironmentsDropdown().findAll(GlDeprecatedDropdownItem); + const items = findEnvironmentsDropdown().findAll(GlDropdownItem); expect(findEnvironmentsDropdown().props('text')).toBe(mockEnvName); expect(items.length).toBe(mockEnvironments.length); mockEnvironments.forEach((env, i) => { @@ -251,14 +251,14 @@ describe('EnvironmentLogs', () => { }); it('dropdown has one environment selected', () => { - const items = findEnvironmentsDropdown().findAll(GlDeprecatedDropdownItem); + const items = findEnvironmentsDropdown().findAll(GlDropdownItem); mockEnvironments.forEach((env, i) => { const item = items.at(i); if (item.text() !== mockEnvName) { - expect(item.find(GlIcon).classes('invisible')).toBe(true); + expect(item.find(GlDropdownItem).attributes('ischecked')).toBeFalsy(); } else { - expect(item.find(GlIcon).classes('invisible')).toBe(false); + expect(item.find(GlDropdownItem).attributes('ischecked')).toBeTruthy(); } }); }); @@ -286,7 +286,7 @@ describe('EnvironmentLogs', () => { describe('when user clicks', () => { it('environment name, trace is refreshed', () => { - const items = findEnvironmentsDropdown().findAll(GlDeprecatedDropdownItem); + const items = findEnvironmentsDropdown().findAll(GlDropdownItem); const index = 1; // any env expect(dispatch).not.toHaveBeenCalledWith(`${module}/showEnvironment`, expect.anything()); diff --git a/spec/frontend/logs/components/log_simple_filters_spec.js b/spec/frontend/logs/components/log_simple_filters_spec.js index 1e30a7df559..b819f0d25a8 100644 --- a/spec/frontend/logs/components/log_simple_filters_spec.js +++ b/spec/frontend/logs/components/log_simple_filters_spec.js @@ -1,4 +1,4 @@ -import { GlIcon, GlDeprecatedDropdownItem } from '@gitlab/ui'; +import { GlDropdownItem } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { createStore } from '~/logs/stores'; import { mockPods, mockPodName } from '../mock_data'; @@ -17,7 +17,7 @@ describe('LogSimpleFilters', () => { const findPodsNoPodsText = () => wrapper.find({ ref: 'noPodsMsg' }); const findPodsDropdownItems = () => findPodsDropdown() - .findAll(GlDeprecatedDropdownItem) + .findAll(GlDropdownItem) .filter(item => !('disabled' in item.attributes())); const mockPodsLoading = () => { @@ -114,9 +114,9 @@ describe('LogSimpleFilters', () => { mockPods.forEach((pod, i) => { const item = items.at(i); if (item.text() !== mockPodName) { - expect(item.find(GlIcon).classes('invisible')).toBe(true); + expect(item.find(GlDropdownItem).attributes('ischecked')).toBeFalsy(); } else { - expect(item.find(GlIcon).classes('invisible')).toBe(false); + expect(item.find(GlDropdownItem).attributes('ischecked')).toBeTruthy(); } }); }); |