summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-01-04 13:51:40 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-01-04 18:43:55 -0600
commit5ce4883da07c939cc97ef4965aeb6e07adb688be (patch)
treed588e551129496311a1cc704a3615693c3b063b5
parent7056e9261a182120c6d8239ff7505bc1da97b9f1 (diff)
downloadgitlab-ce-5ce4883da07c939cc97ef4965aeb6e07adb688be.tar.gz
Fixed a test and change the arrow functions to named functions
-rw-r--r--app/assets/javascripts/member_expiration_date.js.es64
-rw-r--r--spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/member_expiration_date.js.es6 b/app/assets/javascripts/member_expiration_date.js.es6
index c9c548a490e..bf6c0ec2798 100644
--- a/app/assets/javascripts/member_expiration_date.js.es6
+++ b/app/assets/javascripts/member_expiration_date.js.es6
@@ -14,13 +14,13 @@
inputs.datepicker({
dateFormat: 'yy-mm-dd',
minDate: 1,
- onSelect: () => {
+ onSelect: function onSelect() {
$(this).trigger('change');
toggleClearInput.call(this);
},
});
- inputs.next('.js-clear-input').on('click', (event) => {
+ inputs.next('.js-clear-input').on('click', function clicked(event) {
event.preventDefault();
const input = $(this).closest('.clearable-input').find(selector);
diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
index 2ecd9fdb264..f136d9ce0fa 100644
--- a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
+++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
@@ -14,15 +14,15 @@ feature 'Projects > Members > Master adds member with expiration date', feature:
login_as(master)
end
- scenario 'expiration date is displayed in the members list' do
+ scenario 'expiration date is displayed in the members list', js: true do
travel_to Time.zone.parse('2016-08-06 08:00') do
visit namespace_project_settings_members_path(project.namespace, project)
-
page.within '.users-project-form' do
select2(new_member.id, from: '#user_ids', multiple: true)
fill_in 'expires_at', with: '2016-08-10'
- click_on 'Add to project'
end
+ find('.users-project-form').click
+ click_on 'Add to project'
page.within "#project_member_#{new_member.project_members.first.id}" do
expect(page).to have_content('Expires in 4 days')