Extract repeating code to a method
This commit is contained in:
@@ -43,4 +43,14 @@ module CommonActions
|
||||
allow_any_instance_of(Officing::BaseController).
|
||||
to receive(:current_booth).and_return(booth)
|
||||
end
|
||||
|
||||
def click_sdg_goal(code)
|
||||
find("li[data-code='#{code}']").click
|
||||
end
|
||||
|
||||
def remove_sdg_goal_or_target_tag(code)
|
||||
within "span[data-val='#{code}']" do
|
||||
click_button "Remove"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user