cosmetics

Co-authored-by: StenP <stpetrov@microsoft.com>
This commit is contained in:
Sten Petrov 2021-10-12 13:31:49 -07:00 коммит произвёл GitHub
Родитель 06afd331ed
Коммит f983d07f1e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 136 добавлений и 243 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -134,5 +134,6 @@ FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
dist/
# Build
dist/

48
dist/src/AppInsightsAvailabilityFixture.js поставляемый
Просмотреть файл

@ -1,48 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.appInsightsAvailabilityTesterTag = exports.expect = exports.test = void 0;
const test_1 = require("@playwright/test");
Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return test_1.expect; } });
const PlaywrightAvailabilityTester_1 = require("./PlaywrightAvailabilityTester");
const appInsightsAvailabilityTesterTag = "[AVTESTRUN]";
exports.appInsightsAvailabilityTesterTag = appInsightsAvailabilityTesterTag;
const test = test_1.test.extend({
page: ({ page }, use, testInfo) => __awaiter(void 0, void 0, void 0, function* () {
console.log(appInsightsAvailabilityTesterTag, testInfo.title);
// use env vars to init reporting
let pwTesterOptions = {
logDebugToTelemetryClient: true,
log: console.log,
error: console.error,
};
var pwat = new PlaywrightAvailabilityTester_1.PlaywrightAvailabilityTester(pwTesterOptions);
let browserContext = page.context();
if (browserContext) {
pwat.initBrowserContext(browserContext, page);
yield use(page); // test runs here
if (testInfo.status == "failed" || testInfo.status == "timedOut") {
PlaywrightAvailabilityTester_1.PlaywrightAvailabilityTester.failPageTest(page, `Test ${testInfo.title} failed with status ${testInfo.status} in ${testInfo.duration}ms. Error: ${testInfo.error}`);
}
//console.log("Finished test", testInfo.title, "Status:", testInfo.status);
try {
yield page.close();
}
catch (_a) { }
try {
yield browserContext.close();
}
catch (_b) { }
}
}),
});
exports.test = test;
//# sourceMappingURL=AppInsightsAvailabilityFixture.js.map

Просмотреть файл

