Make fixes to get tests passing.
This commit is contained in:
parent
f80b8bd26c
commit
5ef3e8669d
|
@ -91,10 +91,11 @@
|
|||
}
|
||||
|
||||
getSortedLabelsIds() {
|
||||
// TODO: Check that this works how you expect
|
||||
return this.prioritizedLabels.find('li').map(function(item) {
|
||||
return $(item).data('id');
|
||||
const sortedIds = [];
|
||||
this.prioritizedLabels.find('li').each(function() {
|
||||
sortedIds.push($(this).data('id'));
|
||||
});
|
||||
return sortedIds;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
global.BlobCiYamlSelector = BlobCiYamlSelector;
|
||||
|
||||
class BlobCiYamlSelectors {
|
||||
constructor({ editor, $dropdowns }) {
|
||||
constructor({ editor, $dropdowns } = {}) {
|
||||
this.editor = editor;
|
||||
this.$dropdowns = $dropdowns || $('.js-gitlab-ci-yml-selector');
|
||||
this.initSelectors();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
constructor({ $dropdowns, editor }) {
|
||||
this.$dropdowns = $('.js-license-selector');
|
||||
this.editor = editor;
|
||||
this.$dropdowns.each((dropdown) => {
|
||||
this.$dropdowns.each((i, dropdown) => {
|
||||
const $dropdown = $(dropdown);
|
||||
return new BlobLicenseSelector({
|
||||
editor,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
new gl.BlobLicenseSelectors({
|
||||
editor: this.editor
|
||||
});
|
||||
new gl.BlobGitignoreSelectors({
|
||||
new BlobGitignoreSelectors({
|
||||
editor: this.editor
|
||||
});
|
||||
new gl.BlobCiYamlSelectors({
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
this.allDoneClicked = this.allDoneClicked.bind(this);
|
||||
this.doneClicked = this.doneClicked.bind(this);
|
||||
this.el = el || $('.js-todos-options');
|
||||
this.perPage = el.data('perPage');
|
||||
this.perPage = this.el.data('perPage');
|
||||
this.clearListeners();
|
||||
this.initBtnListeners();
|
||||
this.initFilters();
|
||||
|
|
Loading…
Reference in New Issue