@azure/playwright 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/browser/common/constants.d.ts +1 -4
  2. package/dist/browser/common/constants.d.ts.map +1 -1
  3. package/dist/browser/common/constants.js +1 -4
  4. package/dist/browser/common/constants.js.map +1 -1
  5. package/dist/browser/common/types.d.ts +0 -4
  6. package/dist/browser/common/types.d.ts.map +1 -1
  7. package/dist/browser/common/types.js.map +1 -1
  8. package/dist/browser/reporter/playwrightReporter.d.ts +0 -1
  9. package/dist/browser/reporter/playwrightReporter.d.ts.map +1 -1
  10. package/dist/browser/reporter/playwrightReporter.js +3 -17
  11. package/dist/browser/reporter/playwrightReporter.js.map +1 -1
  12. package/dist/browser/utils/PlaywrightServiceClient.d.ts +1 -2
  13. package/dist/browser/utils/PlaywrightServiceClient.d.ts.map +1 -1
  14. package/dist/browser/utils/PlaywrightServiceClient.js +1 -26
  15. package/dist/browser/utils/PlaywrightServiceClient.js.map +1 -1
  16. package/dist/browser/utils/utils.d.ts +2 -3
  17. package/dist/browser/utils/utils.d.ts.map +1 -1
  18. package/dist/browser/utils/utils.js +8 -21
  19. package/dist/browser/utils/utils.js.map +1 -1
  20. package/dist/commonjs/common/constants.d.ts +1 -4
  21. package/dist/commonjs/common/constants.d.ts.map +1 -1
  22. package/dist/commonjs/common/constants.js +2 -5
  23. package/dist/commonjs/common/constants.js.map +1 -1
  24. package/dist/commonjs/common/types.d.ts +0 -4
  25. package/dist/commonjs/common/types.d.ts.map +1 -1
  26. package/dist/commonjs/common/types.js.map +1 -1
  27. package/dist/commonjs/reporter/playwrightReporter.d.ts +0 -1
  28. package/dist/commonjs/reporter/playwrightReporter.d.ts.map +1 -1
  29. package/dist/commonjs/reporter/playwrightReporter.js +2 -16
  30. package/dist/commonjs/reporter/playwrightReporter.js.map +1 -1
  31. package/dist/commonjs/tsdoc-metadata.json +1 -1
  32. package/dist/commonjs/utils/PlaywrightServiceClient.d.ts +1 -2
  33. package/dist/commonjs/utils/PlaywrightServiceClient.d.ts.map +1 -1
  34. package/dist/commonjs/utils/PlaywrightServiceClient.js +0 -25
  35. package/dist/commonjs/utils/PlaywrightServiceClient.js.map +1 -1
  36. package/dist/commonjs/utils/utils.d.ts +2 -3
  37. package/dist/commonjs/utils/utils.d.ts.map +1 -1
  38. package/dist/commonjs/utils/utils.js +8 -22
  39. package/dist/commonjs/utils/utils.js.map +1 -1
  40. package/dist/esm/common/constants.d.ts +1 -4
  41. package/dist/esm/common/constants.d.ts.map +1 -1
  42. package/dist/esm/common/constants.js +92 -96
  43. package/dist/esm/common/constants.js.map +1 -7
  44. package/dist/esm/common/customerConfig.js +11 -11
  45. package/dist/esm/common/customerConfig.js.map +1 -7
  46. package/dist/esm/common/entraIdAccessToken.js +77 -85
  47. package/dist/esm/common/entraIdAccessToken.js.map +1 -7
  48. package/dist/esm/common/environmentVariables.js +19 -19
  49. package/dist/esm/common/environmentVariables.js.map +1 -7
  50. package/dist/esm/common/executor.js +58 -51
  51. package/dist/esm/common/executor.js.map +1 -7
  52. package/dist/esm/common/httpService.js +29 -34
  53. package/dist/esm/common/httpService.js.map +1 -7
  54. package/dist/esm/common/logger.js +4 -4
  55. package/dist/esm/common/logger.js.map +1 -7
  56. package/dist/esm/common/messages.js +166 -166
  57. package/dist/esm/common/messages.js.map +1 -7
  58. package/dist/esm/common/playwrightServiceConfig.js +91 -91
  59. package/dist/esm/common/playwrightServiceConfig.js.map +1 -7
  60. package/dist/esm/common/state.js +7 -7
  61. package/dist/esm/common/state.js.map +1 -7
  62. package/dist/esm/common/types.d.ts +0 -4
  63. package/dist/esm/common/types.d.ts.map +1 -1
  64. package/dist/esm/common/types.js +4 -0
  65. package/dist/esm/common/types.js.map +1 -7
  66. package/dist/esm/core/global/playwright-service-global-setup.js +17 -17
  67. package/dist/esm/core/global/playwright-service-global-setup.js.map +1 -7
  68. package/dist/esm/core/global/playwright-service-global-teardown.js +13 -16
  69. package/dist/esm/core/global/playwright-service-global-teardown.js.map +1 -7
  70. package/dist/esm/core/initializePlaywrightServiceTestRun.js +21 -13
  71. package/dist/esm/core/initializePlaywrightServiceTestRun.js.map +1 -7
  72. package/dist/esm/core/playwrightService.js +200 -149
  73. package/dist/esm/core/playwrightService.js.map +1 -7
  74. package/dist/esm/core/playwrightServiceEntra.js +42 -44
  75. package/dist/esm/core/playwrightServiceEntra.js.map +1 -7
  76. package/dist/esm/core/playwrightServiceUtils.js +8 -6
  77. package/dist/esm/core/playwrightServiceUtils.js.map +1 -7
  78. package/dist/esm/index.js +9 -7
  79. package/dist/esm/index.js.map +1 -7
  80. package/dist/esm/reporter/index.js +11 -4
  81. package/dist/esm/reporter/index.js.map +1 -7
  82. package/dist/esm/reporter/playwrightReporter.d.ts +0 -1
  83. package/dist/esm/reporter/playwrightReporter.d.ts.map +1 -1
  84. package/dist/esm/reporter/playwrightReporter.js +193 -202
  85. package/dist/esm/reporter/playwrightReporter.js.map +1 -7
  86. package/dist/esm/utils/PlaywrightServiceClient.d.ts +1 -2
  87. package/dist/esm/utils/PlaywrightServiceClient.d.ts.map +1 -1
  88. package/dist/esm/utils/PlaywrightServiceClient.js +61 -121
  89. package/dist/esm/utils/PlaywrightServiceClient.js.map +1 -7
  90. package/dist/esm/utils/cIInfoProvider.js +71 -58
  91. package/dist/esm/utils/cIInfoProvider.js.map +1 -7
  92. package/dist/esm/utils/getPackageVersion.js +17 -12
  93. package/dist/esm/utils/getPackageVersion.js.map +1 -7
  94. package/dist/esm/utils/getPlaywrightVersion.js +13 -15
  95. package/dist/esm/utils/getPlaywrightVersion.js.map +1 -7
  96. package/dist/esm/utils/packageManager.js +37 -37
  97. package/dist/esm/utils/packageManager.js.map +1 -7
  98. package/dist/esm/utils/parseJwt.js +14 -15
  99. package/dist/esm/utils/parseJwt.js.map +1 -7
  100. package/dist/esm/utils/playwrightReporterStorageManager.js +333 -358
  101. package/dist/esm/utils/playwrightReporterStorageManager.js.map +1 -7
  102. package/dist/esm/utils/utils.d.ts +2 -3
  103. package/dist/esm/utils/utils.d.ts.map +1 -1
  104. package/dist/esm/utils/utils.js +338 -380
  105. package/dist/esm/utils/utils.js.map +1 -7
  106. package/dist/react-native/common/constants.d.ts +1 -4
  107. package/dist/react-native/common/constants.d.ts.map +1 -1
  108. package/dist/react-native/common/constants.js +1 -4
  109. package/dist/react-native/common/constants.js.map +1 -1
  110. package/dist/react-native/common/types.d.ts +0 -4
  111. package/dist/react-native/common/types.d.ts.map +1 -1
  112. package/dist/react-native/common/types.js.map +1 -1
  113. package/dist/react-native/reporter/playwrightReporter.d.ts +0 -1
  114. package/dist/react-native/reporter/playwrightReporter.d.ts.map +1 -1
  115. package/dist/react-native/reporter/playwrightReporter.js +3 -17
  116. package/dist/react-native/reporter/playwrightReporter.js.map +1 -1
  117. package/dist/react-native/utils/PlaywrightServiceClient.d.ts +1 -2
  118. package/dist/react-native/utils/PlaywrightServiceClient.d.ts.map +1 -1
  119. package/dist/react-native/utils/PlaywrightServiceClient.js +1 -26
  120. package/dist/react-native/utils/PlaywrightServiceClient.js.map +1 -1
  121. package/dist/react-native/utils/utils.d.ts +2 -3
  122. package/dist/react-native/utils/utils.d.ts.map +1 -1
  123. package/dist/react-native/utils/utils.js +8 -21
  124. package/dist/react-native/utils/utils.js.map +1 -1
  125. package/package.json +6 -6
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/common/playwrightServiceConfig.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Constants,\n DefaultConnectOptionsConstants,\n InternalEnvironmentVariables,\n ServiceAuth,\n} from \"./constants.js\";\nimport type { PlaywrightServiceAdditionalOptions, OsType } from \"./types.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport { getAndSetRunId, getRunName, ValidateRunID } from \"../utils/utils.js\";\nimport { CIInfoProvider } from \"../utils/cIInfoProvider.js\";\nimport { state } from \"./state.js\";\nimport { ServiceErrorMessageConstants } from \"./messages.js\";\n\nclass PlaywrightServiceConfig {\n public serviceOs: OsType;\n public runId: string;\n public connectTimeout: number;\n public slowMo: number;\n public exposeNetwork: string;\n public runName: string;\n public apiVersion: string;\n private _serviceAuthType: string = ServiceAuth.ENTRA_ID;\n public credential?: TokenCredential;\n\n constructor() {\n this.serviceOs = (process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] ||\n DefaultConnectOptionsConstants.DEFAULT_SERVICE_OS) as OsType;\n this.runName = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] || \"\";\n this.runId = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] || \"\";\n this.connectTimeout = DefaultConnectOptionsConstants.DEFAULT_TIMEOUT;\n this.slowMo = DefaultConnectOptionsConstants.DEFAULT_SLOW_MO;\n this.exposeNetwork = DefaultConnectOptionsConstants.DEFAULT_EXPOSE_NETWORK;\n this.apiVersion =\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] || Constants.LatestAPIVersion;\n }\n\n public static get instance(): PlaywrightServiceConfig {\n if (!state.playwrightServiceConfig) {\n state.playwrightServiceConfig = new PlaywrightServiceConfig();\n }\n return state.playwrightServiceConfig;\n }\n\n public get serviceAuthType(): string {\n return this._serviceAuthType;\n }\n\n public set serviceAuthType(value: string) {\n this._serviceAuthType = value;\n }\n\n public async initialize(): Promise<void> {\n if (!this.runName) {\n const ciConfigInfo = CIInfoProvider.getCIInfo();\n this.runName = await getRunName(ciConfigInfo);\n }\n }\n\n validateOptions = (options?: PlaywrightServiceAdditionalOptions): void => {\n if (!options) return;\n\n const isUsingServiceConfig =\n process.env[InternalEnvironmentVariables.USING_SERVICE_CONFIG] === \"true\";\n if (isUsingServiceConfig) {\n if (options.serviceAuthType || options.runId || options.runName) {\n const errorMessage = ServiceErrorMessageConstants.INVALID_PARAM_WITH_SERVICE_CONFIG.message;\n throw new Error(errorMessage);\n }\n return;\n }\n };\n\n setOptions = (\n options?: PlaywrightServiceAdditionalOptions,\n isGetConnectOptions: boolean = false,\n ): void => {\n if (isGetConnectOptions) {\n this.validateOptions(options);\n }\n\n if (options?.exposeNetwork) {\n this.exposeNetwork = options.exposeNetwork;\n }\n if (options?.apiVersion) {\n if (!process.env[InternalEnvironmentVariables.MPT_API_VERSION]) {\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] = options.apiVersion;\n }\n this.apiVersion = options.apiVersion;\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID]) {\n if (options?.runId) {\n ValidateRunID(options.runId);\n this.runId = options.runId;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] = this.runId;\n } else {\n this.runId = getAndSetRunId();\n }\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] && options?.runName) {\n this.runName = options.runName;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] = this.runName;\n }\n if (options?.os) {\n this.serviceOs = options.os;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] = this.serviceOs;\n }\n if (options?.slowMo) {\n this.slowMo = options.slowMo;\n }\n if (options?.connectTimeout) {\n this.connectTimeout = options.connectTimeout;\n }\n if (options?.credential) {\n this.credential = options.credential;\n }\n };\n}\n\nexport { PlaywrightServiceConfig };\n"],
5
- "mappings": "AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,gBAAgB,YAAY,qBAAqB;AAC1D,SAAS,sBAAsB;AAC/B,SAAS,aAAa;AACtB,SAAS,oCAAoC;AAE7C,MAAM,wBAAwB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACC,mBAA2B,YAAY;AAAA,EACxC;AAAA,EAEP,cAAc;AACZ,SAAK,YAAa,QAAQ,IAAI,6BAA6B,cAAc,KACvE,+BAA+B;AACj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AAe,IAAI,QAAQ;AAAA,MACtE;AACA,WAAK,aAAa,QAAQ;AAAA,IAC5B;AACA,QAAI,CAAC,QAAQ,IAAI,6BAA6B,kBAAkB,GAAG;AACjE,UAAI,SAAS,OAAO;AAClB,sBAAc,QAAQ,KAAK;AAC3B,aAAK,QAAQ,QAAQ;AACrB,gBAAQ,IAAI,6BAA6B,kBAAkB,IAAI,KAAK;AAAA,MACtE,OAAO;AACL,aAAK,QAAQ,eAAe;AAAA,MAC9B;AAAA,IACF;AACA,QAAI,CAAC,QAAQ,IAAI,6BAA6B,oBAAoB,KAAK,SAAS,SAAS;AACvF,WAAK,UAAU,QAAQ;AACvB,cAAQ,IAAI,6BAA6B,oBAAoB,IAAI,KAAK;AAAA,IACxE;AACA,QAAI,SAAS,IAAI;AACf,WAAK,YAAY,QAAQ;AACzB,cAAQ,IAAI,6BAA6B,cAAc,IAAI,KAAK;AAAA,IAClE;AACA,QAAI,SAAS,QAAQ;AACnB,WAAK,SAAS,QAAQ;AAAA,IACxB;AACA,QAAI,SAAS,gBAAgB;AAC3B,WAAK,iBAAiB,QAAQ;AAAA,IAChC;AACA,QAAI,SAAS,YAAY;AACvB,WAAK,aAAa,QAAQ;AAAA,IAC5B;AAAA,EACF;AACF;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"playwrightServiceConfig.js","sourceRoot":"","sources":["../../../src/common/playwrightServiceConfig.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,SAAS,EACT,8BAA8B,EAC9B,4BAA4B,EAC5B,WAAW,GACZ,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7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ent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Constants,\n DefaultConnectOptionsConstants,\n InternalEnvironmentVariables,\n ServiceAuth,\n} from \"./constants.js\";\nimport type { PlaywrightServiceAdditionalOptions, OsType } from \"./types.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport { getAndSetRunId, getRunName, ValidateRunID } from \"../utils/utils.js\";\nimport { CIInfoProvider } from \"../utils/cIInfoProvider.js\";\nimport { state } from \"./state.js\";\nimport { ServiceErrorMessageConstants } from \"./messages.js\";\n\nclass PlaywrightServiceConfig {\n public serviceOs: OsType;\n public runId: string;\n public connectTimeout: number;\n public slowMo: number;\n public exposeNetwork: string;\n public runName: string;\n public apiVersion: string;\n private _serviceAuthType: string = ServiceAuth.ENTRA_ID;\n public credential?: TokenCredential;\n\n constructor() {\n this.serviceOs = (process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] ||\n DefaultConnectOptionsConstants.DEFAULT_SERVICE_OS) as OsType;\n this.runName = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] || \"\";\n this.runId = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] || \"\";\n this.connectTimeout = DefaultConnectOptionsConstants.DEFAULT_TIMEOUT;\n this.slowMo = DefaultConnectOptionsConstants.DEFAULT_SLOW_MO;\n this.exposeNetwork = DefaultConnectOptionsConstants.DEFAULT_EXPOSE_NETWORK;\n this.apiVersion =\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] || Constants.LatestAPIVersion;\n }\n\n public static get instance(): PlaywrightServiceConfig {\n if (!state.playwrightServiceConfig) {\n state.playwrightServiceConfig = new PlaywrightServiceConfig();\n }\n return state.playwrightServiceConfig;\n }\n\n public get serviceAuthType(): string {\n return this._serviceAuthType;\n }\n\n public set serviceAuthType(value: string) {\n this._serviceAuthType = value;\n }\n\n public async initialize(): Promise<void> {\n if (!this.runName) {\n const ciConfigInfo = CIInfoProvider.getCIInfo();\n this.runName = await getRunName(ciConfigInfo);\n }\n }\n\n validateOptions = (options?: PlaywrightServiceAdditionalOptions): void => {\n if (!options) return;\n\n const isUsingServiceConfig =\n process.env[InternalEnvironmentVariables.USING_SERVICE_CONFIG] === \"true\";\n if (isUsingServiceConfig) {\n if (options.serviceAuthType || options.runId || options.runName) {\n const errorMessage = ServiceErrorMessageConstants.INVALID_PARAM_WITH_SERVICE_CONFIG.message;\n throw new Error(errorMessage);\n }\n return;\n }\n };\n\n setOptions = (\n options?: PlaywrightServiceAdditionalOptions,\n isGetConnectOptions: boolean = false,\n ): void => {\n if (isGetConnectOptions) {\n this.validateOptions(options);\n }\n\n if (options?.exposeNetwork) {\n this.exposeNetwork = options.exposeNetwork;\n }\n if (options?.apiVersion) {\n if (!process.env[InternalEnvironmentVariables.MPT_API_VERSION]) {\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] = options.apiVersion;\n }\n this.apiVersion = options.apiVersion;\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID]) {\n if (options?.runId) {\n ValidateRunID(options.runId);\n this.runId = options.runId;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] = this.runId;\n } else {\n this.runId = getAndSetRunId();\n }\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] && options?.runName) {\n this.runName = options.runName;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] = this.runName;\n }\n if (options?.os) {\n this.serviceOs = options.os;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] = this.serviceOs;\n }\n if (options?.slowMo) {\n this.slowMo = options.slowMo;\n }\n if (options?.connectTimeout) {\n this.connectTimeout = options.connectTimeout;\n }\n if (options?.credential) {\n this.credential = options.credential;\n }\n };\n}\n\nexport { PlaywrightServiceConfig };\n"]}
@@ -1,9 +1,9 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
1
3
  globalThis.state = globalThis.state || {
2
- playwrightServiceEntra: null,
3
- customerConfig: null,
4
- playwrightServiceConfig: null
5
- };
6
- const state = globalThis.state;
7
- export {
8
- state
4
+ playwrightServiceEntra: null,
5
+ customerConfig: null,
6
+ playwrightServiceConfig: null,
9
7
  };
