diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/fork.rb | 4 | ||||
-rw-r--r-- | features/steps/project/forked_merge_requests.rb | 5 | ||||
-rw-r--r-- | features/support/env.rb | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index 3490bbd968c..60707f26aee 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -58,13 +58,13 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps step 'I should see my fork on the list' do page.within('.js-projects-list-holder') do - project = @user.fork_of(@project) + project = @user.fork_of(@project.reload) expect(page).to have_content("#{project.namespace.human_name} / #{project.name}") end end step 'I make forked repo invalid' do - project = @user.fork_of(@project) + project = @user.fork_of(@project.reload) project.path = 'test-crappy-path' project.save! end diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb index 420ac8a695a..6781a906a94 100644 --- a/features/steps/project/forked_merge_requests.rb +++ b/features/steps/project/forked_merge_requests.rb @@ -5,6 +5,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps include SharedPaths include Select2Helper include WaitForRequests + include ProjectForksHelper step 'I am a member of project "Shop"' do @project = ::Project.find_by(name: "Shop") @@ -13,7 +14,9 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps end step 'I have a project forked off of "Shop" called "Forked Shop"' do - @forked_project = Projects::ForkService.new(@project, @user).execute + @forked_project = fork_project(@project, @user, + namespace: @user.namespace, + repository: true) end step 'I click link "New Merge Request"' do diff --git a/features/support/env.rb b/features/support/env.rb index 608d988755c..5962745d501 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -10,7 +10,7 @@ if ENV['CI'] Knapsack::Adapters::SpinachAdapter.bind end -%w(select2_helper test_env repo_helpers wait_for_requests sidekiq).each do |f| +%w(select2_helper test_env repo_helpers wait_for_requests sidekiq project_forks_helper).each do |f| require Rails.root.join('spec', 'support', f) end |