Extract repeating code to a method

This commit is contained in:
taitus
2021-01-22 09:50:54 +01:00
parent c052e907eb
commit 8a91493fe4
2 changed files with 19 additions and 20 deletions

View File

@@ -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