From 9c266d49354e9f7f86c76b00fbe800912f475153 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 16 Dec 2015 16:29:31 -0200 Subject: Add more descriptive error message when create branch with invalid name --- features/steps/project/commits/branches.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps') diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index 338f5e8d3ee..e9312e87637 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -61,7 +61,7 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps end step 'I should see new an error that branch is invalid' do - expect(page).to have_content 'Branch name invalid' + expect(page).to have_content "Branch name can't contains space, '~', '^', ':', '?', '*', '[', '\', '..', '@{', and consecutive slashes, start with '/' or '.' or end in '/' or '.' or '.lock'" end step 'I should see new an error that ref is invalid' do -- cgit v1.2.1 From 1757e6ef65a1cedbfe5d5b5da894d6d0d3d5ef16 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Thu, 17 Dec 2015 16:59:15 -0200 Subject: Add JS validation for invalid characters in branch name More info about valid ref names: https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.ht ml --- features/steps/project/commits/branches.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'features/steps') diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index e9312e87637..109d031d446 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -61,7 +61,8 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps end step 'I should see new an error that branch is invalid' do - expect(page).to have_content "Branch name can't contains space, '~', '^', ':', '?', '*', '[', '\', '..', '@{', and consecutive slashes, start with '/' or '.' or end in '/' or '.' or '.lock'" + expect(page).to have_content 'Branch name is invalid' + expect(page).to have_content "can't contains spaces" end step 'I should see new an error that ref is invalid' do -- cgit v1.2.1 From 23b436dc9346275e9fbd6201317e09da63befc46 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Mon, 21 Dec 2015 21:44:34 -0200 Subject: Fix minor stylistic complaints --- features/steps/project/commits/branches.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps') diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index 109d031d446..0a42931147d 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -62,7 +62,7 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps step 'I should see new an error that branch is invalid' do expect(page).to have_content 'Branch name is invalid' - expect(page).to have_content "can't contains spaces" + expect(page).to have_content "can't contain spaces" end step 'I should see new an error that ref is invalid' do -- cgit v1.2.1