8
+ export const state = globalThis.state;
9
+ //# sourceMappingURL=state.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/common/state.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n(globalThis as any).state = (globalThis as any).state || {\n playwrightServiceEntra: null,\n customerConfig: null,\n playwrightServiceConfig: null,\n};\nexport const state: Record<string, any> = (globalThis as any).state;\n"],
5
- "mappings": "AAGC,WAAmB,QAAS,WAAmB,SAAS;AAAA,EACvD,wBAAwB;AAAA,EACxB,gBAAgB;AAAA,EAChB,yBAAyB;AAC3B;AACO,MAAM,QAA8B,WAAmB;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/common/state.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAEjC,UAAkB,CAAC,KAAK,GAAI,UAAkB,CAAC,KAAK,IAAI;IACvD,sBAAsB,EAAE,IAAI;IAC5B,cAAc,EAAE,IAAI;IACpB,uBAAuB,EAAE,IAAI;CAC9B,CAAC;AACF,MAAM,CAAC,MAAM,KAAK,GAAyB,UAAkB,CAAC,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n(globalThis as any).state = (globalThis as any).state || {\n playwrightServiceEntra: null,\n customerConfig: null,\n playwrightServiceConfig: null,\n};\nexport const state: Record<string, any> = (globalThis as any).state;\n"]}
@@ -192,10 +192,6 @@ export type WorkspaceMetaData = {
192
192
  storageUri?: string;
193
193
  reporting?: string;
194
194
  };
