Commit ac9f9ae1 authored by Marin Jankovski's avatar Marin Jankovski

Add audit even feature spec for groups.

parent f90db27e
......@@ -60,6 +60,17 @@ Feature: Groups
And I add a new LDAP synchronization
Then I see a new LDAP synchronization listed
@javascript
Scenario: I should see audit events
Given User "Mary Jane" exists
When I visit group "Owned" members page
And I select user "Mary Jane" from list with role "Reporter"
And I change the role to "Developer"
When I visit group "Owned" settings page
And I go to "Audit Events"
Then I should see the audit event listed
# Leave
@javascript
......
......@@ -57,6 +57,37 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
projects_with_access.should_not have_content("Mary Jane")
end
step 'I change the role to "Developer"' do
user = User.find_by(name: "Mary Jane")
member = Group.find_by(name: "Owned").members.where(user_id: user.id).first
within "#group_member_#{member.id}" do
find(".btn-tiny.btn.js-toggle-button").click
within "#edit_group_member_#{member.id}" do
select 'Developer', from: 'group_member_access_level'
click_on 'Save'
end
end
end
step 'I go to "Audit Events"' do
click_link 'Audit Events'
end
step 'I should see the audit event listed' do
within ('table#audits tr:nth-child(1) td:nth-child(6)') do
page.should have_content 'Change access level from reporter to developer'
end
within ('table#audits tr:nth-child(1) td:nth-child(3)') do
page.should have_content 'John Doe'
end
within ('table#audits tr:nth-child(1) td:nth-child(8)') do
page.should have_content 'Mary Jane'
end
end
step 'project from group "Owned" has issues assigned to me' do
create :issue,
project: project,
......
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