diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-03 13:20:50 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-04-03 13:20:50 +0000 |
commit | a4e3b32685cff9f601773de053849a95a352dd63 (patch) | |
tree | fc16bd865332a8b86286f3c8a7a3247bff02bc6a /features/steps | |
parent | 0dcd92ba05060a488a6d0c48069c27746dde65fb (diff) | |
download | gitlab-ce-a4e3b32685cff9f601773de053849a95a352dd63.tar.gz |
Replace the `project/issues/labels.feature` spinach test with an rspec analog
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/project/issues/labels.rb | 101 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 5 |
2 files changed, 0 insertions, 106 deletions
diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb deleted file mode 100644 index 4df96e081f9..00000000000 --- a/features/steps/project/issues/labels.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Spinach::Features::ProjectIssuesLabels < 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 - page.within "#project_label_#{bug_label.id}" do - first(:link, 'Delete').click - end - end - - step 'I delete all labels' do - page.within '.labels' do - page.all('.label-list-item').each do - first('.remove-row').click - first(:link, 'Delete label').click - end - end - end - - step 'I should see labels help message' do - page.within '.labels' do - expect(page).to have_content 'Generate a default set of labels' - expect(page).to have_content 'New label' - end - end - - step 'I submit new label \'support\'' do - fill_in 'Title', with: 'support' - fill_in 'Background color', with: '#F95610' - click_button 'Create label' - end - - step 'I submit new label \'bug\'' do - fill_in 'Title', with: 'bug' - fill_in 'Background color', with: '#F95610' - click_button 'Create label' - end - - step 'I submit new label with invalid color' do - fill_in 'Title', with: 'support' - fill_in 'Background color', with: '#12' - click_button 'Create label' - end - - step 'I should see label label exist error message' do - page.within '.label-form' do - expect(page).to have_content 'Title has already been taken' - end - end - - step 'I should see label color error message' do - page.within '.label-form' do - expect(page).to have_content 'Color must be a valid color code' - end - end - - step 'I should see label \'feature\'' do - page.within '.other-labels .manage-labels-list' do - expect(page).to have_content 'feature' - end - end - - step 'I should see label \'bug\'' do - page.within '.other-labels .manage-labels-list' do - expect(page).to have_content 'bug' - end - end - - step 'I should not see label \'bug\'' do - page.within '.other-labels .manage-labels-list' do - expect(page).not_to have_content 'bug' - end - end - - step 'I should see label \'support\'' do - page.within '.other-labels .manage-labels-list' do - expect(page).to 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 changes' - end - - step 'I should see label \'fix\'' do - page.within '.other-labels .manage-labels-list' do - expect(page).to have_content 'fix' - end - end - - def bug_label - project.labels.find_or_create_by(title: 'bug') - end -end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 9a5db75fe98..cc893b8391e 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -336,11 +336,6 @@ module SharedPaths visit project_issue_path(issue.project, issue) end - step 'I visit project "Shop" labels page' do - project = Project.find_by(name: 'Shop') - visit project_labels_path(project) - end - step 'I visit project "Forum" labels page' do project = Project.find_by(name: 'Forum') visit project_labels_path(project) |