195
- export type TenantInfo = {
196
- tenantId?: string;
197
- defaultDomain?: string;
198
- };
199
195
  export interface UploadResult {
200
196
  success: boolean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nB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ConnectOptions } from \"@playwright/test\";\nimport type { ServiceAuth, ServiceOS, SDKLanguage } from \"./constants.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport type { CIInfo } from \"../utils/cIInfoProvider.js\";\n\n// Public APIs\n\n/**\n * @public\n *\n * Endpoint options for the service.\n */\nexport type EndpointOptions = {\n /**\n * @public\n *\n * A browser websocket endpoint to connect to.\n */\n wsEndpoint: string;\n};\n\n/**\n * @public\n *\n * Browser connect options for the service. This includes endpoint options and connect options.\n *\n * @example\n * ```\n * import playwright, { test, expect, BrowserType } from \"@playwright/test\";\n * import { getConnectOptions, BrowserConnectOptions } from \"@azure/playwright\";\n *\n * test(\"has title\", async ({ browserName }) => {\n * const { wsEndpoint, options } : BrowserConnectOptions = await getConnectOptions();\n * const browser = await (playwright[browserName] as BrowserType).connect(wsEndpoint, options);\n * const context = await browser.newContext();\n * const page = await context.newPage();\n *\n * await page.goto(\"https://playwright.dev/\");\n * await expect(page).toHaveTitle(/Playwright/);\n *\n * await page.close();\n * await context.close();\n * await browser.close();\n * });\n * ```\n */\nexport type BrowserConnectOptions = EndpointOptions & {\n options: ConnectOptions;\n};\n\n/**\n * @public\n *\n * Additional options for the service.\n */\nexport type PlaywrightServiceAdditionalOptions = {\n /**\n * @public\n *\n * Authentication types supported by Azure Playwright.\n *\n * @defaultValue `ENTRA_ID`\n */\n serviceAuthType?: AuthenticationType;\n\n /**\n * @public\n *\n * Operating system types supported by Azure Playwright.\n *\n * @defaultValue `linux`\n */\n os?: OsType;\n\n /**\n * @public\n *\n * Run id for the test run.\n *\n * @defaultValue `current datetime as ISO string`\n */\n runId?: string;\n\n /**\n * @public\n *\n * Maximum time in milliseconds to wait for the connection to be established.\n *\n * @defaultValue `30000`\n */\n connectTimeout?: number;\n\n /**\n * @public\n *\n * Slows down Playwright operations by the specified amount of milliseconds.\n *\n * @defaultValue `0`\n */\n slowMo?: number;\n\n /**\n * @public\n *\n * Exposes network available on the connecting client to the browser being connected to.\n *\n * @defaultValue `<loopback>`\n */\n exposeNetwork?: string;\n\n /**\n * @public\n *\n * Use cloud hosted browsers.\n *\n * @defaultValue `true`\n */\n useCloudHostedBrowsers?: boolean;\n\n /**\n * @public\n *\n * Custom token credential for Entra ID authentication. Learn more at {@link https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/using-azure-identity.md | Using Azure Identity}.\n *\n * @defaultValue `DefaultAzureCredential`\n */\n credential?: TokenCredential;\n /**\n * @public\n *\n * Run name for the test run.\n *\n * @defaultValue `guid`\n */\n runName?: string;\n\n /**\n * @public\n *\n * API Version\n *\n * @defaultValue `2025-09-01`\n */\n apiVersion?: \"2025-09-01\";\n};\n\n/**\n * @public\n *\n * OS Types supported by Azure Playwright.\n */\nexport type OsType = (typeof ServiceOS)[keyof typeof ServiceOS];\n\n/**\n * @public\n *\n * Authentication types supported by Azure Playwright.\n */\nexport type AuthenticationType = (typeof ServiceAuth)[keyof typeof ServiceAuth];\n\n// Internal APIs\n\nexport type JwtPayload = {\n iss?: string;\n sub?: string;\n aud?: string[] | string;\n exp?: number;\n nbf?: number;\n iat?: number;\n jti?: string;\n};\n\nexport type AccessTokenClaims = JwtPayload & {\n pwid?: string;\n};\n\nexport type VersionInfo = {\n major: number;\n minor: number;\n patch: number;\n};\n\nexport type PackageManager = {\n runCommand: (command: string, args: string) => string;\n getVersionFromStdout: (stdout: string) => string;\n};\n\nexport type RunConfig = {\n framework?: RunFramework;\n sdkLanguage?: (typeof SDKLanguage)[keyof typeof SDKLanguage];\n maxWorkers?: number;\n};\n\nexport type RunFramework = {\n name?: string;\n version?: string;\n runnerName?: string;\n};\n\nexport type TestRunCreatePayload = {\n displayName: string;\n config?: RunConfig;\n ciConfig?: CIInfo;\n};\n\nexport type WorkspaceMetaData = {\n id?: string;\n resourceId?: string;\n name?: string;\n state?: string;\n subscriptionId?: string;\n subscriptionState?: string;\n tenantId?: string;\n location?: string;\n regionalAffinity?: string;\n localAuth?: string;\n storageUri?: string;\n reporting?: string;\n};\n\nexport interface UploadResult {\n success: boolean;\n errorMessage?: string;\n failedFileCount?: number;\n totalFiles?: number;\n failedFiles?: string[];\n failedFileDetails?: Array<{ fileName: string; error: string }>;\n partialSuccess?: boolean;\n}\n"]}
