Welcome to mirror list, hosted at ThFree Co, Russian Federation.

filter_labels.rb « issues « project « steps « features - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5740bd12837ba6aa0e1a5f172270c9beecc42d07 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedProject
  include SharedPaths
  include Select2Helper

  step 'I should see "Bugfix1" in issues list' do
    within ".issues-list" do
      page.should have_content "Bugfix1"
    end
  end

  step 'I should see "Bugfix2" in issues list' do
    within ".issues-list" do
      page.should have_content "Bugfix2"
    end
  end

  step 'I should not see "Bugfix2" in issues list' do
    within ".issues-list" do
      page.should_not have_content "Bugfix2"
    end
  end

  step 'I should not see "Feature1" in issues list' do
    within ".issues-list" do
      page.should_not have_content "Feature1"
    end
  end

  step 'I click link "bug"' do
    select2('bug', from: "#label_name")
  end

  step 'I click link "feature"' do
    within ".labels-filter" do
      click_link "feature"
    end
  end

  step 'project "Shop" has issue "Bugfix1" with labels: "bug", "feature"' do
    project = Project.find_by(name: "Shop")
    issue = create(:issue, title: "Bugfix1", project: project)
    issue.labels << project.labels.find_by(title: 'bug')
    issue.labels << project.labels.find_by(title: 'feature')
  end

  step 'project "Shop" has issue "Bugfix2" with labels: "bug", "enhancement"' do
    project = Project.find_by(name: "Shop")
    issue = create(:issue, title: "Bugfix2", project: project)
    issue.labels << project.labels.find_by(title: 'bug')
    issue.labels << project.labels.find_by(title: 'enhancement')
  end

  step 'project "Shop" has issue "Feature1" with labels: "feature"' do
    project = Project.find_by(name: "Shop")
    issue = create(:issue, title: "Feature1", project: project)
    issue.labels << project.labels.find_by(title: 'feature')
  end
end