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>2023-01-11 12:10:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-11 12:10:26 +0300
commite6b6fb602889e43e7a8dde760e01d0a3b2147c54 (patch)
tree70fabcff57d6d41c78f5a4a1a3579a209351c6be /spec/frontend/vue_shared/components/timezone_dropdown
parent93d24281164be3ccf038a69f0daebc9049848240 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components/timezone_dropdown')
-rw-r--r--spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js b/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js
index 112ed566009..c8351ed61d7 100644
--- a/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js
+++ b/spec/frontend/vue_shared/components/timezone_dropdown/timezone_dropdown_spec.js
@@ -1,4 +1,5 @@
import { GlDropdownItem, GlDropdown } from '@gitlab/ui';
+import { nextTick } from 'vue';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import TimezoneDropdown from '~/vue_shared/components/timezone_dropdown/timezone_dropdown.vue';
import { formatTimezone } from '~/lib/utils/datetime_utility';
@@ -107,5 +108,12 @@ describe('Deploy freeze timezone dropdown', () => {
it('renders selected time zone as dropdown label', () => {
expect(wrapper.findComponent(GlDropdown).props().text).toBe('[UTC+2] Berlin');
});
+
+ it('adds a checkmark to the selected option', async () => {
+ const selectedTZOption = findAllDropdownItems().at(0);
+ selectedTZOption.vm.$emit('click');
+ await nextTick();
+ expect(selectedTZOption.attributes('ischecked')).toBe('true');
+ });
});
});