@@ -1,3 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
1
3
  import { dirname } from "node:path";
2
4
  import playwrightServiceEntra from "../playwrightServiceEntra.js";
3
5
  import { loadCustomerGlobalFunction } from "../../common/executor.js";
@@ -5,21 +7,19 @@ import customerConfig from "../../common/customerConfig.js";
5
7
  import { PlaywrightServiceConfig } from "../../common/playwrightServiceConfig.js";
6
8
  import { initializePlaywrightServiceTestRun } from "../initializePlaywrightServiceTestRun.js";
7
9
  const playwrightServiceGlobalSetupWrapper = async (config) => {
8
- const rootDir = config.configFile ? dirname(config.configFile) : process.cwd();
9
- let customerGlobalSetupFunc = null;
10
- if (customerConfig.globalSetup && typeof customerConfig.globalSetup === "string") {
11
- customerGlobalSetupFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalSetup);
12
- }
13
- const serviceAuthType = PlaywrightServiceConfig.instance.serviceAuthType;
14
- if (serviceAuthType === "ENTRA_ID") {
15
- await playwrightServiceEntra.globalSetup();
16
- }
17
- await initializePlaywrightServiceTestRun(config);
18
- if (customerGlobalSetupFunc) {
19
- return customerGlobalSetupFunc(config);
20
- }
21
- };
22
- var playwright_service_global_setup_default = playwrightServiceGlobalSetupWrapper;
23
- export {
24
- playwright_service_global_setup_default as default
10
+ const rootDir = config.configFile ? dirname(config.configFile) : process.cwd();
11
+ let customerGlobalSetupFunc = null;
12
+ if (customerConfig.globalSetup && typeof customerConfig.globalSetup === "string") {
13
+ customerGlobalSetupFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalSetup);
14
+ }
15
+ const serviceAuthType = PlaywrightServiceConfig.instance.serviceAuthType;
16
+ if (serviceAuthType === "ENTRA_ID") {
17
+ await playwrightServiceEntra.globalSetup();
18
+ }
19
+ await initializePlaywrightServiceTestRun(config);
20
+ if (customerGlobalSetupFunc) {
21
+ return customerGlobalSetupFunc(config);
22
+ }
25
23
  };
