Commit 5ce4883d authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed a test and change the arrow functions to named functions

parent 7056e926
......@@ -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);
......
......@@ -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')
......
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