Skip to content

Commit 42be6dc

Browse files
author
Kevin White
committed
Fixed failing tests
1 parent fae7a6e commit 42be6dc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

webview-ui/src/components/settings/providers/Bedrock.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ export const Bedrock = ({ apiConfiguration, setApiConfigurationField, selectedMo
140140
style={{ width: "100%", marginTop: 3, marginBottom: 5 }}
141141
type="url"
142142
onInput={handleInputChange("awsBedrockEndpoint")}
143-
placeholder="https://vpce-xxx.bedrock.region.vpce.amazonaws.com/"
143+
placeholder="Enter VPC Endpoint URL (optional)"
144+
data-testid="vpc-endpoint-input"
144145
/>
145146
)}
146147
</>

webview-ui/src/components/settings/providers/__tests__/Bedrock.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jest.mock("vscrui", () => ({
2020

2121
// Mock the VSCodeTextField component
2222
jest.mock("@vscode/webview-ui-toolkit/react", () => ({
23-
VSCodeTextField: ({ children, value, onInput, placeholder, className, style }: any) => {
24-
// Special case for VPC endpoint field
25-
if (placeholder === "Enter VPC Endpoint URL (optional)") {
23+
VSCodeTextField: ({ children, value, onInput, placeholder, className, style, "data-testid": dataTestId }: any) => {
24+
// Special case for VPC endpoint field with data-testid
25+
if (dataTestId === "vpc-endpoint-input") {
2626
return (
2727
<div data-testid="vpc-endpoint-text-field" className={className} style={style}>
2828
{children}

0 commit comments

Comments
 (0)