[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] branch master updated: re-enable tests
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] branch master updated: re-enable tests |
Date: |
Thu, 13 Jan 2022 08:50:38 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository merchant-backoffice.
The following commit(s) were added to refs/heads/master by this push:
new 1a7abd2 re-enable tests
1a7abd2 is described below
commit 1a7abd292e97ffa4403e31115d751648c510cb26
Author: ms <ms@taler.net>
AuthorDate: Thu Jan 13 08:50:32 2022 +0100
re-enable tests
---
packages/bank/tests/__tests__/homepage.js | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/packages/bank/tests/__tests__/homepage.js
b/packages/bank/tests/__tests__/homepage.js
index f8ad25d..d489d8e 100644
--- a/packages/bank/tests/__tests__/homepage.js
+++ b/packages/bank/tests/__tests__/homepage.js
@@ -194,7 +194,7 @@ describe("home page", () => {
})
test("public histories", async () => {
// Mock list of public accounts.
- fetch.mockImplementationOnce(JSON.stringify({
+ fetch.once(JSON.stringify({
"publicAccounts" : [ {
"balance" : "EUR:1",
"iban" : "XXX",
@@ -204,9 +204,7 @@ describe("home page", () => {
"iban" : "YYY",
"accountLabel" : "bar"
}]
- }))
- // Response to history request.
- fetch.mockImplementationOnce(JSON.stringify({
+ })).once(JSON.stringify({
transactions: [{
debtorIban: "XXX",
debtorBic: "YYY",
@@ -230,9 +228,7 @@ describe("home page", () => {
subject: "Bonus",
date: "2000-01-01"
}]
- }))
- // Response to history request.
- fetch.mockResponseOnce(JSON.stringify({
+ })).once(JSON.stringify({
transactions: [{
debtorIban: "XXX",
debtorBic: "YYY",
@@ -258,13 +254,21 @@ describe("home page", () => {
}]
}))
render(<BankHome />);
+ /**
+ * Check that transacions data appears on the page.
+ */
+ await screen.findByText("reimbursement", {exact: false});
+ await screen.findByText("refund", {exact: false});
+ await screen.findByText("bonus", {exact: false});
+ await screen.findByText("donation", {exact: false});
+
await expect(fetch).toHaveBeenCalledWith(
"http://localhost/demobanks/default/access-api/public-accounts"
)
- 0 && await expect(fetch).toHaveBeenCalledWith(
+ await expect(fetch).toHaveBeenCalledWith(
"http://localhost/demobanks/default/access-api/accounts/foo/transactions?page=0"
)
- 0 && await expect(fetch).toHaveBeenCalledWith(
+ await expect(fetch).toHaveBeenCalledWith(
"http://localhost/demobanks/default/access-api/accounts/bar/transactions?page=0"
)
})
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant-backoffice] branch master updated: re-enable tests,
gnunet <=