require'spec_helper'feature'Project group links',feature: true,js: truedoincludeSelect2Helperlet(:master){create(:user)}let(:project){create(:project)}let!(:group){create(:group)}backgrounddoproject.team<<[master,:master]login_as(master)endcontext'setting an expiration date for a group link'dobeforedovisitnamespace_project_group_links_path(project.namespace,project)select2group.id,from: '#link_group_id'fill_in'expires_at',with: (Time.current+4.5.days).strftime('%Y-%m-%d')page.find('body').clickclick_on'Share'endit'shows the expiration time with a warning class'dopage.within('.enabled-groups')doexpect(page).tohave_content('expires in 4 days')expect(page).tohave_selector('.text-warning')endendendend