@ -1 +0,0 @@
{"version":3,"file":"AppInsightsAvailabilityFixture.js","sourceRoot":"","sources":["../../src/AppInsightsAvailabilityFixture.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4D;AA4C7C,uFA5CY,aAAM,OA4CZ;AA3CrB,iFAA8E;AAI9E,MAAM,gCAAgC,GAAG,aAAa,CAAC;AAuChC,4EAAgC;AArCvD,MAAM,IAAI,GAAG,WAAQ,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,CAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE9D,iCAAiC;QACjC,IAAI,eAAe,GAAwC;YACzD,yBAAyB,EAAE,IAAI;YAC/B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC;QACF,IAAI,IAAI,GAAG,IAAI,2DAA4B,CAAC,eAAe,CAAC,CAAC;QAE7D,IAAI,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,cAAc,EAAE;YAClB,IAAI,CAAC,kBAAkB,CAAC,cAAmC,EAAE,IAAI,CAAC,CAAC;YAEnE,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB;YAElC,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,IAAI,UAAU,EAAE;gBAChE,2DAA4B,CAAC,YAAY,CACvC,IAAe,EACf,QAAQ,QAAQ,CAAC,KAAK,uBAAuB,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,QAAQ,cAAc,QAAQ,CAAC,KAAK,EAAE,CACnH,CAAC;aACH;YAED,2EAA2E;YAE3E,IAAI;gBACF,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;aACpB;YAAC,WAAM,GAAE;YACV,IAAI;gBACF,MAAM,cAAc,CAAC,KAAK,EAAE,CAAC;aAC9B;YAAC,WAAM,GAAE;SACX;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEM,oBAAI"}

69
dist/src/PlaywrightTestLauncher.js поставляемый
Просмотреть файл

@ -1,69 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlaywrightTestLauncher = void 0;
const child_process_1 = require("child_process");
const AppInsightsAvailabilityFixture_1 = require("./AppInsightsAvailabilityFixture");
class PlaywrightTestLauncher {
static Run(options) {
return __awaiter(this, void 0, void 0, function* () {
let responseMessage = "start";
if (!options) {
options = {
log: console.log,
error: console.error,
};
}
try {
if (process.env.AZURE_FUNCTIONS_ENVIRONMENT != "Development") {
if (!process.env.PLAYWRIGHT_BROWSERS_PATH || !process.env.PLAYWRIGHT_BROWSERS_PATH.startsWith("/home")) {
options.error("PLAYWRIGHT_BROWSERS_PATH value not as expected:", process.env.PLAYWRIGHT_BROWSERS_PATH, "tests may not run");
}
if (!process.env.APPINSIGHTS_INSTRUMENTATIONKEY && !process.env.APPLICATIONINSIGHTS_CONNECTION_STRING) {
options.error("AppInsights ikey and connection string not as set, telemetry will not be emitted");
}
if (!process.env.AzureWebJobsStorage) {
options.error("AzureWebJobsStorage not set, test data will not be persisted in Azure Storage");
}
}
let cmd = `${process.cwd()}/node_modules/.bin/playwright test`;
if (options.addParameters && (options === null || options === void 0 ? void 0 : options.addParameters.length) > 0) {
cmd += " " + options.addParameters;
}
options.log("Launching Playwright tests:", cmd);
let output = yield new Promise((resolve, reject) => {
const p = child_process_1.exec(cmd, (error, stdout, stderr) => {
resolve({ error, stdout, stderr });
});
});
responseMessage = "done";
if (output.error) {
options.error(output.error);
responseMessage += "\r\nError running tests: " + JSON.stringify(output.error, null, 2);
}
responseMessage += "\r\nSTDOUT: " + output.stdout;
if (output.stderr) {
responseMessage += "\r\nSTDERR: " + output.stderr;
}
if (responseMessage.indexOf(AppInsightsAvailabilityFixture_1.appInsightsAvailabilityTesterTag) < 0) {
options.error("AppInsights Availability Fixture tag not found, check test's `require` statement");
}
}
catch (x) {
options.error("Error runnning Playwright tests", x);
responseMessage += "\r\n" + JSON.stringify(x, null, 2);
}
return responseMessage;
});
}
}
exports.PlaywrightTestLauncher = PlaywrightTestLauncher;
//# sourceMappingURL=PlaywrightTestLauncher.js.map

1
dist/src/PlaywrightTestLauncher.js.map поставляемый
Просмотреть файл

@ -1 +0,0 @@
{"version":3,"file":"PlaywrightTestLauncher.js","sourceRoot":"","sources":["../../src/PlaywrightTestLauncher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAqC;AAErC,qFAAoF;AAKpF,MAAa,sBAAsB;IAC1B,MAAM,CAAO,GAAG,CAAC,OAAuC;;YAC7D,IAAI,eAAe,GAAG,OAAO,CAAC;YAC9B,IAAI,CAAC,OAAO,EAAE;gBACZ,OAAO,GAAG;oBACR,GAAG,EAAE,OAAO,CAAC,GAAG;oBAChB,KAAK,EAAE,OAAO,CAAC,KAAK;iBACrB,CAAC;aACH;YAED,IAAI;gBACF,IAAI,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,aAAa,EAAE;oBAC5D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;wBACtG,OAAO,CAAC,KAAK,CAAC,iDAAiD,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,CAAC;qBAC7H;oBACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE;wBACrG,OAAO,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;qBACnG;oBACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;wBACpC,OAAO,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;qBAChG;iBACF;gBAED,IAAI,GAAG,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,oCAAoC,CAAC;gBAC/D,IAAI,OAAO,CAAC,aAAa,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,MAAM,IAAG,CAAC,EAAE;oBAC9D,GAAG,IAAI,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC;iBACpC;gBAED,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;gBAChD,IAAI,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBACjD,MAAM,CAAC,GAAG,oBAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;wBAC5C,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;oBACrC,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,eAAe,GAAG,MAAM,CAAC;gBAEzB,IAAU,MAAO,CAAC,KAAK,EAAE;oBACvB,OAAO,CAAC,KAAK,CAAO,MAAO,CAAC,KAAK,CAAC,CAAC;oBACnC,eAAe,IAAI,2BAA2B,GAAG,IAAI,CAAC,SAAS,CAAO,MAAO,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;iBAC/F;gBAED,eAAe,IAAI,cAAc,GAAS,MAAO,CAAC,MAAM,CAAC;gBACzD,IAAU,MAAO,CAAC,MAAM,EAAE;oBACxB,eAAe,IAAI,cAAc,GAAS,MAAO,CAAC,MAAM,CAAC;iBAC1D;gBAED,IAAI,eAAe,CAAC,OAAO,CAAC,iEAAgC,CAAC,GAAG,CAAC,EAAE;oBACjE,OAAO,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;iBACnG;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAC;gBACpD,eAAe,IAAI,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;aACxD;YAED,OAAO,eAAe,CAAC;QACzB,CAAC;KAAA;CACF;AAzDD,wDAyDC"}

3
dist/src/index.d.ts поставляемый
Просмотреть файл

@ -1,3 +0,0 @@
export { PlaywrightAvailabilityTester, PlaywrightAvailabilityTesterOptions } from "./PlaywrightAvailabilityTester";
export { test, expect } from "./AppInsightsAvailabilityFixture";
export { PlaywrightTestLauncher } from "./PlaywrightTestLauncher";

11
dist/src/index.js поставляемый
Просмотреть файл

@ -1,11 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlaywrightTestLauncher = exports.expect = exports.test = exports.PlaywrightAvailabilityTester = void 0;
var PlaywrightAvailabilityTester_1 = require("./PlaywrightAvailabilityTester");
Object.defineProperty(exports, "PlaywrightAvailabilityTester", { enumerable: true, get: function () { return PlaywrightAvailabilityTester_1.PlaywrightAvailabilityTester; } });
var AppInsightsAvailabilityFixture_1 = require("./AppInsightsAvailabilityFixture");
Object.defineProperty(exports, "test", { enumerable: true, get: function () { return AppInsightsAvailabilityFixture_1.test; } });
Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return AppInsightsAvailabilityFixture_1.expect; } });
var PlaywrightTestLauncher_1 = require("./PlaywrightTestLauncher");
Object.defineProperty(exports, "PlaywrightTestLauncher", { enumerable: true, get: function () { return PlaywrightTestLauncher_1.PlaywrightTestLauncher; } });
//# sourceMappingURL=index.js.map

