Commit 10d8e1e2 authored by Phil Hughes's avatar Phil Hughes

Updated tests to use new dropdowns

parent ba4572ca
...@@ -10,14 +10,16 @@ ...@@ -10,14 +10,16 @@
addListeners() { addListeners() {
const ldapPermissionsChangeBtns = document.querySelectorAll('.js-ldap-permissions'); const ldapPermissionsChangeBtns = document.querySelectorAll('.js-ldap-permissions');
const changeBtnLength = ldapPermissionsChangeBtns.length;
const ldapOverrideBtns = document.querySelectorAll('.js-ldap-override'); const ldapOverrideBtns = document.querySelectorAll('.js-ldap-override');
const overrideBtnLength = ldapOverrideBtns.length;
for (let i = 0, changeBtnLength = ldapPermissionsChangeBtns.length; i < changeBtnLength; i++) { for (let i = 0; i < changeBtnLength; i += 1) {
const btn = ldapPermissionsChangeBtns[i]; const btn = ldapPermissionsChangeBtns[i];
btn.addEventListener('click', this.showLDAPPermissionsWarning.bind(this)); btn.addEventListener('click', this.showLDAPPermissionsWarning.bind(this));
} }
for (let i = 0, overrideBtnLength = ldapOverrideBtns.length; i < overrideBtnLength; i++) { for (let i = 0; i < overrideBtnLength; i += 1) {
const btn = ldapOverrideBtns[i]; const btn = ldapOverrideBtns[i];
btn.addEventListener('click', this.toggleMemberAccessToggle.bind(this)); btn.addEventListener('click', this.toggleMemberAccessToggle.bind(this));
} }
......
...@@ -117,7 +117,12 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps ...@@ -117,7 +117,12 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
member = mary_jane_member member = mary_jane_member
page.within "#group_member_#{member.id}" do page.within "#group_member_#{member.id}" do
select 'Developer', from: "member_access_level_#{member.id}" click_button member.human_access
page.within '.dropdown-menu' do
click_link 'Developer'
end
wait_for_ajax wait_for_ajax
end end
end end
......
...@@ -65,7 +65,11 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps ...@@ -65,7 +65,11 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
user = User.find_by(name: 'Dmitriy') user = User.find_by(name: 'Dmitriy')
project_member = project.project_members.find_by(user_id: user.id) project_member = project.project_members.find_by(user_id: user.id)
page.within "#project_member_#{project_member.id}" do page.within "#project_member_#{project_member.id}" do
select "Reporter", from: "member_access_level_#{project_member.id}" click_button project_member.human_access
page.within '.dropdown-menu' do
click_link 'Reporter'
end
end end
end end
......
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