Commit def6c43d authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed more rspec tests as well as spinach features

parent 68c730bb
...@@ -6,7 +6,8 @@ class Projects::ProjectMembersController < Projects::ApplicationController ...@@ -6,7 +6,8 @@ class Projects::ProjectMembersController < Projects::ApplicationController
before_action :authorize_admin_project_member!, except: [:index, :leave, :request_access] before_action :authorize_admin_project_member!, except: [:index, :leave, :request_access]
def index def index
redirect_to namespace_project_settings_members_path(@project.namespace, @project) sort = params[:sort].presence || sort_value_name
redirect_to namespace_project_settings_members_path(@project.namespace, @project, sort: sort)
end end
def create def create
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.col-lg-3.settings-sidebar .col-lg-3.settings-sidebar
%h4.prepend-top-0 %h4.prepend-top-0
Members Members
= link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default hidden-xs visible-sm pull-right", title: "Import members from another project" = link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default visible-xs visible-sm pull-right", title: "Import members from another project"
- if can?(current_user, :admin_project_member, @project) - if can?(current_user, :admin_project_member, @project)
%p %p
Add new user to Add new user to
......
...@@ -114,8 +114,10 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps ...@@ -114,8 +114,10 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end end
step 'I click link "Import team from another project"' do step 'I click link "Import team from another project"' do
page.within '.users-project-form' do
click_link "Import" click_link "Import"
end end
end
When 'I submit "Website" project for import team' do When 'I submit "Website" project for import team' do
project = Project.find_by(name: "Website") project = Project.find_by(name: "Website")
......
...@@ -17,7 +17,6 @@ feature 'Projects > Members > Master adds member with expiration date', feature: ...@@ -17,7 +17,6 @@ feature 'Projects > Members > Master adds member with expiration date', feature:
scenario 'expiration date is displayed in the members list' do scenario 'expiration date is displayed in the members list' do
travel_to Time.zone.parse('2016-08-06 08:00') do travel_to Time.zone.parse('2016-08-06 08:00') do
visit namespace_project_settings_members_path(project.namespace, project) visit namespace_project_settings_members_path(project.namespace, project)
save_screenshot
page.within '.users-project-form' do page.within '.users-project-form' do
select2(new_member.id, from: '#user_ids', multiple: true) select2(new_member.id, from: '#user_ids', multiple: true)
......
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