Commit e6253a0c authored by Connor Shea's avatar Connor Shea

Fix Contribution Analytics and move test to Rspec.

Apparently Spinach tests don't fail when there are JS errors, which is why this didn't get caught earlier. This should future-proof it.

Fix #871.
parent ea62104b
- page_title "Contribution Analytics"
- header_title group_title(@group, "Contribution Analytics", group_analytics_path(@group))
- content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/chart.js')
.gray-content-block
.pull-right
......
Feature: Group Analytics
Background:
Given I sign in as "John Doe"
And "John Doe" is owner of group "Owned"
Scenario: I should see group "Owned" analytics page
When I visit group "Owned" page
And I click on group analytics
Then I should see group analytics page
class Spinach::Features::GroupAnalytics < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedGroup
include SharedUser
step 'I click on group analytics' do
click_link 'Contribution Analytics'
end
step 'I should see group analytics page' do
expect(page).to have_content "Contribution analytics for issues, merge requests and push"
end
end
require 'spec_helper'
feature 'Groups > Contribution Analytics', js: true, feature: true do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:empty_project) { create(:empty_project, namespace: group) }
before do
group.add_owner(user)
login_with(user)
end
describe 'visit Contribution Analytics page for group' do
it 'displays Contribution Analytics' do
visit group_path(group)
click_link 'Contribution Analytics'
expect(page).to have_content "Contribution analytics for issues, merge requests and push"
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment