Skip to content

Commit

Permalink
BV: Skip the creation of an user per feature in BV, and so always use…
Browse files Browse the repository at this point in the history
… admin on global variables (#9405)
  • Loading branch information
srbarrios authored Oct 28, 2024
1 parent 0e3c788 commit 9003514
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion testsuite/features/step_definitions/navigation_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,14 @@
click_button_and_wait('Sign In', match: :first)

step 'I should be logged in'
$current_user = user
$current_password = passwd
end

Given(/^I am authorized$/) do
step %(I am authorized as "#{$current_user}" with password "#{$current_password}")
user = get_context('user') || 'admin'
password = get_context('password') || 'admin'
step %(I am authorized as "#{user}" with password "#{password}")
end

When(/^I sign out$/) do
Expand Down
4 changes: 2 additions & 2 deletions testsuite/features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ def process_code_coverage
$feature_filename = feature_path.split(%r{(\.feature|/)})[-2]
next if get_context('user_created') == true

# Core features are always handled using admin user, the rest will use its own user based on feature filename
if (feature_path.include? 'core') || (feature_path.include? 'reposync') || (feature_path.include? 'finishing')
# Some stages have features that always requires admin user, the rest will use its own user based on feature filename
if (feature_path.include? 'core') || (feature_path.include? 'reposync') || (feature_path.include? 'finishing') || (feature_path.include? 'build_validation')
$current_user = 'admin'
$current_password = 'admin'
else
Expand Down

0 comments on commit 9003514

Please sign in to comment.