From fc5ff7af61e14b89b67febf4167a03a0133e55ed Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sat, 19 Mar 2016 18:11:46 +0100 Subject: Create repositories in Spinach issues tests Similar to ad90dba5185e30883d5ad6008c166b0df0108ebf we always have a repository in the real world, so let's also create one in our Spinach tests. --- features/steps/project/issues/issues.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 8c31fa890b2..307d32fd610 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -240,7 +240,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'empty project "Empty Project"' do - create :empty_project, name: 'Empty Project', namespace: @user.namespace + create :project_empty_repo, name: 'Empty Project', namespace: @user.namespace end When 'I visit empty project page' do -- cgit v1.2.1 From 75aaf91cb1d08c4350e2881b18118faf30e1f310 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 21 Mar 2016 11:40:13 +0100 Subject: Create SSH keys for SSH clone Spinach tests These tests would check if the "This project is empty" banner would contain SSH clone URLs. Oddly enough this should have never passed (as far as I can tell) as SSH clone URLs in this banner are _only_ displayed if the current user has at least 1 SSH key attached. Since the tests never seem to create any they never should have passed, yet somehow they did. To solve this the Spinach tests in question now ensure at least 1 SSH key is present. --- features/project/issues/issues.feature | 1 + features/steps/project/issues/issues.rb | 1 + 2 files changed, 2 insertions(+) (limited to 'features') diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index ff21c7d1b83..de7e2b37725 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -160,6 +160,7 @@ Feature: Project Issues Scenario: Issues on empty project Given empty project "Empty Project" + And I have an ssh key When I visit empty project page And I see empty project details with ssh clone info When I visit empty project's issues page diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 307d32fd610..aff5ca676be 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -5,6 +5,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps include SharedNote include SharedPaths include SharedMarkdown + include SharedUser step 'I should see "Release 0.4" in issues' do expect(page).to have_content "Release 0.4" -- cgit v1.2.1