Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-06-11 13:40:01 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-06-25 04:31:23 +0300
commit275a17589c2d468d8671a9f754a50b212273d509 (patch)
treefb491229331aa09e74fd14385b0682e693774395 /spec/javascripts/sidebar
parent4e283ee706b11fd3b918230976addc9a70603ce6 (diff)
Rename to time_tracking_limit_to_hours
Changes migration and all other places the attribute is used
Diffstat (limited to 'spec/javascripts/sidebar')
-rw-r--r--spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js b/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js
index 4c3dd713589..2e1863cff86 100644
--- a/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js
+++ b/spec/javascripts/sidebar/components/time_tracking/time_tracker_spec.js
@@ -13,6 +13,7 @@ describe('Issuable Time Tracker', () => {
timeSpent,
timeEstimateHumanReadable,
timeSpentHumanReadable,
+ limitToHours,
}) => {
setFixtures(`
<div>
@@ -25,6 +26,7 @@ describe('Issuable Time Tracker', () => {
timeSpent,
humanTimeEstimate: timeEstimateHumanReadable,
humanTimeSpent: timeSpentHumanReadable,
+ limitToHours: Boolean(limitToHours),
rootPath: '/',
};
@@ -128,6 +130,29 @@ describe('Issuable Time Tracker', () => {
});
});
+ describe('Comparison pane when limitToHours is true', () => {
+ beforeEach(() => {
+ initTimeTrackingComponent({
+ timeEstimate: 100000, // 1d 3h
+ timeSpent: 5000, // 1h 23m
+ timeEstimateHumanReadable: '',
+ timeSpentHumanReadable: '',
+ limitToHours: true,
+ });
+ });
+
+ it('should show the correct tooltip text', done => {
+ Vue.nextTick(() => {
+ expect(vm.showComparisonState).toBe(true);
+ const $title = vm.$el.querySelector('.time-tracking-content .compare-meter').dataset
+ .originalTitle;
+
+ expect($title).toBe('Time remaining: 26h 23m');
+ done();
+ });
+ });
+ });
+
describe('Estimate only pane', () => {
beforeEach(() => {
initTimeTrackingComponent({