returns__('GroupRoadmap|Sorry, no epics matched your search');
}
returns__('GroupRoadmap|The roadmap shows the progress of your epics along a timeline');
},
subMessage(){
if(this.hasFiltersApplied){
returnsprintf(s__('GroupRoadmap|To widen your search, change or remove filters. Only epics in the past 3 months and the next 3 months are shown – from %{startDate} to %{endDate}.'),{
startDate:this.timeframeRange.startDate,
endDate:this.timeframeRange.endDate,
});
}
returnsprintf(s__('GroupRoadmap|To view the roadmap, add a planned start or finish date to one of your epics in this group or its subgroups. Only epics in the past 3 months and the next 3 months are shown – from %{startDate} to %{endDate}.'),{
it('returns default empty state sub-message',()=>{
expect(vm.subMessage).toBe('To view the roadmap, add a planned start or finish date to one of your epics in this group or its subgroups. Only epics in the past 3 months and the next 3 months are shown – from Nov 1, 2017 to Apr 30, 2018.');
it('returns default empty state sub-message when `hasFiltersApplied` props is false',done=>{
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To view the roadmap, add a planned start or finish date to one of your epics in this group or its subgroups. In the quarters view, only epics in the past quarter, current quarter, and next 4 quarters are shown – from Oct 1, 2017 to Mar 31, 2019.');
})
.then(done)
.catch(done.fail);
});
it('returns empty state sub-message when `hasFiltersApplied` prop is true',done=>{
vm.hasFiltersApplied=true;
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To widen your search, change or remove filters. In the quarters view, only epics in the past quarter, current quarter, and next 4 quarters are shown – from Oct 1, 2017 to Mar 31, 2019.');
})
.then(done)
.catch(done.fail);
});
});
it('returns empty state sub-message when `hasFiltersApplied` prop is true',done=>{
vm.hasFiltersApplied=true;
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To widen your search, change or remove filters. Only epics in the past 3 months and the next 3 months are shown – from Nov 1, 2017 to Apr 30, 2018.');
})
.then(done)
.catch(done.fail);
describe('with presetType `MONTHS`',()=>{
beforeEach(()=>{
vm.presetType=PRESET_TYPES.MONTHS;
});
it('returns default empty state sub-message when `hasFiltersApplied` props is false',done=>{
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To view the roadmap, add a planned start or finish date to one of your epics in this group or its subgroups. In the months view, only epics in the past month, current month, and next 5 months are shown – from Dec 1, 2017 to Jun 30, 2018.');
})
.then(done)
.catch(done.fail);
});
it('returns empty state sub-message when `hasFiltersApplied` prop is true',done=>{
vm.hasFiltersApplied=true;
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To widen your search, change or remove filters. In the months view, only epics in the past month, current month, and next 5 months are shown – from Dec 1, 2017 to Jun 30, 2018.');
it('returns default empty state sub-message when `hasFiltersApplied` props is false',done=>{
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To view the roadmap, add a planned start or finish date to one of your epics in this group or its subgroups. In the weeks view, only epics in the past week, current week, and next 4 weeks are shown – from Dec 24, 2017 to Feb 9, 2018.');
})
.then(done)
.catch(done.fail);
});
it('returns empty state sub-message when `hasFiltersApplied` prop is true',done=>{
vm.hasFiltersApplied=true;
Vue.nextTick()
.then(()=>{
expect(vm.subMessage).toBe('To widen your search, change or remove filters. In the weeks view, only epics in the past week, current week, and next 4 weeks are shown – from Dec 24, 2017 to Feb 15, 2018.');
})
.then(done)
.catch(done.fail);
});
});
});
describe('timeframeRange',()=>{
it('returns correct timeframe startDate and endDate in words',()=>{