24
+ export default playwrightServiceGlobalSetupWrapper;
25
+ //# sourceMappingURL=playwright-service-global-setup.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/core/global/playwright-service-global-setup.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\nimport { PlaywrightServiceConfig } from \"../../common/playwrightServiceConfig.js\";\nimport { initializePlaywrightServiceTestRun } from \"../initializePlaywrightServiceTestRun.js\";\n\nconst playwrightServiceGlobalSetupWrapper = async (config: FullConfig): Promise<any> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalSetupFunc: any = null;\n if (customerConfig.globalSetup && typeof customerConfig.globalSetup === \"string\") {\n customerGlobalSetupFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalSetup);\n }\n const serviceAuthType = PlaywrightServiceConfig.instance.serviceAuthType;\n if (serviceAuthType === \"ENTRA_ID\") {\n await playwrightServiceEntra.globalSetup();\n }\n await initializePlaywrightServiceTestRun(config);\n if (customerGlobalSetupFunc) {\n return customerGlobalSetupFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalSetupWrapper;\n"],
5
- "mappings": "AAGA,SAAS,eAAe;AAExB,OAAO,4BAA4B;AACnC,SAAS,kCAAkC;AAC3C,OAAO,oBAAoB;AAC3B,SAAS,+BAA+B;AACxC,SAAS,0CAA0C;AAEnD,MAAM,sCAAsC,OAAO,WAAqC;AACtF,QAAM,UAAU,OAAO,aAAa,QAAQ,OAAO,UAAW,IAAI,QAAQ,IAAI;AAC9E,MAAI,0BAA+B;AACnC,MAAI,eAAe,eAAe,OAAO,eAAe,gBAAgB,UAAU;AAChF,8BAA0B,MAAM,2BAA2B,SAAS,eAAe,WAAW;AAAA,EAChG;AACA,QAAM,kBAAkB,wBAAwB,SAAS;AACzD,MAAI,oBAAoB,YAAY;AAClC,UAAM,uBAAuB,YAAY;AAAA,EAC3C;AACA,QAAM,mCAAmC,MAAM;AAC/C,MAAI,yBAAyB;AAC3B,WAAO,wBAAwB,MAAM;AAAA,EACvC;AACF;AAEA,IAAO,0CAAQ;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"playwright-service-global-setup.js","sourceRoot":"","sources":["../../../../src/core/global/playwright-service-global-setup.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,sBAAsB,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,MAAM,mCAAmC,GAAG,KAAK,EAAE,MAAkB,EAAgB,EAAE;IACrF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAChF,IAAI,uBAAuB,GAAQ,IAAI,CAAC;IACxC,IAAI,cAAc,CAAC,WAAW,IAAI,OAAO,cAAc,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QACjF,uBAAuB,GAAG,MAAM,0BAA0B,CAAC,OAAO,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IAClG,CAAC;IACD,MAAM,eAAe,GAAG,uBAAuB,CAAC,QAAQ,CAAC,eAAe,CAAC;IACzE,IAAI,eAAe,KAAK,UAAU,EAAE,CAAC;QACnC,MAAM,sBAAsB,CAAC,WAAW,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,kCAAkC,CAAC,MAAM,CAAC,CAAC;IACjD,IAAI,uBAAuB,EAAE,CAAC;QAC5B,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,mCAAmC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\nimport { PlaywrightServiceConfig } from \"../../common/playwrightServiceConfig.js\";\nimport { initializePlaywrightServiceTestRun } from \"../initializePlaywrightServiceTestRun.js\";\n\nconst playwrightServiceGlobalSetupWrapper = async (config: FullConfig): Promise<any> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalSetupFunc: any = null;\n if (customerConfig.globalSetup && typeof customerConfig.globalSetup === \"string\") {\n customerGlobalSetupFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalSetup);\n }\n const serviceAuthType = PlaywrightServiceConfig.instance.serviceAuthType;\n if (serviceAuthType === \"ENTRA_ID\") {\n await playwrightServiceEntra.globalSetup();\n }\n await initializePlaywrightServiceTestRun(config);\n if (customerGlobalSetupFunc) {\n return customerGlobalSetupFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalSetupWrapper;\n"]}
@@ -1,22 +1,19 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
1
3
  import { dirname } from "node:path";
