2013-09-23 17:05:36 +00:00
|
|
|
module Asciinema
|
2013-05-27 19:25:29 +00:00
|
|
|
module FeatureHelpers
|
|
|
|
|
2013-05-27 20:04:52 +00:00
|
|
|
def expect_browse_links
|
2013-05-27 19:25:29 +00:00
|
|
|
expect(page).to have_link('All')
|
2013-11-18 13:29:18 +00:00
|
|
|
expect(page).to have_link('Featured')
|
2013-05-27 19:25:29 +00:00
|
|
|
end
|
|
|
|
|
2013-05-27 20:03:16 +00:00
|
|
|
def expect_doc_links
|
2013-11-18 11:17:05 +00:00
|
|
|
expect(page).to have_link('How it works')
|
2013-05-27 20:03:16 +00:00
|
|
|
expect(page).to have_link('Getting started')
|
2013-11-18 11:17:05 +00:00
|
|
|
expect(page).to have_link('Installation')
|
2013-05-27 20:03:16 +00:00
|
|
|
expect(page).to have_link('Recorder options')
|
2013-11-18 11:17:05 +00:00
|
|
|
expect(page).to have_link('Embedding')
|
|
|
|
expect(page).to have_link('FAQ')
|
2013-05-27 20:03:16 +00:00
|
|
|
end
|
|
|
|
|
2013-05-27 21:44:12 +00:00
|
|
|
def set_omniauth(provider, opts = {})
|
|
|
|
if opts[:message]
|
|
|
|
OmniAuth.config.mock_auth[provider] = opts[:message]
|
|
|
|
else
|
|
|
|
OmniAuth.config.mock_auth[provider] = OmniAuth::AuthHash.new({
|
|
|
|
:provider => provider.to_s,
|
|
|
|
:uid => '123456',
|
2014-02-12 19:51:01 +00:00
|
|
|
:info => { :username => opts[:username] },
|
2013-05-27 21:44:12 +00:00
|
|
|
:extra => {
|
|
|
|
:raw_info => {
|
2013-05-30 10:03:08 +00:00
|
|
|
:avatar_url =>
|
|
|
|
'http://gravatar.com/avatar/9cecfc695240b56e5d3c1a5dc3830967'
|
2013-05-27 21:44:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-05-27 19:25:29 +00:00
|
|
|
end
|
|
|
|
end
|