summaryrefslogtreecommitdiff
path: root/features/steps/project/graph.rb
blob: ba460ac8097c928fb33cce4edd0bc63d5645c4fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedProject

  step 'page should have graphs' do
    page.should have_selector ".stat-graph"
  end

  When 'I visit project "Shop" graph page' do
    project = Project.find_by(name: "Shop")
    visit project_graph_path(project, "master")
  end

  step 'I visit project "Shop" commits graph page' do
    project = Project.find_by(name: "Shop")
    visit commits_project_graph_path(project, "master")
  end

  step 'page should have commits graphs' do
    page.should have_content "Commits statistic for master"
    page.should have_content "Commits per day of month"
  end
end