Skip to content

Commit 6b74099

Browse files
committed
fix(ci): repair test typecheck and UI lint
1 parent ae8cb29 commit 6b74099

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

‎test/scripts/openclaw-npm-extended-stable-workflow.test.ts‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ describe("minimal npm extended-stable workflow", () => {
119119
parsed.jobs?.preflight_openclaw_npm,
120120
"Checkout trusted Plugin SDK API tooling",
121121
);
122+
const publishProvenanceRun = publishProvenance.run;
123+
if (!publishProvenanceRun) {
124+
throw new Error("Verify prepared tarball provenance is missing its run script");
125+
}
122126

123127
expect(input).toEqual({
124128
default: "",
@@ -141,28 +145,28 @@ describe("minimal npm extended-stable workflow", () => {
141145
expect(preflightDiff.run).toContain('git -C "$tooling_dir" status --porcelain');
142146
expect(preflightDiff.run).not.toContain('pkg.scripts?.["plugin-sdk:api:diff"]');
143147
expect(preflightDiff.run).toContain('pnpm --dir "$tooling_dir" run plugin-sdk:api:diff');
144-
expect(publishProvenance.run).toContain("plugin-sdk-api-release-evidence.mjs");
145-
expect(publishProvenance.run).toContain('--acknowledge "$PLUGIN_SDK_API_ACKNOWLEDGEMENT"');
146-
expect(publishProvenance.run).toContain('npm view "openclaw@${RELEASE_NPM_DIST_TAG}" version');
147-
expect(publishProvenance.run).toContain(
148+
expect(publishProvenanceRun).toContain("plugin-sdk-api-release-evidence.mjs");
149+
expect(publishProvenanceRun).toContain('--acknowledge "$PLUGIN_SDK_API_ACKNOWLEDGEMENT"');
150+
expect(publishProvenanceRun).toContain('npm view "openclaw@${RELEASE_NPM_DIST_TAG}" version');
151+
expect(publishProvenanceRun).toContain(
148152
'git -C trusted-workflow rev-parse --verify "refs/tags/${current_selector_ref}^{commit}"',
149153
);
150-
expect(publishProvenance.run).not.toContain("git fetch");
151-
expect(publishProvenance.run).toContain('--current-selector-ref "$current_selector_ref"');
152-
expect(publishProvenance.run).toContain('--current-selector-sha "$current_selector_sha"');
153-
expect(publishProvenance.run).toContain('--workflow-sha "$PREFLIGHT_WORKFLOW_SHA"');
154+
expect(publishProvenanceRun).not.toContain("git fetch");
155+
expect(publishProvenanceRun).toContain('--current-selector-ref "$current_selector_ref"');
156+
expect(publishProvenanceRun).toContain('--current-selector-sha "$current_selector_sha"');
157+
expect(publishProvenanceRun).toContain('--workflow-sha "$PREFLIGHT_WORKFLOW_SHA"');
154158
expect(downloadPreflight.run).toContain(
155159
'"plugin-sdk-api-release-diff-${PREFLIGHT_RUN_ID}-${PREFLIGHT_RUN_ATTEMPT}"',
156160
);
157-
expect(publishProvenance.run).toContain(
161+
expect(publishProvenanceRun).toContain(
158162
"Prepared Plugin SDK API evidence does not match its immutable artifact",
159163
);
160164
expect(
161-
publishProvenance.run.indexOf(
165+
publishProvenanceRun.indexOf(
162166
"Prepared Plugin SDK API evidence does not match its immutable artifact",
163167
),
164168
).toBeLessThan(
165-
publishProvenance.run.indexOf('npm view "openclaw@${RELEASE_NPM_DIST_TAG}" version'),
169+
publishProvenanceRun.indexOf('npm view "openclaw@${RELEASE_NPM_DIST_TAG}" version'),
166170
);
167171
expect(verifyPreflightRun.run).toContain(
168172
'"$preflight_head_branch" == "$EXPECTED_EXTENDED_STABLE_BRANCH"',

‎ui/src/test-helpers/control-ui-e2e.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,15 +2743,15 @@ async function captureControlUiE2eFailureDiagnosticsUnsafe(
27432743
),
27442744
};
27452745
});
2746-
} catch (error) {
2747-
captureErrors.push(`page.evaluate: ${String(error)}`);
2746+
} catch (evaluateError) {
2747+
captureErrors.push(`page.evaluate: ${String(evaluateError)}`);
27482748
}
27492749
let screenshotWritten = false;
27502750
try {
27512751
await page.screenshot({ fullPage: true, path: screenshotPath });
27522752
screenshotWritten = true;
2753-
} catch (error) {
2754-
captureErrors.push(`page.screenshot: ${String(error)}`);
2753+
} catch (screenshotError) {
2754+
captureErrors.push(`page.screenshot: ${String(screenshotError)}`);
27552755
}
27562756
const report = {
27572757
schemaVersion: 2,

0 commit comments

Comments
 (0)