Skip to content

Commit

Permalink
Create click_menu_link method for beta feature tests
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo Navarro <enavarro@suse.com>
  • Loading branch information
David Kang and eduardoj committed May 11, 2020
1 parent 2faca0e commit f3d80eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/spec/browser_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# helper methods for authentication in features tests
require 'support/features/features_authentication'
require 'support/features/features_attribute'
require 'support/features/features_beta'

# Shared examples. Per recommendation of RSpec,
# https://www.relishapp.com/rspec/rspec-core/v/2-12/docs/example-groups/shared-examples
Expand Down
12 changes: 12 additions & 0 deletions src/api/spec/support/features/features_beta.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module FeaturesBeta
def click_menu_link(menu_name, action_name)
click_link(menu_name, visible: true)
within('#navigation') do
click_link(action_name)
end
end
end

RSpec.configure do |c|
c.include FeaturesBeta, type: :feature
end

0 comments on commit f3d80eb

Please sign in to comment.