-
-
Notifications
You must be signed in to change notification settings - Fork 481
added Puppeteer.executablePath tests #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added Puppeteer.executablePath tests #83
Conversation
|
Well now AppVeyor is working 😂 |
| }; | ||
| private string _downloadHost; | ||
|
|
||
| public const int DefaultRevision = 526987; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can buy this now. But I created an issue to make it configurable in v1.0 #84
lib/PuppeteerSharp/Puppeteer.cs
Outdated
| { | ||
| var downloader = Downloader.CreateDefault(); | ||
| var revisionInfo = downloader.RevisionInfo(Downloader.CurrentPlatform, Downloader.DefaultRevision); | ||
| return revisionInfo.ExecutablePath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is in the Launcher class on Puppeteer. Let's honor that.
https://github.com/GoogleChrome/puppeteer/blob/v1.0.0/lib/Launcher.js#L188
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should that method be static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Let's follow Puppetter API, it's static there.
lib/PuppeteerSharp/Launcher.cs
Outdated
| } | ||
|
|
||
| } | ||
| internal string GetExecutablePath() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add one line between the bracket on line 138 and this new function?
…-executable-path-tests
|
|
||
| namespace PuppeteerSharp.Tests.Puppeteer | ||
| { | ||
| public class ExecutablePathTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to make this class inherit from PuppeteerBaseTest and add the attribute [Collection("PuppeteerLoaderFixture collection")]
The problem we have here is that, unluckily, this is the first test running, so we need to download Chromium first, and PuppeteerBaseTest does that job for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Meir017 do you think you will be able to implement this by tomorrow?
If not I can merge it and implement it in another PR.

closes #78