2
4
  import playwrightServiceEntra from "../playwrightServiceEntra.js";
3
5
  import { loadCustomerGlobalFunction } from "../../common/executor.js";
4
6
  import customerConfig from "../../common/customerConfig.js";
5
7
  const playwrightServiceGlobalTeardownWrapper = async (config) => {
6
- const rootDir = config.configFile ? dirname(config.configFile) : process.cwd();
7
- let customerGlobalTeardownFunc = null;
8
- if (customerConfig.globalTeardown && typeof customerConfig.globalTeardown === "string") {
9
- customerGlobalTeardownFunc = await loadCustomerGlobalFunction(
10
- rootDir,
11
- customerConfig.globalTeardown
12
- );
13
- }
14
- playwrightServiceEntra.globalTeardown();
15
- if (customerGlobalTeardownFunc) {
16
- await customerGlobalTeardownFunc(config);
17
- }
18
- };
19
- var playwright_service_global_teardown_default = playwrightServiceGlobalTeardownWrapper;
20
- export {
21
- playwright_service_global_teardown_default as default
8
+ const rootDir = config.configFile ? dirname(config.configFile) : process.cwd();
9
+ let customerGlobalTeardownFunc = null;
10
+ if (customerConfig.globalTeardown && typeof customerConfig.globalTeardown === "string") {
11
+ customerGlobalTeardownFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalTeardown);
12
+ }
13
+ playwrightServiceEntra.globalTeardown();
14
+ if (customerGlobalTeardownFunc) {
15
+ await customerGlobalTeardownFunc(config);
16
+ }
22
17
  };
