Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
df6eb9b1
Commit
df6eb9b1
authored
Dec 16, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch {prop}Human to {prop}HumanReadable.
parent
5b90c4ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
app/assets/javascripts/issuable/time_tracking/components/comparison_pane.js.es6
.../issuable/time_tracking/components/comparison_pane.js.es6
+6
-6
spec/javascripts/issuable_time_tracker_spec.js.es6
spec/javascripts/issuable_time_tracker_spec.js.es6
+7
-7
No files found.
app/assets/javascripts/issuable/time_tracking/components/comparison_pane.js.es6
View file @
df6eb9b1
...
...
@@ -9,20 +9,20 @@
props: [
'timeSpent',
'timeEstimate',
'timeSpentHuman',
'timeEstimateHuman',
'timeSpentHuman
Readable
',
'timeEstimateHuman
Readable
',
],
computed: {
parsedRemaining() {
const diffSeconds = this.timeEstimate - this.timeSpent;
return PrettyTime.parseSeconds(diffSeconds);
},
timeRemainingHuman() {
timeRemainingHuman
Readable
() {
return PrettyTime.stringifyTime(this.parsedRemaining);
},
timeRemainingTooltip() {
const prefix = this.timeRemainingMinutes < 0 ? 'Over by' : 'Time remaining:';
return `${prefix} ${this.timeRemainingHuman}`;
return `${prefix} ${this.timeRemainingHuman
Readable
}`;
},
/* Diff values for comparison meter */
...
...
@@ -56,11 +56,11 @@
<div class='compare-display-container'>
<div class='compare-display pull-left'>
<span class='compare-label'>Spent</span>
<span class='compare-value spent'>{{ timeSpentHuman }}</span>
<span class='compare-value spent'>{{ timeSpentHuman
Readable
}}</span>
</div>
<div class='compare-display estimated pull-right'>
<span class='compare-label'>Est</span>
<span class='compare-value'>{{ timeEstimateHuman }}</span>
<span class='compare-value'>{{ timeEstimateHuman
Readable
}}</span>
</div>
</div>
</div>
...
...
spec/javascripts/issuable_time_tracker_spec.js.es6
View file @
df6eb9b1
...
...
@@ -13,8 +13,8 @@ function initTimeTrackingComponent(opts) {
this.initialData = {
time_estimate: opts.timeEstimate,
time_spent: opts.timeSpent,
human_time_estimate: opts.timeEstimateHuman,
human_time_spent: opts.timeSpentHuman,
human_time_estimate: opts.timeEstimateHuman
Readable
,
human_time_spent: opts.timeSpentHuman
Readable
,
docsUrl: '/help/workflow/time_tracking.md',
};
...
...
@@ -29,7 +29,7 @@ function initTimeTrackingComponent(opts) {
describe('Issuable Time Tracker', function() {
describe('Initialization', function() {
beforeEach(function() {
initTimeTrackingComponent.call(this, { timeEstimate: 100000, timeSpent: 5000, timeEstimateHuman
: '2h 46m', timeSpentHuman
: '1h 23m' });
initTimeTrackingComponent.call(this, { timeEstimate: 100000, timeSpent: 5000, timeEstimateHuman
Readable: '2h 46m', timeSpentHumanReadable
: '1h 23m' });
});
it('should return something defined', function() {
...
...
@@ -54,7 +54,7 @@ function initTimeTrackingComponent(opts) {
describe('Panes', function() {
describe('Comparison pane', function() {
beforeEach(function() {
initTimeTrackingComponent.call(this, { timeEstimate: 100000, timeSpent: 5000, timeEstimateHuman
: '', timeSpentHuman
: '' });
initTimeTrackingComponent.call(this, { timeEstimate: 100000, timeSpent: 5000, timeEstimateHuman
Readable: '', timeSpentHumanReadable
: '' });
});
it('should show the "Comparison" pane when timeEstimate and time_spent are truthy', function(done) {
...
...
@@ -96,7 +96,7 @@ function initTimeTrackingComponent(opts) {
describe("Estimate only pane", function() {
beforeEach(function() {
initTimeTrackingComponent.call(this, { timeEstimate: 100000, timeSpent: 0, timeEstimateHuman
: '2h 46m', timeSpentHuman
: '' });
initTimeTrackingComponent.call(this, { timeEstimate: 100000, timeSpent: 0, timeEstimateHuman
Readable: '2h 46m', timeSpentHumanReadable
: '' });
});
it('should display the human readable version of time estimated', function(done) {
...
...
@@ -113,7 +113,7 @@ function initTimeTrackingComponent(opts) {
describe('Spent only pane', function() {
beforeEach(function() {
initTimeTrackingComponent.call(this, { timeEstimate: 0, timeSpent: 5000, timeEstimateHuman
: '2h 46m', timeSpentHuman
: '1h 23m' });
initTimeTrackingComponent.call(this, { timeEstimate: 0, timeSpent: 5000, timeEstimateHuman
Readable: '2h 46m', timeSpentHumanReadable
: '1h 23m' });
});
it('should display the human readable version of time spent', function(done) {
...
...
@@ -129,7 +129,7 @@ function initTimeTrackingComponent(opts) {
describe('No time tracking pane', function() {
beforeEach(function() {
initTimeTrackingComponent.call(this, { timeEstimate: 0, timeSpent: 0, timeEstimateHuman
: 0, timeSpentHuman
: 0 });
initTimeTrackingComponent.call(this, { timeEstimate: 0, timeSpent: 0, timeEstimateHuman
Readable: 0, timeSpentHumanReadable
: 0 });
});
it('should only show the "No time tracking" pane when both timeEstimate and time_spent are falsey', function(done) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment