Fixed up tests

This commit is contained in:
Phil Hughes 2016-11-07 16:58:50 +00:00 committed by Jacob Schatz
parent 08dd831f02
commit e95d43dfc5
2 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -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