18
+ export default playwrightServiceGlobalTeardownWrapper;
19
+ //# sourceMappingURL=playwright-service-global-teardown.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/core/global/playwright-service-global-teardown.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\n\nconst playwrightServiceGlobalTeardownWrapper = async (config: FullConfig): Promise<void> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalTeardownFunc: any = null;\n if (customerConfig.globalTeardown && typeof customerConfig.globalTeardown === \"string\") {\n customerGlobalTeardownFunc = await loadCustomerGlobalFunction(\n rootDir,\n customerConfig.globalTeardown,\n );\n }\n playwrightServiceEntra.globalTeardown();\n if (customerGlobalTeardownFunc) {\n await customerGlobalTeardownFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalTeardownWrapper;\n"],
5
- "mappings": "AAGA,SAAS,eAAe;AAExB,OAAO,4BAA4B;AACnC,SAAS,kCAAkC;AAC3C,OAAO,oBAAoB;AAE3B,MAAM,yCAAyC,OAAO,WAAsC;AAC1F,QAAM,UAAU,OAAO,aAAa,QAAQ,OAAO,UAAW,IAAI,QAAQ,IAAI;AAC9E,MAAI,6BAAkC;AACtC,MAAI,eAAe,kBAAkB,OAAO,eAAe,mBAAmB,UAAU;AACtF,iCAA6B,MAAM;AAAA,MACjC;AAAA,MACA,eAAe;AAAA,IACjB;AAAA,EACF;AACA,yBAAuB,eAAe;AACtC,MAAI,4BAA4B;AAC9B,UAAM,2BAA2B,MAAM;AAAA,EACzC;AACF;AAEA,IAAO,6CAAQ;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"playwright-service-global-teardown.js","sourceRoot":"","sources":["../../../../src/core/global/playwright-service-global-teardown.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,sBAAsB,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,MAAM,sCAAsC,GAAG,KAAK,EAAE,MAAkB,EAAiB,EAAE;IACzF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAChF,IAAI,0BAA0B,GAAQ,IAAI,CAAC;IAC3C,IAAI,cAAc,CAAC,cAAc,IAAI,OAAO,cAAc,CAAC,cAAc,KAAK,QAAQ,EAAE,CAAC;QACvF,0BAA0B,GAAG,MAAM,0BAA0B,CAC3D,OAAO,EACP,cAAc,CAAC,cAAc,CAC9B,CAAC;IACJ,CAAC;IACD,sBAAsB,CAAC,cAAc,EAAE,CAAC;IACxC,IAAI,0BAA0B,EAAE,CAAC;QAC/B,MAAM,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,sCAAsC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\n\nconst playwrightServiceGlobalTeardownWrapper = async (config: FullConfig): Promise<void> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalTeardownFunc: any = null;\n if (customerConfig.globalTeardown && typeof customerConfig.globalTeardown === \"string\") {\n customerGlobalTeardownFunc = await loadCustomerGlobalFunction(\n rootDir,\n customerConfig.globalTeardown,\n );\n }\n playwrightServiceEntra.globalTeardown();\n if (customerGlobalTeardownFunc) {\n await customerGlobalTeardownFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalTeardownWrapper;\n"]}
@@ -1,18 +1,26 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
1
3
  import { PlaywrightServiceClient } from "../utils/PlaywrightServiceClient.js";
2
4
  import { PlaywrightServiceConfig } from "../common/playwrightServiceConfig.js";
3
5
  import { getTestRunConfig } from "../utils/utils.js";
4
6
  import { CIInfoProvider } from "../utils/cIInfoProvider.js";
