Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(install): print version of the browser being downloaded (#146)
Yury Semikhatskyb5af3cac1129
diff --git a/install.js b/install.jsindex 0a7bc7f34c..9da4545241 100644--- a/install.js+++ b/install.js@@ -53,7 +53,7 @@ async function downloadBrowser(browser, playwright) {function onProgress(downloadedBytes, totalBytes) {if (!progressBar) {const ProgressBar = require('progress');- progressBar = new ProgressBar(`Downloading ${browser} ${revision} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {+ progressBar = new ProgressBar(`Downloading ${browser} ${playwright._revision} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {complete: '=',incomplete: ' ',width: 20,diff --git a/src/chromium/Playwright.ts b/src/chromium/Playwright.tsindex eab8e44860..076af17086 100644--- a/src/chromium/Playwright.ts+++ b/src/chromium/Playwright.ts@@ -25,11 +25,13 @@ import {download, RevisionInfo} from '../download';export class Playwright {private _projectRoot: string;private _launcher: Launcher;+ readonly _revision: string;downloadBrowser: (options?: { onProgress?: (downloadedBytes: number, totalBytes: number) => void; }) => Promise<RevisionInfo>;constructor(projectRoot: string, preferredRevision: string) {this._projectRoot = projectRoot;this._launcher = new Launcher(projectRoot, preferredRevision);+ this._revision = preferredRevision;this.downloadBrowser = download.bind(null, this.createBrowserFetcher(), preferredRevision, 'Chromium');}diff --git a/src/firefox/Playwright.ts b/src/firefox/Playwright.tsindex 6634398c71..dcf0061312 100644--- a/src/firefox/Playwright.ts+++ b/src/firefox/Playwright.ts@@ -25,11 +25,13 @@ import {download, RevisionInfo} from '../download';export class Playwright {private _projectRoot: string;private _launcher: Launcher;+ readonly _revision: string;downloadBrowser: (options?: { onProgress?: (downloadedBytes: number, totalBytes: number) => void; }) => Promise<RevisionInfo>;constructor(projectRoot: string, preferredRevision: string) {this._projectRoot = projectRoot;this._launcher = new Launcher(projectRoot, preferredRevision);+ this._revision = preferredRevision;this.downloadBrowser = download.bind(null, this.createBrowserFetcher(), preferredRevision, 'Chromium');}diff --git a/src/webkit/Playwright.ts b/src/webkit/Playwright.tsindex a3a84bff38..83faf63d2d 100644--- a/src/webkit/Playwright.ts+++ b/src/webkit/Playwright.ts@@ -24,11 +24,13 @@ import { download, RevisionInfo } from '../download';export class Playwright {private _projectRoot: string;private _launcher: Launcher;+ readonly _revision: string;downloadBrowser: (options?: { onProgress?: (downloadedBytes: number, totalBytes: number) => void; }) => Promise<RevisionInfo>;constructor(projectRoot: string, preferredRevision: string) {this._projectRoot = projectRoot;this._launcher = new Launcher(projectRoot, preferredRevision);+ this._revision = preferredRevision;this.downloadBrowser = download.bind(null, this.createBrowserFetcher(), preferredRevision, 'WebKit');}