mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 00:49:07 +08:00
20 lines
389 B
Ruby
20 lines
389 B
Ruby
|
When(/^I click '(.+)' button$/) do |button|
|
||
|
click_on button
|
||
|
end
|
||
|
|
||
|
Then(/^I should be redirected to the homepage$/) do
|
||
|
current_path.should =~ /^\/$/
|
||
|
end
|
||
|
|
||
|
When(/^I click '(.+)' link$/) do |link|
|
||
|
click_link link
|
||
|
end
|
||
|
|
||
|
Then(/^I should see '(.+)'$/) do |text|
|
||
|
expect(page).to have_content(text)
|
||
|
end
|
||
|
|
||
|
Then(/^I should be on homepage$/) do
|
||
|
expect(page).to have_current_path(root_path)
|
||
|
end
|