diff --git a/features/groups.feature b/features/groups.feature index f0737aa588..d79c7b37b8 100644 --- a/features/groups.feature +++ b/features/groups.feature @@ -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 diff --git a/features/project/project.feature b/features/project/project.feature index e49577c6c0..5606e38513 100644 --- a/features/project/project.feature +++ b/features/project/project.feature @@ -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 diff --git a/features/steps/groups.rb b/features/steps/groups.rb index 6237f2cb73..1428dcb11e 100644 --- a/features/steps/groups.rb +++ b/features/steps/groups.rb @@ -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 diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index 6889c49713..20e63be6c2 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -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