5
- async function initializePlaywrightServiceTestRun(config) {
6
- const playwrightServiceApiClient = new PlaywrightServiceClient();
7
- const playwrightServiceConfig = PlaywrightServiceConfig.instance;
8
- const ciConfigInfo = CIInfoProvider.getCIInfo();
9
- const testRunCreatePayload = {
10
- displayName: playwrightServiceConfig.runName === "" ? playwrightServiceConfig.runId : playwrightServiceConfig.runName,
11
- config: getTestRunConfig(config),
12
- ciConfig: ciConfigInfo
13
- };
14
- await playwrightServiceApiClient.createOrUpdateTestRun(testRunCreatePayload);
7
+ /**
8
+ * Initializes the Playwright workspaces by setting up authentication and creating a test run.
9
+ *
10
+ * @param config - The full Playwright configuration
11
+ * @returns Promise that resolves when service initialization is complete
12
+ */
13
+ export async function initializePlaywrightServiceTestRun(config) {
14
+ const playwrightServiceApiClient = new PlaywrightServiceClient();
15
+ const playwrightServiceConfig = PlaywrightServiceConfig.instance;
16
+ const ciConfigInfo = CIInfoProvider.getCIInfo();
17
+ const testRunCreatePayload = {
18
+ displayName: playwrightServiceConfig.runName === ""
19
+ ? playwrightServiceConfig.runId
20
+ : playwrightServiceConfig.runName,
21
+ config: getTestRunConfig(config),
22
+ ciConfig: ciConfigInfo,
23
+ };
24
+ await playwrightServiceApiClient.createOrUpdateTestRun(testRunCreatePayload);
15
25
  }
16
- export {
17
- initializePlaywrightServiceTestRun
18
- };
26
+ //# sourceMappingURL=initializePlaywrightServiceTestRun.js.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/core/initializePlaywrightServiceTestRun.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { FullConfig } from \"@playwright/test\";\nimport { PlaywrightServiceClient } from \"../utils/PlaywrightServiceClient.js\";\nimport { PlaywrightServiceConfig } from \"../common/playwrightServiceConfig.js\";\nimport { getTestRunConfig } from \"../utils/utils.js\";\nimport { CIInfoProvider } from \"../utils/cIInfoProvider.js\";\n\n/**\n * Initializes the Playwright workspaces by setting up authentication and creating a test run.\n *\n * @param config - The full Playwright configuration\n * @returns Promise that resolves when service initialization is complete\n */\nexport async function initializePlaywrightServiceTestRun(config: FullConfig): Promise<void> {\n const playwrightServiceApiClient = new PlaywrightServiceClient();\n const playwrightServiceConfig = PlaywrightServiceConfig.instance;\n const ciConfigInfo = CIInfoProvider.getCIInfo();\n\n const testRunCreatePayload = {\n displayName:\n playwrightServiceConfig.runName === \"\"\n ? playwrightServiceConfig.runId\n : playwrightServiceConfig.runName,\n config: getTestRunConfig(config),\n ciConfig: ciConfigInfo,\n };\n\n await playwrightServiceApiClient.createOrUpdateTestRun(testRunCreatePayload);\n}\n"],
5
- "mappings": "AAIA,SAAS,+BAA+B;AACxC,SAAS,+BAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAQ/B,eAAsB,mCAAmC,QAAmC;AAC1F,QAAM,6BAA6B,IAAI,wBAAwB;AAC/D,QAAM,0BAA0B,wBAAwB;AACxD,QAAM,eAAe,eAAe,UAAU;AAE9C,QAAM,uBAAuB;AAAA,IAC3B,aACE,wBAAwB,YAAY,KAChC,wBAAwB,QACxB,wBAAwB;AAAA,IAC9B,QAAQ,iBAAiB,MAAM;AAAA,IAC/B,UAAU;AAAA,EACZ;AAEA,QAAM,2BAA2B,sBAAsB,oBAAoB;AAC7E;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"initializePlaywrightServiceTestRun.js","sourceRoot":"","sources":["../../../src/core/initializePlaywrightServiceTestRun.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC,CAAC,MAAkB;IACzE,MAAM,0BAA0B,GAAG,IAAI,uBAAuB,EAAE,CAAC;IACjE,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,QAAQ,CAAC;IACjE,MAAM,YAAY,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;IAEhD,MAAM,oBAAoB,GAAG;QAC3B,WAAW,EACT,uBAAuB,CAAC,OAAO,KAAK,EAAE;YACpC,CAAC,CAAC,uBAAuB,CAAC,KAAK;YAC/B,CAAC,CAAC,uBAAuB,CAAC,OAAO;QACrC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;QAChC,QAAQ,EAAE,YAAY;KACvB,CAAC;IAEF,MAAM,0BAA0B,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { FullConfig } from \"@playwright/test\";\nimport { PlaywrightServiceClient } from \"../utils/PlaywrightServiceClient.js\";\nimport { PlaywrightServiceConfig } from \"../common/playwrightServiceConfig.js\";\nimport { getTestRunConfig } from \"../utils/utils.js\";\nimport { CIInfoProvider } from \"../utils/cIInfoProvider.js\";\n\n/**\n * Initializes the Playwright workspaces by setting up authentication and creating a test run.\n *\n * @param config - The full Playwright configuration\n * @returns Promise that resolves when service initialization is complete\n */\nexport async function initializePlaywrightServiceTestRun(config: FullConfig): Promise<void> {\n const playwrightServiceApiClient = new PlaywrightServiceClient();\n const playwrightServiceConfig = PlaywrightServiceConfig.instance;\n const ciConfigInfo = CIInfoProvider.getCIInfo();\n\n const testRunCreatePayload = {\n displayName:\n playwrightServiceConfig.runName === \"\"\n ? playwrightServiceConfig.runId\n : playwrightServiceConfig.runName,\n config: getTestRunConfig(config),\n ciConfig: ciConfigInfo,\n };\n\n await playwrightServiceApiClient.createOrUpdateTestRun(testRunCreatePayload);\n}\n"]}