Skip to content
Snippets Groups Projects
Commit e95d43df authored by Phil Hughes's avatar Phil Hughes Committed by Jacob Schatz
Browse files

Fixed up tests

parent 08dd831f
No related branches found
No related tags found
1 merge request!7239Improved ref switcher dropdown performance
Loading
Loading
@@ -48,7 +48,7 @@ class ProtectedBranchDropdown {
onClickCreateWildcard() {
// Refresh the dropdown's data, which ends up calling `getProtectedBranches`
this.$dropdown.data('glDropdown').remote.execute();
this.$dropdown.data('glDropdown').selectRowAtIndex(0);
this.$dropdown.data('glDropdown').selectRowAtIndex(gon.open_branches.length);
}
 
getProtectedBranches(term, callback) {
Loading
Loading
Loading
Loading
@@ -17,14 +17,15 @@ feature 'Ref switcher', feature: true, js: true do
 
page.within '.project-refs-form' do
input = find('input[type="search"]')
input.set 'expand'
input.set 'binary'
wait_for_ajax
 
input.native.send_keys :down
input.native.send_keys :down
input.native.send_keys :enter
end
 
expect(page).to have_title 'expand-collapse-files'
expect(page).to have_title 'binary-encoding'
end
 
it "user selects ref with special characters" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment