From 38c79b697f45a949701b9961e87b7c9b8de75abf Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 4 Nov 2019 12:06:19 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../__snapshots__/release_block_spec.js.snap | 332 --------------------- .../releases/list/components/release_block_spec.js | 16 - 2 files changed, 348 deletions(-) delete mode 100644 spec/frontend/releases/list/components/__snapshots__/release_block_spec.js.snap (limited to 'spec/frontend/releases') diff --git a/spec/frontend/releases/list/components/__snapshots__/release_block_spec.js.snap b/spec/frontend/releases/list/components/__snapshots__/release_block_spec.js.snap deleted file mode 100644 index 8f2c0427c83..00000000000 --- a/spec/frontend/releases/list/components/__snapshots__/release_block_spec.js.snap +++ /dev/null @@ -1,332 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Release block with default props matches the snapshot 1`] = ` -
-
-
-

- - New release - - -

- - - - -
- -
-
- - - - c22b0728 - -
- -
- - - - v0.3 - -
- -
- - - - Milestones - -
- - - - 13.6 - - - - • - - - - 13.5 - - - - - -
- - • - - - - released 1 month ago - - -
- - -
- -
- - - Assets - - - 5 - - - - - - -
- -
-
-

- A super nice release! -

-
-
-
-
-`; diff --git a/spec/frontend/releases/list/components/release_block_spec.js b/spec/frontend/releases/list/components/release_block_spec.js index 93f202b2977..6601c4265f6 100644 --- a/spec/frontend/releases/list/components/release_block_spec.js +++ b/spec/frontend/releases/list/components/release_block_spec.js @@ -39,34 +39,18 @@ describe('Release block', () => { const milestoneListLabel = () => wrapper.find('.js-milestone-list-label'); const editButton = () => wrapper.find('.js-edit-button'); - const RealDate = Date; beforeEach(() => { - // timeago.js calls Date(), so let's mock that case to avoid time-dependent test failures. - const constantDate = new Date('2019-10-25T00:12:00'); - - /* eslint no-global-assign:off */ - global.Date = jest.fn((...props) => - props.length ? new RealDate(...props) : new RealDate(constantDate), - ); - - Object.assign(Date, RealDate); - releaseClone = JSON.parse(JSON.stringify(release)); }); afterEach(() => { wrapper.destroy(); - global.Date = RealDate; }); describe('with default props', () => { beforeEach(() => factory(release)); - it('matches the snapshot', () => { - expect(wrapper.element).toMatchSnapshot(); - }); - it("renders the block with an id equal to the release's tag name", () => { expect(wrapper.attributes().id).toBe('v0.3'); }); -- cgit v1.2.3