Sha256: 796ce0cd02c2c552193501f98cb2b9bccf9813fc6727437dd37b57ce64c7cd77

Contents?: true

Size: 714 Bytes

Versions: 11

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literal: true

require_relative '../../page_objects/pages/account'
require_relative '../../page_objects/pages/login'

Given("I'm a {user} on the login page") do |user|
  @user = user
  @login_page = Login.new(<% if automation == 'watir' %>browser<% else %>driver<% end %>)
  @login_page.visit
end

When('I login with my credentials') do
  @login_page.login(@user['username'], @user['password'])
end

Then("I'm logged in") do
  account_page = Account.new(<% if automation == 'watir' %>browser<% else %>driver<% end %>)
  <%- if visual_automation == true -%>
  check_page account_page
  <%- else -%>
  expect(account_page.header.customer_name).to eq "Welcome back #{@user['name']}"
  <%- end -%>
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_raider-0.9.3 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.9.2 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.9.1 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.9.0 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.9 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.8 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.6 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.5 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.3 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.2 lib/generators/cucumber/templates/partials/web_steps.tt
ruby_raider-0.8.1 lib/generators/cucumber/templates/partials/web_steps.tt