-
Notifications
You must be signed in to change notification settings - Fork 64
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
chore: refactor(move) browser-installer utils #1045
Conversation
type DownloadProgressCallback, | ||
} from "../utils"; | ||
import registry from "../registry"; | ||
import { normalizeChromeVersion } from "../utils"; | ||
import { installUbuntuPackageDependencies } from "../ubuntu-packages"; | ||
import { installChromeDriver } from "./driver"; | ||
import { BrowserName } from "../../browser/types"; |
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.
Browser
from "../utils" -> BrowserName
from "../../browser/types"
@@ -5,21 +5,25 @@ import { | |||
getBrowserPlatform, | |||
getChromeDriverDir, | |||
getMilestone, | |||
Driver, | |||
DriverName, |
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.
Driver
-> DriverName
export type SupportedBrowser = (typeof Browser)[keyof typeof Browser]; | ||
export type SupportedDriver = (typeof Driver)[keyof typeof Driver]; | ||
|
||
export const getNormalizedBrowserName = ( |
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.
Moved to "src/browser/utils"
import { MIN_CHROME_VERSION_SUPPORT_ISOLATION } from "../constants/browser"; | ||
|
||
export const isSupportIsolation = (browserName: string, browserVersion = ""): boolean => { | ||
const browserVersionMajor = browserVersion.split(".")[0]; | ||
|
||
return browserName === "chrome" && Number(browserVersionMajor) >= MIN_CHROME_VERSION_SUPPORT_ISOLATION; | ||
}; | ||
|
||
export const getNormalizedBrowserName = (browserName?: string): W3CBrowserName | null => { |
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.
Moved from "src/browser-installer/utils"
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.
Renamed from ".js"
EDGE: "MicrosoftEdge", | ||
} as const; | ||
|
||
export type W3CBrowserName = Exclude<(typeof BrowserName)[keyof typeof BrowserName], PuppeteerBrowser.CHROMIUM>; |
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.
"chromium", unlike others, is not a valid W3C browser name
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.
Renamed to ".ts"
This PR does not change Testplane behaviour