Sha256: 78a202236d7657267a6309bdbfd943e1f7a6cbb282f1ddbddb5a100adacda157

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 Bytes

Contents

module AuthenticationHelpers
    def sign_in_as!(user)
        visit '/login'
        fill_in "Email", :with => "test@example.com"
        fill_in "Password", :with => "spree123"
        click_button "Login"
        page.should have_content("Logged in successfully")
    end

    def fill_in_gtm_id
      user = create(:admin_user, :email => "test@example.com", :password => "spree123")
      sign_in_as!(user)
      visit spree.admin_path
      click_link "Configurations"
      click_link "Google Tag Manager"
      fill_in('Gtm accountid', :with => 'bag')
      click_button "Save"
      page.should have_content("Gtm has been successfully")
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_gtm-0.0.22 spec/support/authentication_helpers.rb
spree_gtm-0.0.21 spec/support/authentication_helpers.rb
spree_gtm-0.0.20 spec/support/authentication_helpers.rb
spree_gtm-0.0.19 spec/support/authentication_helpers.rb