Commit 6e7113de authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Set a fake date for the details_header_spec

parent c4a8b5a4
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlSprintf } from '@gitlab/ui'; import { GlSprintf } from '@gitlab/ui';
import { useFakeDate } from 'helpers/fake_date';
import TitleArea from '~/vue_shared/components/registry/title_area.vue'; import TitleArea from '~/vue_shared/components/registry/title_area.vue';
import component from '~/registry/explorer/components/details_page/details_header.vue'; import component from '~/registry/explorer/components/details_page/details_header.vue';
import { DETAILS_PAGE_TITLE } from '~/registry/explorer/constants'; import { DETAILS_PAGE_TITLE } from '~/registry/explorer/constants';
...@@ -15,6 +16,9 @@ describe('Details Header', () => { ...@@ -15,6 +16,9 @@ describe('Details Header', () => {
}, },
}; };
// set the date to Dec 4, 2020
useFakeDate(2020, 11, 4);
const findLastUpdatedAndVisibility = () => wrapper.find('[data-testid="updated-and-visibility"]'); const findLastUpdatedAndVisibility = () => wrapper.find('[data-testid="updated-and-visibility"]');
const waitForMetadataItems = async () => { const waitForMetadataItems = async () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment