summaryrefslogtreecommitdiff
path: root/features/steps/project/issue_tracker.rb
blob: 4810ee20738b743ed8c232d2cdee7bced2f2eb9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Spinach::Features::ProjectIssueTracker < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedProject
  include SharedPaths

  step 'project "Shop" has issues enabled' do
    @project = Project.find_by(name: "Shop")
    @project ||= create(:project, name: "Shop", namespace: @user.namespace)
    @project.issues_enabled = true
  end

  step 'change the issue tracker to "GitLab"' do
    select 'GitLab', from: 'project_issues_tracker'
  end

  step 'I the project should have "GitLab" as issue tracker' do
    find_field('project_issues_tracker').value.should == 'gitlab'
  end

  step 'change the issue tracker to "Redmine"' do
    select 'Redmine', from: 'project_issues_tracker'
  end

  step 'I the project should have "Redmine" as issue tracker' do
    find_field('project_issues_tracker').value.should == 'redmine'
  end

  And 'I save project' do
    click_button 'Save changes'
  end
end