Skip to content

Commit

Permalink
Update frontend/__tests__/utils/check-hardcoded-strings.test.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: sp.wack <[email protected]>
  • Loading branch information
neubig and amanape authored Jan 11, 2025
1 parent 79bbe50 commit c8f730d
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions frontend/__tests__/utils/check-hardcoded-strings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,8 @@ vi.mock("react-i18next", () => ({

describe("Check for hardcoded English strings", () => {
test("InteractiveChatBox should not have hardcoded English strings", () => {
const { container } = render(
<InteractiveChatBox
onSubmit={() => {}}
onStop={() => {}}
/>
);

// Get all text content
const text = container.textContent;

// List of English strings that should be translated
const hardcodedStrings = [
"What do you want to build?",
];

// Check each string
hardcodedStrings.forEach(str => {
expect(text).not.toContain(str);
});
render(<InteractiveChatBox onSubmit={() => {}} onStop={() => {}} />);
expect(screen.queryByText("What do you want to build?")).not.toBeInTheDocument();
});

test("ChatInput should use translation key for placeholder", () => {
Expand Down

0 comments on commit c8f730d

Please sign in to comment.