Commit 5ef3e866 authored by Bryce Johnson's avatar Bryce Johnson

Make fixes to get tests passing.

parent f80b8bd2
...@@ -91,10 +91,11 @@ ...@@ -91,10 +91,11 @@
} }
getSortedLabelsIds() { getSortedLabelsIds() {
// TODO: Check that this works how you expect const sortedIds = [];
return this.prioritizedLabels.find('li').map(function(item) { this.prioritizedLabels.find('li').each(function() {
return $(item).data('id'); sortedIds.push($(this).data('id'));
}); });
return sortedIds;
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
global.BlobCiYamlSelector = BlobCiYamlSelector; global.BlobCiYamlSelector = BlobCiYamlSelector;
class BlobCiYamlSelectors { class BlobCiYamlSelectors {
constructor({ editor, $dropdowns }) { constructor({ editor, $dropdowns } = {}) {
this.editor = editor; this.editor = editor;
this.$dropdowns = $dropdowns || $('.js-gitlab-ci-yml-selector'); this.$dropdowns = $dropdowns || $('.js-gitlab-ci-yml-selector');
this.initSelectors(); this.initSelectors();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
constructor({ $dropdowns, editor }) { constructor({ $dropdowns, editor }) {
this.$dropdowns = $('.js-license-selector'); this.$dropdowns = $('.js-license-selector');
this.editor = editor; this.editor = editor;
this.$dropdowns.each((dropdown) => { this.$dropdowns.each((i, dropdown) => {
const $dropdown = $(dropdown); const $dropdown = $(dropdown);
return new BlobLicenseSelector({ return new BlobLicenseSelector({
editor, editor,
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
new gl.BlobLicenseSelectors({ new gl.BlobLicenseSelectors({
editor: this.editor editor: this.editor
}); });
new gl.BlobGitignoreSelectors({ new BlobGitignoreSelectors({
editor: this.editor editor: this.editor
}); });
new gl.BlobCiYamlSelectors({ new gl.BlobCiYamlSelectors({
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
this.allDoneClicked = this.allDoneClicked.bind(this); this.allDoneClicked = this.allDoneClicked.bind(this);
this.doneClicked = this.doneClicked.bind(this); this.doneClicked = this.doneClicked.bind(this);
this.el = el || $('.js-todos-options'); this.el = el || $('.js-todos-options');
this.perPage = el.data('perPage'); this.perPage = this.el.data('perPage');
this.clearListeners(); this.clearListeners();
this.initBtnListeners(); this.initBtnListeners();
this.initFilters(); this.initFilters();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment