mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
round 3 of locale CI fixes
This commit is contained in:
parent
724a2f2350
commit
8a9240000c
2 changed files with 10 additions and 7 deletions
|
|
@ -127,7 +127,7 @@ describe("PackageManagerView", () => {
|
|||
})
|
||||
|
||||
// Should show items
|
||||
expect(screen.getByText("2 items total")).toBeInTheDocument()
|
||||
expect(screen.getByText("2 items found")).toBeInTheDocument()
|
||||
expect(screen.getByText("Test Package")).toBeInTheDocument()
|
||||
expect(screen.getByText("Another Package")).toBeInTheDocument()
|
||||
})
|
||||
|
|
@ -175,7 +175,7 @@ describe("PackageManagerView", () => {
|
|||
})
|
||||
|
||||
// Verify initial items are shown
|
||||
expect(screen.getByText("3 items total")).toBeInTheDocument()
|
||||
expect(screen.getByText("3 items found")).toBeInTheDocument()
|
||||
expect(screen.getByText("MCP Server 1")).toBeInTheDocument()
|
||||
expect(screen.getByText("Mode 1")).toBeInTheDocument()
|
||||
expect(screen.getByText("MCP Server 2")).toBeInTheDocument()
|
||||
|
|
|
|||
|
|
@ -70,7 +70,12 @@ describe("PackageManagerItemCard", () => {
|
|||
return element?.textContent === "by Test Author"
|
||||
}),
|
||||
).toBeInTheDocument()
|
||||
expect(screen.getByText(/Package/i)).toBeInTheDocument() // Using case-insensitive regex since translations might vary in case
|
||||
// Check for the type label specifically
|
||||
expect(
|
||||
screen.getByText((content, element) => {
|
||||
return Boolean(element?.className.includes("rounded-full") && content === "Package")
|
||||
}),
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("should render tags", () => {
|
||||
|
|
@ -126,8 +131,7 @@ describe("PackageManagerItemCard", () => {
|
|||
path: "some/path",
|
||||
}
|
||||
renderWithProviders(<PackageManagerItemCard {...defaultProps} item={itemWithGitPath} />)
|
||||
|
||||
const button = screen.getByRole("button", { name: /Source/i })
|
||||
const button = screen.getByRole("button", { name: /View/i })
|
||||
fireEvent.click(button)
|
||||
|
||||
expect(mockPostMessage).toHaveBeenCalledWith({
|
||||
|
|
@ -156,7 +160,7 @@ describe("PackageManagerItemCard", () => {
|
|||
|
||||
// Find the source button by its aria-label
|
||||
const button = screen.getByRole("button", {
|
||||
name: "Source",
|
||||
name: "View",
|
||||
})
|
||||
expect(button.querySelector(".codicon-link-external")).toBeInTheDocument()
|
||||
expect(button).toHaveTextContent(/Source/i)
|
||||
|
|
@ -185,7 +189,6 @@ describe("PackageManagerItemCard", () => {
|
|||
// These use the type-group translations
|
||||
expect(screen.getByText((content, element) => element?.textContent === "MCP Servers")).toBeInTheDocument()
|
||||
expect(screen.getByText((content, element) => element?.textContent === "Modes")).toBeInTheDocument()
|
||||
expect(screen.getByText("Modes")).toBeInTheDocument()
|
||||
|
||||
// Check for items using getByRole and textContent
|
||||
const items = screen.getAllByRole("listitem")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue