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>2020-11-19 11:27:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 11:27:35 +0300
commit7e9c479f7de77702622631cff2628a9c8dcbc627 (patch)
treec8f718a08e110ad7e1894510980d2155a6549197 /spec/frontend/access_tokens/components/expires_at_field_spec.js
parente852b0ae16db4052c1c567d9efa4facc81146e88 (diff)
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/frontend/access_tokens/components/expires_at_field_spec.js')
-rw-r--r--spec/frontend/access_tokens/components/expires_at_field_spec.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/frontend/access_tokens/components/expires_at_field_spec.js b/spec/frontend/access_tokens/components/expires_at_field_spec.js
new file mode 100644
index 00000000000..cd235d0afa5
--- /dev/null
+++ b/spec/frontend/access_tokens/components/expires_at_field_spec.js
@@ -0,0 +1,34 @@
+import { shallowMount } from '@vue/test-utils';
+import { useFakeDate } from 'helpers/fake_date';
+import ExpiresAtField from '~/access_tokens/components/expires_at_field.vue';
+
+describe('~/access_tokens/components/expires_at_field', () => {
+ useFakeDate();
+
+ let wrapper;
+
+ const createComponent = () => {
+ wrapper = shallowMount(ExpiresAtField, {
+ propsData: {
+ inputAttrs: {
+ id: 'personal_access_token_expires_at',
+ name: 'personal_access_token[expires_at]',
+ placeholder: 'YYYY-MM-DD',
+ },
+ },
+ });
+ };
+
+ beforeEach(() => {
+ createComponent();
+ });
+
+ afterEach(() => {
+ wrapper.destroy();
+ wrapper = null;
+ });
+
+ it('should render datepicker with input info', () => {
+ expect(wrapper.element).toMatchSnapshot();
+ });
+});