fix(test): align Bedrock API Key test assertions with preset implementation

The API Key preset was refactored to use standard UI input (apiKey: "")
instead of template variables, but the tests were not updated accordingly.
This commit is contained in:
Jason
2026-02-24 20:41:15 +08:00
parent f6cee96394
commit 5816ca8ae3
+3 -4
View File
@@ -51,9 +51,9 @@ describe("AWS Bedrock Provider Presets", () => {
expect(bedrockApiKey).toBeDefined();
});
it("API Key preset should have apiKey template and AWS env variables", () => {
it("API Key preset should have apiKey field and AWS env variables", () => {
const config = bedrockApiKey!.settingsConfig as any;
expect(config).toHaveProperty("apiKey", "${BEDROCK_API_KEY}");
expect(config).toHaveProperty("apiKey", "");
expect(config.env).toHaveProperty("AWS_REGION");
expect(config.env).toHaveProperty("CLAUDE_CODE_USE_BEDROCK", "1");
});
@@ -64,9 +64,8 @@ describe("AWS Bedrock Provider Presets", () => {
expect(env).not.toHaveProperty("AWS_SECRET_ACCESS_KEY");
});
it("API Key preset should have template values for API key and region", () => {
it("API Key preset should have template values for region only", () => {
expect(bedrockApiKey!.templateValues).toBeDefined();
expect(bedrockApiKey!.templateValues!.BEDROCK_API_KEY).toBeDefined();
expect(bedrockApiKey!.templateValues!.AWS_REGION).toBeDefined();
expect(bedrockApiKey!.templateValues!.AWS_REGION.editorValue).toBe(
"us-west-2",