feat: add manual bank card screens
Add cards, operations, refunds, categories and monthly summaries with Mantine date controls. Derive banking types from runtime OpenAPI. Cover recovery and session isolation.
This commit is contained in:
@@ -32,6 +32,13 @@ const bondQueryKey = apiQueryClient.queryOptions(
|
||||
"/api/v1/bonds/{uid}/position",
|
||||
{ params: { path: { uid: "e6123145-9665-43e0-8413-cd61b8aa9b13" } } },
|
||||
).queryKey;
|
||||
const bankCardsQueryKey = apiQueryClient.queryOptions(
|
||||
"get",
|
||||
"/api/v1/bank-cards",
|
||||
{
|
||||
params: { query: { includeArchived: "false" } },
|
||||
},
|
||||
).queryKey;
|
||||
const unrelatedQueryKey = apiQueryClient.queryOptions(
|
||||
"get",
|
||||
"/api/v1/auth/me",
|
||||
@@ -66,6 +73,7 @@ function seededClient() {
|
||||
client.setQueryData(stockQueryKey, { source: "previous-connection" });
|
||||
client.setQueryData(bondQueryKey, { source: "previous-connection" });
|
||||
client.setQueryData(unrelatedQueryKey, { id: "user-1" });
|
||||
client.setQueryData(bankCardsQueryKey, [{ id: "bank-card-1" }]);
|
||||
return client;
|
||||
}
|
||||
|
||||
@@ -86,6 +94,10 @@ describe("TbankConnectionSection", () => {
|
||||
).toBeInTheDocument(),
|
||||
);
|
||||
expect(client.getQueryData(brokerageAccountsQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(bankCardsQueryKey)).toEqual([
|
||||
{ id: "bank-card-1" },
|
||||
]);
|
||||
expect(client.getQueryState(bankCardsQueryKey)?.isInvalidated).toBe(false);
|
||||
expect(client.getQueryData(portfolioQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(stockQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(bondQueryKey)).toBeUndefined();
|
||||
@@ -114,6 +126,10 @@ describe("TbankConnectionSection", () => {
|
||||
expect(client.getQueryData(portfolioQueryKey)).toBeUndefined(),
|
||||
);
|
||||
expect(client.getQueryData(brokerageAccountsQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(bankCardsQueryKey)).toEqual([
|
||||
{ id: "bank-card-1" },
|
||||
]);
|
||||
expect(client.getQueryState(bankCardsQueryKey)?.isInvalidated).toBe(false);
|
||||
});
|
||||
|
||||
it("commits disconnected status and resets financial queries after deleting", async () => {
|
||||
@@ -139,6 +155,10 @@ describe("TbankConnectionSection", () => {
|
||||
).toBeInTheDocument(),
|
||||
);
|
||||
expect(client.getQueryData(brokerageAccountsQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(bankCardsQueryKey)).toEqual([
|
||||
{ id: "bank-card-1" },
|
||||
]);
|
||||
expect(client.getQueryState(bankCardsQueryKey)?.isInvalidated).toBe(false);
|
||||
expect(client.getQueryData(portfolioQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(stockQueryKey)).toBeUndefined();
|
||||
expect(client.getQueryData(bondQueryKey)).toBeUndefined();
|
||||
|
||||
Reference in New Issue
Block a user