diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-02 18:42:54 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-05 18:21:11 +0200 |
commit | fa34901237cc244fe8b828d079af891e63de1c8f (patch) | |
tree | b165b52a7ff478d7338068caab39ae62b7b1d06e /features/steps/project/labels.rb | |
parent | ac71c386f98fa9b88381abbf9d20e79f57bd7957 (diff) | |
download | gitlab-ce-fa34901237cc244fe8b828d079af891e63de1c8f.tar.gz |
Make Spinach test names consistent
- do not add Feature to feature titles
- titleize feature titles
- put steps on the same path as .feature files
- make feature titles match their path
Diffstat (limited to 'features/steps/project/labels.rb')
-rw-r--r-- | features/steps/project/labels.rb | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb deleted file mode 100644 index b287e183b91..00000000000 --- a/features/steps/project/labels.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Spinach::Features::ProjectLabels < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - - step 'I visit \'bug\' label edit page' do - visit edit_project_label_path(project, bug_label) - end - - step 'I remove label \'bug\'' do - within "#label_#{bug_label.id}" do - click_link 'Remove' - end - end - - step 'I delete all labels' do - within '.labels' do - all('.btn-remove').each do |remove| - remove.click - sleep 0.05 - end - end - end - - step 'I should see labels help message' do - within '.labels' do - page.should have_content 'Create first label or generate default set of '\ - 'labels' - end - end - - step 'I submit new label \'support\'' do - fill_in 'Title', with: 'support' - fill_in 'Background Color', with: '#F95610' - click_button 'Save' - end - - step 'I submit new label \'bug\'' do - fill_in 'Title', with: 'bug' - fill_in 'Background Color', with: '#F95610' - click_button 'Save' - end - - step 'I submit new label with invalid color' do - fill_in 'Title', with: 'support' - fill_in 'Background Color', with: '#12' - click_button 'Save' - end - - step 'I should see label label exist error message' do - within '.label-form' do - page.should have_content 'Title has already been taken' - end - end - - step 'I should see label color error message' do - within '.label-form' do - page.should have_content 'Color is invalid' - end - end - - step 'I should see label \'feature\'' do - within '.manage-labels-list' do - page.should have_content 'feature' - end - end - - step 'I should see label \'bug\'' do - within '.manage-labels-list' do - page.should have_content 'bug' - end - end - - step 'I should not see label \'bug\'' do - within '.manage-labels-list' do - page.should_not have_content 'bug' - end - end - - step 'I should see label \'support\'' do - within '.manage-labels-list' do - page.should have_content 'support' - end - end - - step 'I change label \'bug\' to \'fix\'' do - fill_in 'Title', with: 'fix' - fill_in 'Background Color', with: '#F15610' - click_button 'Save' - end - - step 'I should see label \'fix\'' do - within '.manage-labels-list' do - page.should have_content 'fix' - end - end - - def bug_label - project.labels.find_or_create_by(title: 'bug') - end -end |