Fixed specs

This commit is contained in:
Luke Bennett 2016-07-28 23:46:41 +01:00
parent 49c7ca2a27
commit 3e1e9b670f
No known key found for this signature in database
GPG Key ID: A738E9C68D3BF31A
2 changed files with 7 additions and 6 deletions

View File

@ -617,6 +617,7 @@
}
$el = $(selector, this.dropdown);
if ($el.length) {
return $el.first().trigger('click');
e.preventDefault();
e.stopImmediatePropagation();
$el.first().trigger('click');
@ -690,8 +691,8 @@
if (!index) {
$dropdownContent.scrollTop(0)
} else if (index === ($listItems.length - 1)) {
$dropdownContent.scrollTop($dropdownContent.prop('scrollHeight'));
} else if (listItemBottom > (dropdownContentBottom + dropdownScrollTop)) {
$dropdownContent.scrollTop $dropdownContent.prop('scrollHeight');
} else if (listItemBottom > (dropdownContentBottom + dropdownScrollTop))
$dropdownContent.scrollTop(listItemBottom - dropdownContentBottom + CURSOR_SELECT_SCROLL_PADDING);
} else if (listItemTop < (dropdownContentTop + dropdownScrollTop)) {
return $dropdownContent.scrollTop(listItemTop - dropdownContentTop - CURSOR_SELECT_SCROLL_PADDING);

View File

@ -105,13 +105,13 @@
a3 = "a[href='" + mrsAssignedToMeLink + "']";
a4 = "a[href='" + mrsIHaveCreatedLink + "']";
expect(list.find(a1).length).toBe(1);
expect(list.find(a1).text()).toBe(' Issues assigned to me ');
expect(list.find(a1).text()).toBe('Issues assigned to me');
expect(list.find(a2).length).toBe(1);
expect(list.find(a2).text()).toBe(" Issues I've created ");
expect(list.find(a2).text()).toBe("Issues I've created");
expect(list.find(a3).length).toBe(1);
expect(list.find(a3).text()).toBe(' Merge requests assigned to me ');
expect(list.find(a3).text()).toBe('Merge requests assigned to me');
expect(list.find(a4).length).toBe(1);
return expect(list.find(a4).text()).toBe(" Merge requests I've created ");
return expect(list.find(a4).text()).toBe("Merge requests I've created");
};
describe('Search autocomplete dropdown', function() {