@validate.qa/runner 1.0.63 → 1.0.64
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.
- package/dist/cli.js +72 -7
- package/dist/cli.mjs +72 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5770,6 +5770,53 @@ var init_analytics_url = __esm({
|
|
|
5770
5770
|
}
|
|
5771
5771
|
});
|
|
5772
5772
|
|
|
5773
|
+
// ../shared/dist/api-endpoint-hygiene.js
|
|
5774
|
+
function isAssetLikePath(path) {
|
|
5775
|
+
return ASSET_SEGMENT_RE.test(path ?? "");
|
|
5776
|
+
}
|
|
5777
|
+
var ASSET_SEGMENT_RE;
|
|
5778
|
+
var init_api_endpoint_hygiene = __esm({
|
|
5779
|
+
"../shared/dist/api-endpoint-hygiene.js"() {
|
|
5780
|
+
"use strict";
|
|
5781
|
+
ASSET_SEGMENT_RE = /(?:^|\/)(?:assets|static|public|img|images|media|fonts|_next|locales)(?:\/|$)/i;
|
|
5782
|
+
}
|
|
5783
|
+
});
|
|
5784
|
+
|
|
5785
|
+
// ../shared/dist/auth-provider-hosts.js
|
|
5786
|
+
function isAuthProviderHost(host) {
|
|
5787
|
+
if (!host)
|
|
5788
|
+
return false;
|
|
5789
|
+
const h = host.toLowerCase();
|
|
5790
|
+
return AUTH_PROVIDER_HOST_SIGNATURES.some((sig) => sig.startsWith(".") ? h.endsWith(sig) : h.includes(sig));
|
|
5791
|
+
}
|
|
5792
|
+
var AUTH_PROVIDER_HOST_SIGNATURES, AUTH_PATH_SIGNATURE;
|
|
5793
|
+
var init_auth_provider_hosts = __esm({
|
|
5794
|
+
"../shared/dist/auth-provider-hosts.js"() {
|
|
5795
|
+
"use strict";
|
|
5796
|
+
AUTH_PROVIDER_HOST_SIGNATURES = [
|
|
5797
|
+
"clerk.",
|
|
5798
|
+
// clerk.<app-domain> — Clerk Frontend API
|
|
5799
|
+
".auth0.com",
|
|
5800
|
+
".okta.com",
|
|
5801
|
+
".oktapreview.com",
|
|
5802
|
+
"cognito-idp.",
|
|
5803
|
+
".amazoncognito.com",
|
|
5804
|
+
"identitytoolkit.googleapis.com",
|
|
5805
|
+
// Firebase Auth
|
|
5806
|
+
"securetoken.googleapis.com",
|
|
5807
|
+
".supabase.co",
|
|
5808
|
+
".stytch.com",
|
|
5809
|
+
".workos.com",
|
|
5810
|
+
".frontegg.com",
|
|
5811
|
+
".kinde.com",
|
|
5812
|
+
"login.microsoftonline.com",
|
|
5813
|
+
".b2clogin.com",
|
|
5814
|
+
"accounts.google.com"
|
|
5815
|
+
];
|
|
5816
|
+
AUTH_PATH_SIGNATURE = /(?:sign[_-]?ins?|first_factor|second_factor|prepare_verification|\/oauth\/|\/authorize\b|\/authenticate\b|openid-connect\/token|\/userinfo\b|\/passwordless)/i;
|
|
5817
|
+
}
|
|
5818
|
+
});
|
|
5819
|
+
|
|
5773
5820
|
// ../shared/dist/index.js
|
|
5774
5821
|
var dist_exports = {};
|
|
5775
5822
|
__export(dist_exports, {
|
|
@@ -5781,6 +5828,8 @@ __export(dist_exports, {
|
|
|
5781
5828
|
API_AUTH_HEADERS_ENV_KEY: () => API_AUTH_HEADERS_ENV_KEY,
|
|
5782
5829
|
API_PREFIX: () => API_PREFIX,
|
|
5783
5830
|
AUDIO_CHUNK_DURATION_MS: () => AUDIO_CHUNK_DURATION_MS,
|
|
5831
|
+
AUTH_PATH_SIGNATURE: () => AUTH_PATH_SIGNATURE,
|
|
5832
|
+
AUTH_PROVIDER_HOST_SIGNATURES: () => AUTH_PROVIDER_HOST_SIGNATURES,
|
|
5784
5833
|
AUTH_STATE_EXPIRY_SKEW_MS: () => AUTH_STATE_EXPIRY_SKEW_MS,
|
|
5785
5834
|
AUTH_TAG_COOKIE_STATE: () => AUTH_TAG_COOKIE_STATE,
|
|
5786
5835
|
AUTH_TAG_LOGIN_BEARER: () => AUTH_TAG_LOGIN_BEARER,
|
|
@@ -5898,6 +5947,8 @@ __export(dist_exports, {
|
|
|
5898
5947
|
isAddonType: () => isAddonType,
|
|
5899
5948
|
isApiTest: () => isApiTest,
|
|
5900
5949
|
isAppOriginResolutionEnabled: () => isAppOriginResolutionEnabled,
|
|
5950
|
+
isAssetLikePath: () => isAssetLikePath,
|
|
5951
|
+
isAuthProviderHost: () => isAuthProviderHost,
|
|
5901
5952
|
isAuthReadinessGuardEnabled: () => isAuthReadinessGuardEnabled,
|
|
5902
5953
|
isAuthTokenName: () => isAuthTokenName,
|
|
5903
5954
|
isBlockedEnvVar: () => isBlockedEnvVar,
|
|
@@ -5998,6 +6049,8 @@ var init_dist = __esm({
|
|
|
5998
6049
|
init_feature_flags();
|
|
5999
6050
|
init_env_flags();
|
|
6000
6051
|
init_analytics_url();
|
|
6052
|
+
init_api_endpoint_hygiene();
|
|
6053
|
+
init_auth_provider_hosts();
|
|
6001
6054
|
}
|
|
6002
6055
|
});
|
|
6003
6056
|
|
|
@@ -85216,6 +85269,7 @@ var require_api_call_redaction = __commonJS({
|
|
|
85216
85269
|
exports2.buildResponseExcerpt = buildResponseExcerpt;
|
|
85217
85270
|
exports2.isTextExcerptable = isTextExcerptable;
|
|
85218
85271
|
exports2.buildApiCallSummary = buildApiCallSummary2;
|
|
85272
|
+
var shared_1 = (init_dist(), __toCommonJS(dist_exports));
|
|
85219
85273
|
exports2.STATIC_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
85220
85274
|
".js",
|
|
85221
85275
|
".css",
|
|
@@ -85233,7 +85287,9 @@ var require_api_call_redaction = __commonJS({
|
|
|
85233
85287
|
".webp",
|
|
85234
85288
|
".avif",
|
|
85235
85289
|
".mp4",
|
|
85236
|
-
".webm"
|
|
85290
|
+
".webm",
|
|
85291
|
+
".lottie",
|
|
85292
|
+
".webmanifest"
|
|
85237
85293
|
]);
|
|
85238
85294
|
exports2.SECURITY_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
85239
85295
|
// CORS & core security
|
|
@@ -85322,6 +85378,8 @@ var require_api_call_redaction = __commonJS({
|
|
|
85322
85378
|
return false;
|
|
85323
85379
|
if (path.includes("/api/") || path.includes("/graphql"))
|
|
85324
85380
|
return true;
|
|
85381
|
+
if (ext.toLowerCase() === ".json" && (0, shared_1.isAssetLikePath)(path))
|
|
85382
|
+
return false;
|
|
85325
85383
|
if (contentType?.includes("application/json"))
|
|
85326
85384
|
return true;
|
|
85327
85385
|
if (contentType?.includes("application/graphql"))
|
|
@@ -86876,6 +86934,7 @@ var require_playwright_native = __commonJS({
|
|
|
86876
86934
|
runDir = (0, path_1.join)(RUNS_DIR, (0, crypto_1.randomUUID)());
|
|
86877
86935
|
await (0, promises_1.mkdir)(runDir, { recursive: true });
|
|
86878
86936
|
const isApiTest2 = playwrightCode.includes("@api") || playwrightCode.includes("{ request }") && !playwrightCode.includes("{ page");
|
|
86937
|
+
const configBaseUrl = isApiTest2 && options.apiBaseUrl ? options.apiBaseUrl : baseUrl;
|
|
86879
86938
|
const usesRealInboxWait = !isApiTest2 && (0, inbox_stamp_js_1.codeUsesInboxHelper)(playwrightCode);
|
|
86880
86939
|
const selfProvisionsRegistration = !isApiTest2 && (0, inbox_stamp_js_1.codeSelfProvisionsRegistration)(playwrightCode);
|
|
86881
86940
|
const effectiveStandingMode = isApiTest2 ? authStandingMode ?? "legacy-if-configured" : "none";
|
|
@@ -87079,7 +87138,7 @@ test.afterEach(async ({ page }, testInfo) => {
|
|
|
87079
87138
|
if (!importMatch) {
|
|
87080
87139
|
logs2.push("\u26A0 Could not find @playwright/test import - animation disabling NOT injected");
|
|
87081
87140
|
}
|
|
87082
|
-
const useScopedApiHeaders = isApiTest2 && !!resolvedExtraHeaders && !!importMatch && !!
|
|
87141
|
+
const useScopedApiHeaders = isApiTest2 && !!resolvedExtraHeaders && !!importMatch && !!configBaseUrl;
|
|
87083
87142
|
const authDelivery = { standingHeadersConfigured: !!resolvedExtraHeaders, standingHeadersInjected: useScopedApiHeaders };
|
|
87084
87143
|
if (resolvedExtraHeaders && !useScopedApiHeaders) {
|
|
87085
87144
|
logs2.push("\u26A0 Standing API auth headers were configured but could not be installed origin-scoped \u2014 failing closed (no global fallback).");
|
|
@@ -87100,10 +87159,10 @@ test.afterEach(async ({ page }, testInfo) => {
|
|
|
87100
87159
|
}
|
|
87101
87160
|
await (0, promises_1.writeFile)((0, path_1.join)(runDir, "test.spec.ts"), instrumentedCode);
|
|
87102
87161
|
if (useScopedApiHeaders && resolvedExtraHeaders) {
|
|
87103
|
-
await (0, promises_1.writeFile)((0, path_1.join)(runDir, "qa-api-fixtures.ts"), (0, api_auth_headers_js_1.buildOriginScopedApiFixtures)(resolvedExtraHeaders,
|
|
87162
|
+
await (0, promises_1.writeFile)((0, path_1.join)(runDir, "qa-api-fixtures.ts"), (0, api_auth_headers_js_1.buildOriginScopedApiFixtures)(resolvedExtraHeaders, configBaseUrl));
|
|
87104
87163
|
}
|
|
87105
87164
|
const headless = (0, shared_1.parseBoolFlag)(process.env.PLAYWRIGHT_HEADLESS) || process.env.NODE_ENV === "production" || IS_CLOUD2;
|
|
87106
|
-
logs2.push(`\u2699\uFE0F Config: baseURL=${JSON.stringify(
|
|
87165
|
+
logs2.push(`\u2699\uFE0F Config: baseURL=${JSON.stringify(configBaseUrl)}, headless=${headless}${isApiTest2 ? ", API mode (no screenshot/video)" : ""}${configBaseUrl !== baseUrl ? ` (elected @api origin; app BASE_URL ${JSON.stringify(baseUrl)})` : ""}`);
|
|
87107
87166
|
const absTestDir = runDir.replace(/\\/g, "/");
|
|
87108
87167
|
const absResultsFile = (0, path_1.join)(runDir, "results.json").replace(/\\/g, "/");
|
|
87109
87168
|
const absOutputDir = (0, path_1.join)(runDir, "test-results").replace(/\\/g, "/");
|
|
@@ -87127,7 +87186,7 @@ module.exports = {
|
|
|
87127
87186
|
timeout: ${usesRealInboxWait ? 24e4 : 6e4},
|
|
87128
87187
|
retries: 0,
|
|
87129
87188
|
use: {
|
|
87130
|
-
baseURL: ${JSON.stringify(
|
|
87189
|
+
baseURL: ${JSON.stringify(configBaseUrl)},
|
|
87131
87190
|
${storageStateLine}
|
|
87132
87191
|
${extraHeadersLine}
|
|
87133
87192
|
browserName: 'chromium',
|
|
@@ -87187,6 +87246,9 @@ module.exports = {
|
|
|
87187
87246
|
}
|
|
87188
87247
|
}
|
|
87189
87248
|
const childTestVariables = { ...testVariables ?? {} };
|
|
87249
|
+
if (isApiTest2 && options.apiBaseUrl && !childTestVariables["API_BASE_URL"]) {
|
|
87250
|
+
childTestVariables["API_BASE_URL"] = options.apiBaseUrl;
|
|
87251
|
+
}
|
|
87190
87252
|
const trustedRuntimeEnv = {
|
|
87191
87253
|
...isolation.env,
|
|
87192
87254
|
// Generated callbacks receive only a random loopback capability. The global
|
|
@@ -350858,7 +350920,7 @@ var require_package4 = __commonJS({
|
|
|
350858
350920
|
"package.json"(exports2, module2) {
|
|
350859
350921
|
module2.exports = {
|
|
350860
350922
|
name: "@validate.qa/runner",
|
|
350861
|
-
version: "1.0.
|
|
350923
|
+
version: "1.0.64",
|
|
350862
350924
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
350863
350925
|
bin: {
|
|
350864
350926
|
"validate-runner": "dist/cli.js"
|
|
@@ -358454,6 +358516,7 @@ async function executeRun(run2, opts, headers, requestLiveBrowserHeartbeat = ()
|
|
|
358454
358516
|
const runNativeWithLiveBrowser = (nativeOptions) => (0, import_runner_core.executeTestViaNativePlaywright)({
|
|
358455
358517
|
authStandingMode: authPlan.standingHeadersMode,
|
|
358456
358518
|
storageStatePath: wrapperStorageStatePath,
|
|
358519
|
+
apiBaseUrl: run2.apiBaseUrl,
|
|
358457
358520
|
...nativeOptions,
|
|
358458
358521
|
liveBrowserHandle,
|
|
358459
358522
|
onLiveBrowserSnapshot: requestLiveBrowserHeartbeat
|
|
@@ -358864,7 +358927,9 @@ ${finalVerifyResult.logs ?? ""}`;
|
|
|
358864
358927
|
} else {
|
|
358865
358928
|
const xo = resolveCrossOriginConfigOverride({
|
|
358866
358929
|
appOriginEnabled: isAppOriginResolutionEnabled(),
|
|
358867
|
-
|
|
358930
|
+
// An @api run anchored on an elected execution origin must be judged against THAT
|
|
358931
|
+
// origin, or a correctly-anchored call reads as "wrong origin" (gate-review tweak).
|
|
358932
|
+
baseUrl: run2.apiBaseUrl ?? run2.baseUrl,
|
|
358868
358933
|
composedError,
|
|
358869
358934
|
verdicts: enrichedSteps.map((s) => s.verdict),
|
|
358870
358935
|
apiCalls: rawSteps.flatMap((s) => s.apiCalls ?? []),
|
package/dist/cli.mjs
CHANGED
|
@@ -5775,6 +5775,53 @@ var init_analytics_url = __esm({
|
|
|
5775
5775
|
}
|
|
5776
5776
|
});
|
|
5777
5777
|
|
|
5778
|
+
// ../shared/dist/api-endpoint-hygiene.js
|
|
5779
|
+
function isAssetLikePath(path) {
|
|
5780
|
+
return ASSET_SEGMENT_RE.test(path ?? "");
|
|
5781
|
+
}
|
|
5782
|
+
var ASSET_SEGMENT_RE;
|
|
5783
|
+
var init_api_endpoint_hygiene = __esm({
|
|
5784
|
+
"../shared/dist/api-endpoint-hygiene.js"() {
|
|
5785
|
+
"use strict";
|
|
5786
|
+
ASSET_SEGMENT_RE = /(?:^|\/)(?:assets|static|public|img|images|media|fonts|_next|locales)(?:\/|$)/i;
|
|
5787
|
+
}
|
|
5788
|
+
});
|
|
5789
|
+
|
|
5790
|
+
// ../shared/dist/auth-provider-hosts.js
|
|
5791
|
+
function isAuthProviderHost(host) {
|
|
5792
|
+
if (!host)
|
|
5793
|
+
return false;
|
|
5794
|
+
const h = host.toLowerCase();
|
|
5795
|
+
return AUTH_PROVIDER_HOST_SIGNATURES.some((sig) => sig.startsWith(".") ? h.endsWith(sig) : h.includes(sig));
|
|
5796
|
+
}
|
|
5797
|
+
var AUTH_PROVIDER_HOST_SIGNATURES, AUTH_PATH_SIGNATURE;
|
|
5798
|
+
var init_auth_provider_hosts = __esm({
|
|
5799
|
+
"../shared/dist/auth-provider-hosts.js"() {
|
|
5800
|
+
"use strict";
|
|
5801
|
+
AUTH_PROVIDER_HOST_SIGNATURES = [
|
|
5802
|
+
"clerk.",
|
|
5803
|
+
// clerk.<app-domain> — Clerk Frontend API
|
|
5804
|
+
".auth0.com",
|
|
5805
|
+
".okta.com",
|
|
5806
|
+
".oktapreview.com",
|
|
5807
|
+
"cognito-idp.",
|
|
5808
|
+
".amazoncognito.com",
|
|
5809
|
+
"identitytoolkit.googleapis.com",
|
|
5810
|
+
// Firebase Auth
|
|
5811
|
+
"securetoken.googleapis.com",
|
|
5812
|
+
".supabase.co",
|
|
5813
|
+
".stytch.com",
|
|
5814
|
+
".workos.com",
|
|
5815
|
+
".frontegg.com",
|
|
5816
|
+
".kinde.com",
|
|
5817
|
+
"login.microsoftonline.com",
|
|
5818
|
+
".b2clogin.com",
|
|
5819
|
+
"accounts.google.com"
|
|
5820
|
+
];
|
|
5821
|
+
AUTH_PATH_SIGNATURE = /(?:sign[_-]?ins?|first_factor|second_factor|prepare_verification|\/oauth\/|\/authorize\b|\/authenticate\b|openid-connect\/token|\/userinfo\b|\/passwordless)/i;
|
|
5822
|
+
}
|
|
5823
|
+
});
|
|
5824
|
+
|
|
5778
5825
|
// ../shared/dist/index.js
|
|
5779
5826
|
var dist_exports = {};
|
|
5780
5827
|
__export(dist_exports, {
|
|
@@ -5786,6 +5833,8 @@ __export(dist_exports, {
|
|
|
5786
5833
|
API_AUTH_HEADERS_ENV_KEY: () => API_AUTH_HEADERS_ENV_KEY,
|
|
5787
5834
|
API_PREFIX: () => API_PREFIX,
|
|
5788
5835
|
AUDIO_CHUNK_DURATION_MS: () => AUDIO_CHUNK_DURATION_MS,
|
|
5836
|
+
AUTH_PATH_SIGNATURE: () => AUTH_PATH_SIGNATURE,
|
|
5837
|
+
AUTH_PROVIDER_HOST_SIGNATURES: () => AUTH_PROVIDER_HOST_SIGNATURES,
|
|
5789
5838
|
AUTH_STATE_EXPIRY_SKEW_MS: () => AUTH_STATE_EXPIRY_SKEW_MS,
|
|
5790
5839
|
AUTH_TAG_COOKIE_STATE: () => AUTH_TAG_COOKIE_STATE,
|
|
5791
5840
|
AUTH_TAG_LOGIN_BEARER: () => AUTH_TAG_LOGIN_BEARER,
|
|
@@ -5903,6 +5952,8 @@ __export(dist_exports, {
|
|
|
5903
5952
|
isAddonType: () => isAddonType,
|
|
5904
5953
|
isApiTest: () => isApiTest,
|
|
5905
5954
|
isAppOriginResolutionEnabled: () => isAppOriginResolutionEnabled,
|
|
5955
|
+
isAssetLikePath: () => isAssetLikePath,
|
|
5956
|
+
isAuthProviderHost: () => isAuthProviderHost,
|
|
5906
5957
|
isAuthReadinessGuardEnabled: () => isAuthReadinessGuardEnabled,
|
|
5907
5958
|
isAuthTokenName: () => isAuthTokenName,
|
|
5908
5959
|
isBlockedEnvVar: () => isBlockedEnvVar,
|
|
@@ -6003,6 +6054,8 @@ var init_dist = __esm({
|
|
|
6003
6054
|
init_feature_flags();
|
|
6004
6055
|
init_env_flags();
|
|
6005
6056
|
init_analytics_url();
|
|
6057
|
+
init_api_endpoint_hygiene();
|
|
6058
|
+
init_auth_provider_hosts();
|
|
6006
6059
|
}
|
|
6007
6060
|
});
|
|
6008
6061
|
|
|
@@ -85221,6 +85274,7 @@ var require_api_call_redaction = __commonJS({
|
|
|
85221
85274
|
exports.buildResponseExcerpt = buildResponseExcerpt;
|
|
85222
85275
|
exports.isTextExcerptable = isTextExcerptable;
|
|
85223
85276
|
exports.buildApiCallSummary = buildApiCallSummary2;
|
|
85277
|
+
var shared_1 = (init_dist(), __toCommonJS(dist_exports));
|
|
85224
85278
|
exports.STATIC_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
85225
85279
|
".js",
|
|
85226
85280
|
".css",
|
|
@@ -85238,7 +85292,9 @@ var require_api_call_redaction = __commonJS({
|
|
|
85238
85292
|
".webp",
|
|
85239
85293
|
".avif",
|
|
85240
85294
|
".mp4",
|
|
85241
|
-
".webm"
|
|
85295
|
+
".webm",
|
|
85296
|
+
".lottie",
|
|
85297
|
+
".webmanifest"
|
|
85242
85298
|
]);
|
|
85243
85299
|
exports.SECURITY_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
85244
85300
|
// CORS & core security
|
|
@@ -85327,6 +85383,8 @@ var require_api_call_redaction = __commonJS({
|
|
|
85327
85383
|
return false;
|
|
85328
85384
|
if (path.includes("/api/") || path.includes("/graphql"))
|
|
85329
85385
|
return true;
|
|
85386
|
+
if (ext.toLowerCase() === ".json" && (0, shared_1.isAssetLikePath)(path))
|
|
85387
|
+
return false;
|
|
85330
85388
|
if (contentType?.includes("application/json"))
|
|
85331
85389
|
return true;
|
|
85332
85390
|
if (contentType?.includes("application/graphql"))
|
|
@@ -86881,6 +86939,7 @@ var require_playwright_native = __commonJS({
|
|
|
86881
86939
|
runDir = (0, path_1.join)(RUNS_DIR, (0, crypto_1.randomUUID)());
|
|
86882
86940
|
await (0, promises_1.mkdir)(runDir, { recursive: true });
|
|
86883
86941
|
const isApiTest2 = playwrightCode.includes("@api") || playwrightCode.includes("{ request }") && !playwrightCode.includes("{ page");
|
|
86942
|
+
const configBaseUrl = isApiTest2 && options.apiBaseUrl ? options.apiBaseUrl : baseUrl;
|
|
86884
86943
|
const usesRealInboxWait = !isApiTest2 && (0, inbox_stamp_js_1.codeUsesInboxHelper)(playwrightCode);
|
|
86885
86944
|
const selfProvisionsRegistration = !isApiTest2 && (0, inbox_stamp_js_1.codeSelfProvisionsRegistration)(playwrightCode);
|
|
86886
86945
|
const effectiveStandingMode = isApiTest2 ? authStandingMode ?? "legacy-if-configured" : "none";
|
|
@@ -87084,7 +87143,7 @@ test.afterEach(async ({ page }, testInfo) => {
|
|
|
87084
87143
|
if (!importMatch) {
|
|
87085
87144
|
logs2.push("\u26A0 Could not find @playwright/test import - animation disabling NOT injected");
|
|
87086
87145
|
}
|
|
87087
|
-
const useScopedApiHeaders = isApiTest2 && !!resolvedExtraHeaders && !!importMatch && !!
|
|
87146
|
+
const useScopedApiHeaders = isApiTest2 && !!resolvedExtraHeaders && !!importMatch && !!configBaseUrl;
|
|
87088
87147
|
const authDelivery = { standingHeadersConfigured: !!resolvedExtraHeaders, standingHeadersInjected: useScopedApiHeaders };
|
|
87089
87148
|
if (resolvedExtraHeaders && !useScopedApiHeaders) {
|
|
87090
87149
|
logs2.push("\u26A0 Standing API auth headers were configured but could not be installed origin-scoped \u2014 failing closed (no global fallback).");
|
|
@@ -87105,10 +87164,10 @@ test.afterEach(async ({ page }, testInfo) => {
|
|
|
87105
87164
|
}
|
|
87106
87165
|
await (0, promises_1.writeFile)((0, path_1.join)(runDir, "test.spec.ts"), instrumentedCode);
|
|
87107
87166
|
if (useScopedApiHeaders && resolvedExtraHeaders) {
|
|
87108
|
-
await (0, promises_1.writeFile)((0, path_1.join)(runDir, "qa-api-fixtures.ts"), (0, api_auth_headers_js_1.buildOriginScopedApiFixtures)(resolvedExtraHeaders,
|
|
87167
|
+
await (0, promises_1.writeFile)((0, path_1.join)(runDir, "qa-api-fixtures.ts"), (0, api_auth_headers_js_1.buildOriginScopedApiFixtures)(resolvedExtraHeaders, configBaseUrl));
|
|
87109
87168
|
}
|
|
87110
87169
|
const headless = (0, shared_1.parseBoolFlag)(process.env.PLAYWRIGHT_HEADLESS) || process.env.NODE_ENV === "production" || IS_CLOUD2;
|
|
87111
|
-
logs2.push(`\u2699\uFE0F Config: baseURL=${JSON.stringify(
|
|
87170
|
+
logs2.push(`\u2699\uFE0F Config: baseURL=${JSON.stringify(configBaseUrl)}, headless=${headless}${isApiTest2 ? ", API mode (no screenshot/video)" : ""}${configBaseUrl !== baseUrl ? ` (elected @api origin; app BASE_URL ${JSON.stringify(baseUrl)})` : ""}`);
|
|
87112
87171
|
const absTestDir = runDir.replace(/\\/g, "/");
|
|
87113
87172
|
const absResultsFile = (0, path_1.join)(runDir, "results.json").replace(/\\/g, "/");
|
|
87114
87173
|
const absOutputDir = (0, path_1.join)(runDir, "test-results").replace(/\\/g, "/");
|
|
@@ -87132,7 +87191,7 @@ module.exports = {
|
|
|
87132
87191
|
timeout: ${usesRealInboxWait ? 24e4 : 6e4},
|
|
87133
87192
|
retries: 0,
|
|
87134
87193
|
use: {
|
|
87135
|
-
baseURL: ${JSON.stringify(
|
|
87194
|
+
baseURL: ${JSON.stringify(configBaseUrl)},
|
|
87136
87195
|
${storageStateLine}
|
|
87137
87196
|
${extraHeadersLine}
|
|
87138
87197
|
browserName: 'chromium',
|
|
@@ -87192,6 +87251,9 @@ module.exports = {
|
|
|
87192
87251
|
}
|
|
87193
87252
|
}
|
|
87194
87253
|
const childTestVariables = { ...testVariables ?? {} };
|
|
87254
|
+
if (isApiTest2 && options.apiBaseUrl && !childTestVariables["API_BASE_URL"]) {
|
|
87255
|
+
childTestVariables["API_BASE_URL"] = options.apiBaseUrl;
|
|
87256
|
+
}
|
|
87195
87257
|
const trustedRuntimeEnv = {
|
|
87196
87258
|
...isolation.env,
|
|
87197
87259
|
// Generated callbacks receive only a random loopback capability. The global
|
|
@@ -350863,7 +350925,7 @@ var require_package4 = __commonJS({
|
|
|
350863
350925
|
"package.json"(exports, module) {
|
|
350864
350926
|
module.exports = {
|
|
350865
350927
|
name: "@validate.qa/runner",
|
|
350866
|
-
version: "1.0.
|
|
350928
|
+
version: "1.0.64",
|
|
350867
350929
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
350868
350930
|
bin: {
|
|
350869
350931
|
"validate-runner": "dist/cli.js"
|
|
@@ -358462,6 +358524,7 @@ async function executeRun(run2, opts, headers, requestLiveBrowserHeartbeat = ()
|
|
|
358462
358524
|
const runNativeWithLiveBrowser = (nativeOptions) => (0, import_runner_core.executeTestViaNativePlaywright)({
|
|
358463
358525
|
authStandingMode: authPlan.standingHeadersMode,
|
|
358464
358526
|
storageStatePath: wrapperStorageStatePath,
|
|
358527
|
+
apiBaseUrl: run2.apiBaseUrl,
|
|
358465
358528
|
...nativeOptions,
|
|
358466
358529
|
liveBrowserHandle,
|
|
358467
358530
|
onLiveBrowserSnapshot: requestLiveBrowserHeartbeat
|
|
@@ -358872,7 +358935,9 @@ ${finalVerifyResult.logs ?? ""}`;
|
|
|
358872
358935
|
} else {
|
|
358873
358936
|
const xo = resolveCrossOriginConfigOverride({
|
|
358874
358937
|
appOriginEnabled: isAppOriginResolutionEnabled(),
|
|
358875
|
-
|
|
358938
|
+
// An @api run anchored on an elected execution origin must be judged against THAT
|
|
358939
|
+
// origin, or a correctly-anchored call reads as "wrong origin" (gate-review tweak).
|
|
358940
|
+
baseUrl: run2.apiBaseUrl ?? run2.baseUrl,
|
|
358876
358941
|
composedError,
|
|
358877
358942
|
verdicts: enrichedSteps.map((s) => s.verdict),
|
|
358878
358943
|
apiCalls: rawSteps.flatMap((s) => s.apiCalls ?? []),
|
package/package.json
CHANGED