mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
Factor audit events tests.
This commit is contained in:
+11
-11
@@ -60,17 +60,6 @@ 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
|
||||
@@ -157,3 +146,14 @@ Feature: Groups
|
||||
And I click on one group milestone
|
||||
Then I should see group milestone with descriptions and expiry date
|
||||
And I should see group milestone with all issues and MRs assigned to that milestone
|
||||
|
||||
@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"
|
||||
And I click on the "Remove User From Group" button for "Mary Jane"
|
||||
When I visit group "Owned" settings page
|
||||
And I go to "Audit Events"
|
||||
Then I should see the audit event listed
|
||||
|
||||
@@ -56,7 +56,7 @@ Feature: Project
|
||||
And "Pete" is "Shop" developer
|
||||
When I visit project "Shop" settings page
|
||||
And I go to "Members"
|
||||
Then I change "Pete" access level to master
|
||||
And I visit project "Shop" settings page
|
||||
And I change "Pete" access level to master
|
||||
When I visit project "Shop" settings page
|
||||
And I go to "Audit Events"
|
||||
Then I should see the audit event listed
|
||||
|
||||
@@ -75,16 +75,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see the audit event listed' do
|
||||
within ('table#audits tr:nth-child(1) td:nth-child(6)') do
|
||||
within ('table#audits') do
|
||||
page.should have_content 'Add user access as reporter'
|
||||
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'
|
||||
page.should have_content 'Remove user access'
|
||||
page.should have_content('John Doe', count: 3)
|
||||
page.should have_content('Mary Jane', count: 3)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -101,16 +101,10 @@ class Spinach::Features::Project < Spinach::FeatureSteps
|
||||
end
|
||||
|
||||
step 'I should see the audit event listed' do
|
||||
within ('table#audits tr:nth-child(1) td:nth-child(6)') do
|
||||
within ('table#audits') do
|
||||
page.should have_content "Change access level from developer to master"
|
||||
end
|
||||
|
||||
within ('table#audits tr:nth-child(1) td:nth-child(3)') do
|
||||
page.should have_content project.owner.name
|
||||
end
|
||||
|
||||
within ('table#audits tr:nth-child(1) td:nth-child(8)') do
|
||||
page.should have_content 'Pete'
|
||||
page.should have_content(project.owner.name)
|
||||
page.should have_content('Pete')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user