summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/step_definitions/basic_steps.rb
blob: 81ae4cae0697380ff59ef2c0355507f6e75c22c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Given (/^I am logged in$/) do

  # be sure to use the right browser session
  Capybara.session_name = 'test'

  # logout - just to be sure
  visit '/index.php?logout=true'
  visit '/'
  fill_in 'user', with: 'test'
  fill_in 'password', with: "test"
  click_button 'submit'

  #save_page
  page.should have_selector('a#logout')
end

When (/^I am in the "([^"]*)" app$/) do |app|
  visit "/index.php/apps/#{app}"
  page.should have_selector('#logout')
end

When (/^I go to "([^"]*)"$/) do |path|
  visit "#{path}"
  page.should have_selector('#logout')
end