diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-24 11:42:25 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-24 11:42:25 +0000 |
commit | 6b968a8fcdc1f67c4798d2f58004a5cf85e605b1 (patch) | |
tree | 8cb110438c870fd882be22324a854ec118528ba2 /features | |
parent | 541da4d51f3e8abfccbbfc7301d8c133fd0fcd35 (diff) | |
parent | 3657eb76c265f4cf6c35c13c2e32bd2536df89ed (diff) | |
download | gitlab-ce-6b968a8fcdc1f67c4798d2f58004a5cf85e605b1.tar.gz |
Merge branch 'branch-invalid-name' into 'master'
Add JS validation for invalid characters in branch name
Fixes #3293
Demo:
![out-1080p](/uploads/ba21c359b6b8b440c40cacf772ec0df7/out-1080p.gif)
See merge request !2122
Diffstat (limited to 'features')
-rw-r--r-- | features/project/commits/branches.feature | 1 | ||||
-rw-r--r-- | features/steps/project/commits/branches.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/features/project/commits/branches.feature b/features/project/commits/branches.feature index 5103ca12947..2c17d32154a 100644 --- a/features/project/commits/branches.feature +++ b/features/project/commits/branches.feature @@ -25,6 +25,7 @@ Feature: Project Commits Branches And I click branch 'improve/awesome' delete link Then I should not see branch 'improve/awesome' + @javascript Scenario: I create a branch with invalid name Given I visit project branches page And I click new branch link diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index 338f5e8d3ee..0a42931147d 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 invalid' + expect(page).to have_content 'Branch name is invalid' + expect(page).to have_content "can't contain spaces" end step 'I should see new an error that ref is invalid' do |