returnsprintf(s__('Epics|To schedule your epic\'s %{epicDateType} date based on milestones, assign a milestone with a %{epicDateType} date to any issue in the epic.'),{
returnsprintf(
s__(
"Epics|To schedule your epic's %{epicDateType} date based on milestones, assign a milestone with a %{epicDateType} date to any issue in the epic.",
),
{
epicDateType:this.getDateTypeString(dateType),
});
},
);
},
toggleSidebar(){
this.collapsed=!this.collapsed;
...
...
@@ -293,9 +318,11 @@ export default {
})
.catch(()=>{
this[savingBoolean]=false;
flash(sprintf(s__('Epics|An error occurred while saving %{epicDateType} date'),{
flash(
sprintf(s__('Epics|An error occurred while saving %{epicDateType} date'),{
expect(vm.getDateFromMilestonesTooltip('start')).toBe('To schedule your epic\'s start date based on milestones, assign a milestone with a start date to any issue in the epic.');
});
it('returns tooltip string with milestone dates',()=>{
expect(vmDatesFromMilestones.getDateFromMilestonesTooltip('start')).toBe('Milestone for Start Date<br/><span class="text-tertiary">Jan 1, 2010 – Dec 31, 2019</span>');
vmDatesFromMilestones.$destroy();
});
it('returns tooltip string with milestone dates when dates are from same year',()=>{
conststartDate='2018-01-01';
constdueDate='2018-03-31';
constvmDatesFromMilestones=mountComponent(
EpicSidebar,
Object.assign({},defaultPropsData,{
startDateSourcingMilestoneDates:{
startDate,
dueDate,
},
dueDateSourcingMilestoneDates:{
startDate,
dueDate,
},
startDateFromMilestones:startDate,
dueDateFromMilestones:dueDate,
})
);
expect(vmDatesFromMilestones.getDateFromMilestonesTooltip('start')).toBe('Milestone for Start Date<br/><span class="text-tertiary">Jan 1 – Mar 31, 2018</span>');