refactor: share instrument search presentation
This commit is contained in:
@@ -54,8 +54,13 @@ describe("AppBreadcrumbs", () => {
|
||||
expect(screen.queryByRole("link")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("links to the account hierarchy from operations", () => {
|
||||
renderBreadcrumbs("/accounts/account-1/operations", [
|
||||
it.each([
|
||||
["operations", "Операции"],
|
||||
["OPERATIONS", "Операции"],
|
||||
["events", "Будущие события"],
|
||||
["income", "Пассивный доход"],
|
||||
])("links to the account hierarchy from %s", (section, title) => {
|
||||
renderBreadcrumbs(`/accounts/account-1/${section}`, [
|
||||
{ id: "account-1", name: "ИИС" },
|
||||
]);
|
||||
|
||||
@@ -66,7 +71,7 @@ describe("AppBreadcrumbs", () => {
|
||||
"href",
|
||||
"/accounts/account-1",
|
||||
);
|
||||
expect(screen.getByText("Операции")).toHaveAttribute(
|
||||
expect(screen.getByText(title)).toHaveAttribute(
|
||||
"aria-current",
|
||||
"page",
|
||||
);
|
||||
@@ -86,7 +91,11 @@ describe("AppBreadcrumbs", () => {
|
||||
expect(screen.queryByText("account-1")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it.each(["/login", "/unknown"])("does not render on %s", (path) => {
|
||||
it.each([
|
||||
"/login",
|
||||
"/unknown",
|
||||
"/accounts/account-1/unknown",
|
||||
])("does not render on %s", (path) => {
|
||||
renderBreadcrumbs(path);
|
||||
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user