-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from YusukeIwaki/integration_spec
Introduce integration spec (run with Puppeteer)
- Loading branch information
Showing
5 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe Puppeteer::Browser, puppeteer: :browser do | ||
describe 'version' do | ||
it 'should indicate we are in headless' do | ||
expect(browser.version).to start_with('Headless') | ||
end | ||
end | ||
|
||
describe 'user_agent' do | ||
it 'should include WebKit' do | ||
expect(browser.user_agent).to include('WebKit') | ||
end | ||
end | ||
|
||
describe 'target' do | ||
it 'should return browser target' do | ||
expect(browser.target.type).to eq('browser') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe Puppeteer::Page do | ||
describe 'goto' do | ||
it 'can fetch title soon after goto.' do | ||
page.goto("https://github.com/YusukeIwaki/puppeteer-ruby") | ||
expect(page.title).to include("YusukeIwaki/puppeteer-ruby") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters