Add failing test for #24614
This commit is contained in:
parent
2a085e5edd
commit
49e726ec33
2 changed files with 18 additions and 0 deletions
|
@ -26,7 +26,15 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('setup', function () {
|
describe('setup', function () {
|
||||||
|
const removeDate = new Date();
|
||||||
|
removeDate.setUTCFullYear(removeDate.getUTCFullYear() + 1);
|
||||||
|
// give the test three days to run
|
||||||
|
removeDate.setTime(removeDate.getTime() + (3 * 24 * 60 * 60 * 1000));
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
const removeDateElement = document.querySelector('.js-artifacts-remove');
|
||||||
|
removeDateElement.innerText = removeDate.toString();
|
||||||
|
|
||||||
this.build = new Build();
|
this.build = new Build();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -56,6 +64,11 @@
|
||||||
expect($('.build-job[data-stage="test"]').is(':visible')).toBe(false);
|
expect($('.build-job[data-stage="test"]').is(':visible')).toBe(false);
|
||||||
expect($('.build-job[data-stage="deploy"]').is(':visible')).toBe(false);
|
expect($('.build-job[data-stage="deploy"]').is(':visible')).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('displays the remove date correctly', function () {
|
||||||
|
const removeDateElement = document.querySelector('.js-artifacts-remove');
|
||||||
|
expect(removeDateElement.innerText.trim()).toBe('1 year');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('initial build trace', function () {
|
describe('initial build trace', function () {
|
||||||
|
|
|
@ -55,3 +55,8 @@
|
||||||
build_status: 'passed',
|
build_status: 'passed',
|
||||||
build_stage: 'test',
|
build_stage: 'test',
|
||||||
state1: 'buildstate' }}
|
state1: 'buildstate' }}
|
||||||
|
|
||||||
|
%p.build-detail-row
|
||||||
|
The artifacts will be removed in
|
||||||
|
%span.js-artifacts-remove
|
||||||
|
2016-12-19 09:02:12 UTC
|
||||||
|
|
Loading…
Reference in a new issue