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
63a4daa5
Commit
63a4daa5
authored
Aug 10, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing teaspoon tests
parent
3f769e78
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
14 deletions
+15
-14
app/assets/javascripts/boards/models/issue.js.es6
app/assets/javascripts/boards/models/issue.js.es6
+4
-4
app/assets/javascripts/boards/models/label.js.es6
app/assets/javascripts/boards/models/label.js.es6
+1
-1
app/assets/javascripts/boards/models/list.js.es6
app/assets/javascripts/boards/models/list.js.es6
+3
-3
app/assets/javascripts/boards/models/user.js.es6
app/assets/javascripts/boards/models/user.js.es6
+1
-1
spec/javascripts/boards/boards_store_spec.js.es6
spec/javascripts/boards/boards_store_spec.js.es6
+5
-4
spec/javascripts/boards/issue_spec.js.es6
spec/javascripts/boards/issue_spec.js.es6
+1
-1
No files found.
app/assets/javascripts/boards/models/issue.js.es6
View file @
63a4daa5
class Issue {
class
List
Issue {
constructor (obj) {
this.id = obj.iid;
this.title = obj.title;
this.confidential = obj.confidential;
if (obj.assignee) {
this.assignee = new User(obj.assignee);
this.assignee = new
List
User(obj.assignee);
}
this.labels = [];
_.each(obj.labels, (label) => {
this.labels.push(new Label(label));
this.labels.push(new L
istL
abel(label));
});
this.priority = _.reduce(this.labels, (max, label) => {
...
...
@@ -24,7 +24,7 @@ class Issue {
const hasLabel = this.findLabel(label);
if (!hasLabel) {
this.labels.push(new Label(label));
this.labels.push(new L
istL
abel(label));
}
}
}
...
...
app/assets/javascripts/boards/models/label.js.es6
View file @
63a4daa5
class Label {
class L
istL
abel {
constructor (obj) {
this.id = obj.id;
this.title = obj.title;
...
...
app/assets/javascripts/boards/models/list.js.es6
View file @
63a4daa5
...
...
@@ -10,7 +10,7 @@ class List {
this.issues = [];
if (obj.label) {
this.label = new Label(obj.label);
this.label = new L
istL
abel(obj.label);
}
if (this.type !== 'blank' && this.id) {
...
...
@@ -85,8 +85,8 @@ class List {
}
createIssues (data) {
_.each(data, (issue) => {
this.issues.push(new
Issue(issue
));
_.each(data, (issue
Obj
) => {
this.issues.push(new
ListIssue(issueObj
));
});
}
...
...
app/assets/javascripts/boards/models/user.js.es6
View file @
63a4daa5
class User {
class
List
User {
constructor (user) {
this.id = user.id;
this.name = user.name;
...
...
spec/javascripts/boards/boards_store_spec.js.es6
View file @
63a4daa5
...
...
@@ -54,6 +54,7 @@
setTimeout(() => {
expect(list.issues.length).toBe(1);
expect(list.issues[0].id).toBe(1);
done();
}, 0);
});
...
...
@@ -135,10 +136,10 @@
expect(BoardsStore.state.lists.length).toBe(2);
setTimeout(() => {
const list = BoardsStore.findList('id', 1);
const listTwo = BoardsStore.findList('id', 2);
const list = BoardsStore.findList('id', 1),
listTwo = BoardsStore.findList('id', 2);
setTimeout(() => {
expect(list.issues.length).toBe(1);
expect(listTwo.issues.length).toBe(1);
...
...
@@ -148,7 +149,7 @@
expect(listTwo.issues.length).toBe(1);
done();
});
}
, 0
);
});
});
});
...
...
spec/javascripts/boards/issue_spec.js.es6
View file @
63a4daa5
...
...
@@ -19,7 +19,7 @@ describe('Issue model', () => {
gl.boardService = new BoardService('/test/issue-boards/board');
BoardsStore.create();
issue = new Issue({
issue = new
List
Issue({
title: 'Testing',
iid: 1,
confidential: false,
...
...
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