1
dist/src/index.js.map поставляемый
Просмотреть файл

@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+EAAmH;AAA1G,4IAAA,4BAA4B,OAAA;AACrC,mFAAgE;AAAvD,sHAAA,IAAI,OAAA;AAAE,wHAAA,MAAM,OAAA;AACrB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA"}

233
package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "experimental_pwafat",
"version": "0.7.23",
"version": "0.8.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -27,9 +27,9 @@
}
},
"@azure/core-http": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.0.tgz",
"integrity": "sha512-DCXm8OTNhPxErNvwuNgd9r/W+LjMrHHNc9/q4QgIOpCaoBvpJd1O5Nl2gbAhrwfiwmEBNWHMeGoe5+g3Lx2H/A==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.1.tgz",
"integrity": "sha512-7ATnV3OGzCO2K9kMrh3NKUM8b4v+xasmlUhkNZz6uMbm+8XH/AexLkhRGsoo0GyKNlEGvyGEfytqTk0nUY2I4A==",
"requires": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-asynciterator-polyfill": "^1.0.0",
@ -58,17 +58,17 @@
}
},
"@azure/logger": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.2.tgz",
"integrity": "sha512-YZNjNV0vL3nN2nedmcjQBcpCTo3oqceXmgiQtEm6fLpucjRZyQKAQruhCmCpRlB1iykqKJJ/Y8CDmT5rIE6IJw==",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz",
"integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==",
"requires": {
"tslib": "^2.0.0"
"tslib": "^2.2.0"
}
},
"@babel/code-frame": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
"integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
"version": "7.15.8",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz",
"integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==",
"requires": {
"@babel/highlight": "^7.14.5"
}
@ -79,40 +79,33 @@
"integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA=="
},
"@babel/core": {
"version": "7.15.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz",
"integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==",
"version": "7.15.8",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.8.tgz",
"integrity": "sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==",
"requires": {
"@babel/code-frame": "^7.14.5",
"@babel/generator": "^7.15.4",
"@babel/code-frame": "^7.15.8",
"@babel/generator": "^7.15.8",
"@babel/helper-compilation-targets": "^7.15.4",
"@babel/helper-module-transforms": "^7.15.4",
"@babel/helper-module-transforms": "^7.15.8",
"@babel/helpers": "^7.15.4",
"@babel/parser": "^7.15.5",
"@babel/parser": "^7.15.8",
"@babel/template": "^7.15.4",
"@babel/traverse": "^7.15.4",
"@babel/types": "^7.15.4",
"@babel/types": "^7.15.6",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.1.2",
"semver": "^6.3.0",
"source-map": "^0.5.0"
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
}
}
},
"@babel/generator": {
"version": "7.15.4",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz",
"integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==",
"version": "7.15.8",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz",
"integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==",
"requires": {
"@babel/types": "^7.15.4",
"@babel/types": "^7.15.6",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
@ -134,13 +127,6 @@
"@babel/helper-validator-option": "^7.14.5",
"browserslist": "^4.16.6",
"semver": "^6.3.0"
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
}
}
},
"@babel/helper-create-class-features-plugin": {
@ -199,9 +185,9 @@
}
},
"@babel/helper-module-transforms": {
"version": "7.15.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz",
"integrity": "sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==",
"version": "7.15.8",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz",
"integrity": "sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==",
"requires": {
"@babel/helper-module-imports": "^7.15.4",
"@babel/helper-replace-supers": "^7.15.4",
@ -292,9 +278,9 @@
}
},
"@babel/parser": {
"version": "7.15.7",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.7.tgz",
"integrity": "sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g=="
"version": "7.15.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz",
"integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA=="
},
"@babel/plugin-proposal-class-properties": {
"version": "7.14.5",
@ -488,9 +474,9 @@
}
},
"@babel/plugin-transform-typescript": {
"version": "7.15.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.4.tgz",
"integrity": "sha512-sM1/FEjwYjXvMwu1PJStH11kJ154zd/lpY56NQJ5qH2D0mabMv1CAy/kdvS9RP4Xgfj9fBBA3JiSLdDHgXdzOA==",
"version": "7.15.8",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.8.tgz",
"integrity": "sha512-ZXIkJpbaf6/EsmjeTbiJN/yMxWPFWvlr7sEG1P95Xb4S4IBcrf2n7s/fItIhsAmOf8oSh3VJPDppO6ExfAfKRQ==",
"requires": {
"@babel/helper-create-class-features-plugin": "^7.15.4",
"@babel/helper-plugin-utils": "^7.14.5",
@ -611,6 +597,21 @@
"requires": {
"@opentelemetry/semantic-conventions": "0.23.0",
"semver": "^7.1.3"
},
"dependencies": {
"@opentelemetry/semantic-conventions": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz",
"integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ=="
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": {
"lru-cache": "^6.0.0"
}
}
}
},
"@opentelemetry/resources": {
@ -620,12 +621,19 @@
"requires": {
"@opentelemetry/core": "0.23.0",
"@opentelemetry/semantic-conventions": "0.23.0"
},
"dependencies": {
"@opentelemetry/semantic-conventions": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz",
"integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ=="
}
}
},
"@opentelemetry/semantic-conventions": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz",
"integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ=="
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz",
"integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA=="
},
"@opentelemetry/tracing": {
"version": "0.23.0",
@ -636,12 +644,19 @@
"@opentelemetry/resources": "0.23.0",
"@opentelemetry/semantic-conventions": "0.23.0",
"lodash.merge": "^4.6.2"
},
"dependencies": {
"@opentelemetry/semantic-conventions": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz",
"integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ=="
}
}
},
"@playwright/test": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.15.0.tgz",
"integrity": "sha512-iDTD2Y3SwyFD6xHNbipyH6O/e0OQ/dJsrsiI8uz4YsRN1aeH1EJs+2qBveVtKW1nR/r0Ml/r3/VPCEi91JWPsw==",
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.15.2.tgz",
"integrity": "sha512-pDEydzpVdABAySMCUXD4h81nqAN0UjpNZeeheuZaG1AH6ElV9g5vOaj1pfFlRi5Io6gjbVbcdNOrAE4mCb/EZw==",
"requires": {
"@babel/code-frame": "^7.14.5",
"@babel/core": "^7.14.8",
@ -706,9 +721,9 @@
}
},
"@types/node": {
"version": "16.3.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.3.3.tgz",
"integrity": "sha512-8h7k1YgQKxKXWckzFCMfsIwn0Y61UK6tlD6y2lOb3hTOIMlK3t9/QwHOhc81TwU+RMf0As5fj7NPjroERCnejQ=="
"version": "16.10.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz",
"integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ=="
},
"@types/node-fetch": {
"version": "2.5.12",
@ -799,12 +814,14 @@
}
},
"applicationinsights": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-2.1.7.tgz",
"integrity": "sha512-AMCu0Nct0pINwdo0TwMuGoTA1vhv2UIDHFFi/kBoVlNRHdV4oBJ1BODVUDvxr7+mLWhDtJQpXanDe//3ZNW1tQ==",
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-2.1.8.tgz",
"integrity": "sha512-ehdYEKMkpm/1CPFX5UwvEUmI45U4v8EnPnvRIGC5hqkGDt7ARMfivwneK+ArbSabotUYWOYdvogmB8CrdJye/g==",
"requires": {
"@azure/core-http": "^2.2.0",
"@opentelemetry/api": "^1.0.3",
"@opentelemetry/core": "^0.23.0",
"@opentelemetry/semantic-conventions": "^0.24.0",
"@opentelemetry/tracing": "^0.23.0",
"cls-hooked": "^4.2.2",
"continuation-local-storage": "^3.2.1",
@ -951,15 +968,15 @@
"integrity": "sha1-rrGvKN5sDXpqLOQK22j/GEIq8x8="
},
"browserslist": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.1.tgz",
"integrity": "sha512-aLD0ZMDSnF4lUt4ZDNgqi5BUn9BZ7YdQdI/cYlILrhdSSZJLU9aNZoD5/NBmM4SK34APB2e83MOsRt1EnkuyaQ==",
"version": "4.17.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.3.tgz",
"integrity": "sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ==",
"requires": {
"caniuse-lite": "^1.0.30001259",
"electron-to-chromium": "^1.3.846",
"caniuse-lite": "^1.0.30001264",
"electron-to-chromium": "^1.3.857",
"escalade": "^3.1.1",
"nanocolors": "^0.1.5",
"node-releases": "^1.1.76"
"node-releases": "^1.1.77",
"picocolors": "^0.2.1"
}
},
"buffer-crc32": {
@ -977,12 +994,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001260",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001260.tgz",
"integrity": "sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==",
"requires": {
"nanocolors": "^0.1.0"
}
"version": "1.0.30001265",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz",
"integrity": "sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw=="
},
"caseless": {
"version": "0.12.0",
@ -1157,9 +1171,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.848",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.848.tgz",
"integrity": "sha512-wchRyBcdcmibioggdO7CbMT5QQ4lXlN/g7Mkpf1K2zINidnqij6EVu94UIZ+h5nB2S9XD4bykqFv9LonAWLFyw=="
"version": "1.3.861",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.861.tgz",
"integrity": "sha512-GZyflmpMnZRdZ1e2yAyvuFwz1MPSVQelwHX4TJZyXypB8NcxdPvPNwy5lOTxnlkrK13EiQzyTPugRSnj6cBgKg=="
},
"emitter-listener": {
"version": "1.1.2",
@ -1786,15 +1800,13 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"nanocolors": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.1.12.tgz",
"integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ=="
},
"node-fetch": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA=="
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
"integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"node-modules-regexp": {
"version": "1.0.0",
@ -1802,9 +1814,9 @@
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA="
},
"node-releases": {
"version": "1.1.76",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.76.tgz",
"integrity": "sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA=="
"version": "1.1.77",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz",
"integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ=="
},
"oauth-sign": {
"version": "0.9.0",
@ -1860,6 +1872,11 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"picocolors": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
"integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA=="
},
"picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
@ -1889,9 +1906,9 @@
}
},
"playwright": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.15.0.tgz",
"integrity": "sha512-JtagFVjNvccP1rIixHB/4KbR+BzMTJLty6mo71YLatvJR9ZH+PX8DLlhw1KDdIH2YGMSQGf2ihh4KAp9tsklxQ==",
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.15.2.tgz",
"integrity": "sha512-+Z+7ckihyxR6rK5q8DWC6eUbKARfXpyxpjNcoJfgwSr64lAOzjhyFQiPC/JkdIqhsLgZjxpWfl1S7fLb+wPkgA==",
"requires": {
"commander": "^6.1.0",
"debug": "^4.1.1",
@ -1910,9 +1927,9 @@
}
},
"playwright-chromium": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.15.0.tgz",
"integrity": "sha512-bp+x7THqk11JoFglUiujOaRtxvK1/MrDe1pAzVTvWOSOky89v9gd5w/USmOgTZyo6bYPIWnPIQjnrk4qRUr0rg==",
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.15.2.tgz",
"integrity": "sha512-YF1hnBHXAMSXRaVN+wzEoifWq0Q2zEH5P8CoTAKp/Xvzgetc0x/IVzcyIgPzrGxfdqczP43bXhpD6TY0NTOubQ==",
"requires": {
"commander": "^6.1.0",
"debug": "^4.1.1",
@ -2130,12 +2147,9 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": {
"lru-cache": "^6.0.0"
}
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
},
"shimmer": {
"version": "1.2.1",
@ -2143,9 +2157,9 @@
"integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw=="
},
"signal-exit": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.4.tgz",
"integrity": "sha512-rqYhcAnZ6d/vTPGghdrw7iumdcbXpsk1b8IG/rz+VWV51DM0p7XCtMoJ3qhPLIbp3tvyt3pKRbaaEMZYpHto8Q=="
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz",
"integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ=="
},
"slash": {
"version": "3.0.0",
@ -2240,6 +2254,11 @@
"universalify": "^0.1.2"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
@ -2311,6 +2330,20 @@
"extsprintf": "^1.2.0"
}
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",

Просмотреть файл

@ -1,7 +1,6 @@
import { test as baseTest, expect } from "@playwright/test";
import { PlaywrightAvailabilityTester } from "./PlaywrightAvailabilityTester";
import * as PW from "playwright";
import { PlaywrightAvailabilityTesterOptions } from ".";
const appInsightsAvailabilityTesterTag = "[AVTESTRUN]";
@ -9,13 +8,7 @@ const test = baseTest.extend({
page: async ({ page }, use, testInfo) => {
console.log(appInsightsAvailabilityTesterTag, testInfo.title);
// use env vars to init reporting
let pwTesterOptions: PlaywrightAvailabilityTesterOptions = {
logDebugToTelemetryClient: true,
log: console.log,
error: console.error,
};
var pwat = new PlaywrightAvailabilityTester(pwTesterOptions);
var pwat = new PlaywrightAvailabilityTester();
let browserContext = page.context();
if (browserContext) {