Sha256: 6c193ffec0ee6d49fa5d7a54e2dd8503538d2d1c9b233954194929ff28170ba7
Contents?: true
Size: 1.3 KB
Versions: 21
Compression:
Stored size: 1.3 KB
Contents
require 'rspec-steps' RSpec.shared_steps "expand the menu" do collapsed_menu_sizes=[ :mobile, :small ] it "clicks on the menu (if needed)" do |example| if collapsed_menu_sizes.include?(Waterpig::BrowserSize.current_size(example)) click_on('Menu') end end end RSpec.shared_steps "visit login" do it "visits root" do begin visit '/' rescue Object => ex p ex raise end end perform_steps "expand the menu" it "clicks on Sign In" do within ".session-links" do click_link "Sign In" end end end RSpec.shared_steps "sign up with" do it "visits root" do visit '/' end perform_steps "expand the menu" it "clicks Sign Up" do click_on "Sign Up" end it "fills in email and pasword" do fill_in "Email", :with => @user.email fill_in "Email Confirmation", :with => @user.email fill_in "Password", :with => @user.password fill_in "Password Confirmation", :with => @user.password end it "clicks Sign Up" do click_button "Sign Up" end end RSpec.shared_steps "sign in with" do perform_steps "visit login" it "fills in email and password" do fill_in "Email", :with => @user.email fill_in "Password", :with => @user.password end it "clicks Sign In" do click_button "Sign In" end end
Version data entries
21 entries across 21 versions & 1 rubygems