[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-backoffice] branch master updated: JS tests.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-backoffice] branch master updated: JS tests. |
Date: |
Fri, 08 Jun 2018 10:52:45 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository backoffice.
The following commit(s) were added to refs/heads/master by this push:
new 03fde8b JS tests.
03fde8b is described below
commit 03fde8bec4c67016ad7ab512d46f8e6448a9ca4d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Jun 8 10:52:13 2018 +0200
JS tests.
Another mock was needed, plus API change fixed.
---
js/backoffice.js | 6 ++----
js/test/main.js | 7 +++++--
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/js/backoffice.js b/js/backoffice.js
index 5ae68e0..646c33b 100644
--- a/js/backoffice.js
+++ b/js/backoffice.js
@@ -536,20 +536,17 @@ function get_instance(){
* Remove tracks from the main page table, but
* do NOT remove the table headers; it hides them though.
*/
-function clear_results(){
+var clear_results = function(){
var table = document.getElementById("history");
var tbody = xpath_get("tbody", table).snapshotItem(0);
var tbody_children = xpath_get("tbody/*[position() > 1]", table);
for(var i=0; i<tbody_children.snapshotLength; i++){
tbody.removeChild(tbody_children.snapshotItem(i));
}
-
xpath_get("address@hidden'headers']", tbody)
.snapshotItem(0).style.visibility = "hidden";
-
}
-
/**
* Make the instance selected effective. In particular, it
* triggers history retrieval for it.
@@ -648,4 +645,5 @@ document.onkeydown = function(e) {
if (typeof(module) != "undefined"){
module.exports.track_transfer = track_transfer;
module.exports.track_order = track_order;
+ clear_results = ()=>true;
}
diff --git a/js/test/main.js b/js/test/main.js
index 29d6da7..0a8505f 100644
--- a/js/test/main.js
+++ b/js/test/main.js
@@ -78,8 +78,11 @@ ava.test("Tracking a wire transfer", (t) => {
t.context.requests[0].respond(200, "application/json",
JSON.stringify(mock_tracks));
sinon.assert.calledWith
- (cb, true, mock_tracks.deposits_sums,
- mock_tracks.execution_time, "mock-wtid");
+ (cb,
+ mock_tracks.deposits_sums,
+ mock_tracks.execution_time,
+ "mock-wtid");
+
t.pass();
});
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-backoffice] branch master updated: JS tests.,
gnunet <=