Commit 960c351e authored by Tim Zallmann's avatar Tim Zallmann

Changes all spec results from GMT+0000 to UTC

Updated all formats in specs
parent b2189d3d
......@@ -101,7 +101,7 @@ describe('RequirementItem', () => {
expect(createdAtEl.text()).toContain('created');
expect(createdAtEl.text()).toContain('ago');
expect(createdAtEl.attributes('title')).toBe('Mar 19, 2020 8:09am GMT+0000');
expect(createdAtEl.attributes('title')).toBe('Mar 19, 2020 8:09am UTC');
});
it('renders element containing requirement author information', () => {
......@@ -116,7 +116,7 @@ describe('RequirementItem', () => {
expect(updatedAtEl.text()).toContain('updated');
expect(updatedAtEl.text()).toContain('ago');
expect(updatedAtEl.attributes('title')).toBe('Mar 20, 2020 8:09am GMT+0000');
expect(updatedAtEl.attributes('title')).toBe('Mar 20, 2020 8:09am UTC');
});
it('renders requirement-status-badge component', () => {
......
......@@ -105,7 +105,7 @@ describe('RequirementStatusBadge', () => {
expect(tooltipEl.exists()).toBe(true);
expect(tooltipEl.find('b').text()).toBe(badgeProps.tooltipTitle);
expect(tooltipEl.find('div').text()).toBe('Jun 4, 2020 10:55am GMT+0000');
expect(tooltipEl.find('div').text()).toBe('Jun 4, 2020 10:55am UTC');
});
});
});
......
......@@ -303,7 +303,7 @@ describe('Vulnerability list component', () => {
const { id } = newVulnerabilities[1];
const cell = findDataCell(`detected-${id}`);
expect(cell.text()).toEqual(`2020-07-22`);
expect(cell.attributes('title')).toEqual('Jul 22, 2020 7:31pm GMT+0000');
expect(cell.attributes('title')).toEqual('Jul 22, 2020 7:31pm UTC');
});
it('should display the vulnerability locations for code', () => {
......
......@@ -14,7 +14,7 @@ describe('spec/helpers/fake_date', () => {
it('should use default args when called as a function', () => {
expect(FakeDate()).toMatchInlineSnapshot(
`"Mon Jul 06 2020 00:00:00 GMT+0000 (Greenwich Mean Time)"`,
`"Mon Jul 06 2020 00:00:00 UTC (Greenwich Mean Time)"`,
);
});
......
......@@ -336,7 +336,7 @@ describe('IssuableItem', () => {
const createdAtEl = wrapper.find('[data-testid="issuable-created-at"]');
expect(createdAtEl.exists()).toBe(true);
expect(createdAtEl.attributes('title')).toBe('Jun 29, 2020 1:52pm GMT+0000');
expect(createdAtEl.attributes('title')).toBe('Jun 29, 2020 1:52pm UTC');
expect(createdAtEl.text()).toBe(wrapper.vm.createdAt);
});
......@@ -450,7 +450,7 @@ describe('IssuableItem', () => {
const updatedAtEl = wrapper.find('[data-testid="issuable-updated-at"]');
expect(updatedAtEl.exists()).toBe(true);
expect(updatedAtEl.find('span').attributes('title')).toBe('Sep 10, 2020 11:41am GMT+0000');
expect(updatedAtEl.find('span').attributes('title')).toBe('Sep 10, 2020 11:41am UTC');
expect(updatedAtEl.text()).toBe(wrapper.vm.updatedAt);
});
......
......@@ -64,7 +64,7 @@ describe('JiraImportProgress', () => {
});
it('shows the time of import', () => {
expect(getParagraphText()).toContain('Time of import: Apr 8, 2020 12:17pm GMT+0000');
expect(getParagraphText()).toContain('Time of import: Apr 8, 2020 12:17pm UTC');
});
it('shows the project key of the import', () => {
......
......@@ -101,13 +101,13 @@ describe('Date time utils', () => {
it('should format date properly', () => {
const formattedDate = datetimeUtility.formatDate(new Date('07/23/2016'));
expect(formattedDate).toBe('Jul 23, 2016 12:00am GMT+0000');
expect(formattedDate).toBe('Jul 23, 2016 12:00am UTC');
});
it('should format ISO date properly', () => {
const formattedDate = datetimeUtility.formatDate('2016-07-23T00:00:00.559Z');
expect(formattedDate).toBe('Jul 23, 2016 12:00am GMT+0000');
expect(formattedDate).toBe('Jul 23, 2016 12:00am UTC');
});
it('should throw an error if date is invalid', () => {
......@@ -878,7 +878,7 @@ describe('localTimeAgo', () => {
it.each`
timeagoArg | title
${false} | ${'some time'}
${true} | ${'Feb 18, 2020 10:22pm GMT+0000'}
${true} | ${'Feb 18, 2020 10:22pm UTC'}
`('converts $seconds seconds to $approximation', ({ timeagoArg, title }) => {
const element = document.querySelector('time');
datetimeUtility.localTimeAgo($(element), timeagoArg);
......
......@@ -54,7 +54,7 @@ describe('ExpiresAt', () => {
const tooltipDirective = getTooltipDirective(expiredText);
expect(tooltipDirective).not.toBeUndefined();
expect(expiredText.attributes('title')).toBe('Mar 15, 2019 12:00am GMT+0000');
expect(expiredText.attributes('title')).toBe('Mar 15, 2019 12:00am UTC');
});
});
......
......@@ -208,7 +208,7 @@ describe('Time series component', () => {
});
it('formats tooltip title', () => {
expect(wrapper.vm.tooltip.title).toBe('16 Jul 2019, 10:14AM (GMT+0000)');
expect(wrapper.vm.tooltip.title).toBe('16 Jul 2019, 10:14AM (UTC)');
});
it('formats tooltip content', () => {
......@@ -282,7 +282,7 @@ describe('Time series component', () => {
});
it('formats tooltip title', () => {
expect(wrapper.vm.tooltip.title).toBe('16 Jul 2019, 10:14AM (GMT+0000)');
expect(wrapper.vm.tooltip.title).toBe('16 Jul 2019, 10:14AM (UTC)');
});
it('formats tooltip sha', () => {
......@@ -301,7 +301,7 @@ describe('Time series component', () => {
});
it('formats tooltip title', () => {
expect(wrapper.vm.tooltip.title).toBe('16 Jul 2019, 10:14AM (GMT+0000)');
expect(wrapper.vm.tooltip.title).toBe('16 Jul 2019, 10:14AM (UTC)');
});
it('formats tooltip sha', () => {
......@@ -334,7 +334,7 @@ describe('Time series component', () => {
it('formats tooltip title and sets tooltip content', () => {
const formattedTooltipData = wrapper.vm.formatAnnotationsTooltipText(mockMarkPoint);
expect(formattedTooltipData.title).toBe('19 Feb 2020, 10:01AM (GMT+0000)');
expect(formattedTooltipData.title).toBe('19 Feb 2020, 10:01AM (UTC)');
expect(formattedTooltipData.content).toBe(annotationsMetadata.tooltipData.content);
});
});
......
......@@ -314,7 +314,7 @@ describe('tags list row', () => {
describe.each`
name | finderFunction | text | icon | clipboard
${'published date detail'} | ${findPublishedDateDetail} | ${'Published to the gitlab-org/gitlab-test/rails-12009 image repository at 01:29 GMT+0000 on 2020-11-03'} | ${'clock'} | ${false}
${'published date detail'} | ${findPublishedDateDetail} | ${'Published to the gitlab-org/gitlab-test/rails-12009 image repository at 01:29 UTC on 2020-11-03'} | ${'clock'} | ${false}
${'manifest detail'} | ${findManifestDetail} | ${'Manifest digest: sha256:2cf3d2fdac1b04a14301d47d51cb88dcd26714c74f91440eeee99ce399089062'} | ${'log'} | ${true}
${'configuration detail'} | ${findConfigurationDetail} | ${'Configuration digest: sha256:c2613843ab33aabf847965442b13a8b55a56ae28837ce182627c0716eb08c02b'} | ${'cloud-gear'} | ${true}
`('$name details row', ({ finderFunction, text, icon, clipboard }) => {
......
......@@ -35,7 +35,7 @@ describe('User Lists Table', () => {
it('should set the title for a tooltip on the created stamp', () => {
expect(wrapper.find('[data-testid="ffUserListTimestamp"]').attributes('title')).toBe(
'Feb 4, 2020 8:13am GMT+0000',
'Feb 4, 2020 8:13am UTC',
);
});
......
......@@ -94,7 +94,7 @@ describe('MRWidgetPipeline', () => {
it('should render pipeline finished timestamp', () => {
expect(findPipelineFinishedAt().attributes()).toMatchObject({
title: 'Apr 7, 2017 2:00pm GMT+0000',
title: 'Apr 7, 2017 2:00pm UTC',
datetime: mockData.pipeline.details.finished_at,
});
});
......
......@@ -18,8 +18,8 @@ describe('MRWidgetClosed', () => {
avatarUrl:
'http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
},
mergedAt: 'Jan 24, 2018 1:02pm GMT+0000',
closedAt: 'Jan 24, 2018 1:02pm GMT+0000',
mergedAt: 'Jan 24, 2018 1:02pm UTC',
closedAt: 'Jan 24, 2018 1:02pm UTC',
readableMergedAt: '',
readableClosedAt: 'less than a minute ago',
},
......
......@@ -37,10 +37,10 @@ describe('MRWidgetMerged', () => {
avatarUrl:
'http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
},
mergedAt: 'Jan 24, 2018 1:02pm GMT+0000',
mergedAt: 'Jan 24, 2018 1:02pm UTC',
readableMergedAt: '',
closedBy: {},
closedAt: 'Jan 24, 2018 1:02pm GMT+0000',
closedAt: 'Jan 24, 2018 1:02pm UTC',
readableClosedAt: '',
},
updatedAt: 'mergedUpdatedAt',
......@@ -236,6 +236,6 @@ describe('MRWidgetMerged', () => {
});
it('should use mergedEvent mergedAt as tooltip title', () => {
expect(vm.$el.querySelector('time').getAttribute('title')).toBe('Jan 24, 2018 1:02pm GMT+0000');
expect(vm.$el.querySelector('time').getAttribute('title')).toBe('Jan 24, 2018 1:02pm UTC');
});
});
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