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:
Diffstat (limited to 'spec/frontend/whats_new/components/feature_spec.js')
-rw-r--r--spec/frontend/whats_new/components/feature_spec.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/spec/frontend/whats_new/components/feature_spec.js b/spec/frontend/whats_new/components/feature_spec.js
index d69ac2803df..a51bb507285 100644
--- a/spec/frontend/whats_new/components/feature_spec.js
+++ b/spec/frontend/whats_new/components/feature_spec.js
@@ -1,5 +1,7 @@
import { shallowMount } from '@vue/test-utils';
+import timezoneMock from 'timezone-mock';
import Feature from '~/whats_new/components/feature.vue';
+import { DOCS_URL_IN_EE_DIR } from 'jh_else_ce/lib/utils/url_utility';
describe("What's new single feature", () => {
/** @type {import("@vue/test-utils").Wrapper} */
@@ -13,10 +15,9 @@ describe("What's new single feature", () => {
'self-managed': true,
'gitlab-com': true,
available_in: ['Ultimate'],
- documentation_link:
- 'https://docs.gitlab.com/ee/user/project/settings/#compliance-pipeline-configuration',
+ documentation_link: `${DOCS_URL_IN_EE_DIR}/user/project/settings/#compliance-pipeline-configuration`,
image_url: 'https://img.youtube.com/vi/upLJ_equomw/hqdefault.jpg',
- published_at: '2021-04-22T00:00:00.000Z',
+ published_at: '2021-04-22',
release: '13.11',
};
@@ -53,6 +54,22 @@ describe("What's new single feature", () => {
});
});
+ describe('when the user is in a time zone West of UTC', () => {
+ beforeEach(() => {
+ timezoneMock.register('US/Pacific');
+ });
+
+ afterEach(() => {
+ timezoneMock.unregister();
+ });
+
+ it('renders the date', () => {
+ createWrapper({ feature: exampleFeature });
+
+ expect(findReleaseDate().text()).toBe('April 22, 2021');
+ });
+ });
+
describe('when image_url is null', () => {
it('does not render image link', () => {
createWrapper({ feature: { ...exampleFeature, image_url: null } });