From 19fe85cd8f01c23a36cf3a9ab99b67a2217dfab6 Mon Sep 17 00:00:00 2001 From: nhatnm0612 Date: Tue, 7 Nov 2023 12:28:15 +0700 Subject: [PATCH] [UPD] add test cases --- packages/openspp/assets/rectangle.png | Bin 17277 -> 8609 bytes packages/openspp/src/Adaptor.js | 2 ++ packages/openspp/test/Adaptor.test.js | 48 ++++++++++++++++++-------- packages/openspp/test/job.example.js | 6 ++++ 4 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 packages/openspp/test/job.example.js diff --git a/packages/openspp/assets/rectangle.png b/packages/openspp/assets/rectangle.png index 5c3b84f068580c9db61febf9ae27ddfdf69908cf..e795094092fc2d4174473bf1d0c557204a1dd3df 100644 GIT binary patch literal 8609 zcmds7^;Z<$(_WB9rKLlWaA^<}q(l%_y1PWAON6DCMg#3#Wp|BQEjxaXdUXJ+oXzsz|iLPJgQ5eWkc004LdQj*sK0C4ZGfDR&p`|}-F;~W6+ z)D|TFR>y1UAj4b>_93}5O=q&In9?s{fxPub<KfNHCNY^F# z#1Ps`ab1!*$xk(0IgiE!cbgxqKBRkWd-Uo04+`^zlcRXnJ?8?e)qI(UA?DH-e zHEgp>*Lw1qFENs_ae@qVl~NORZ_@yD<3kOuUhUdUX^=yUtogI74c9Ww-1CO|Y;Kz) zf?Z2laDwr1008`Kg;Mj-HoQ%#e7RQ|<6}I~lxVi~)V=i)ZR<8`6NwJqb8sjAU%dY+ zSq;V39;?Ntvxx>Md-2`w6IacX$Yvj@>v&aMd2TQ?x^8&0*66qeQ{E%`76b5z z0w@wFRRds{$3)*PWr^<}@>Uyw8;TuMm~_CGYi=ybQ>fuP-f4gQ4SVsDDHRS@<;9*s z!loXyp76(JU@NY6Ab1N3__BDLP3u(|rUGOduAb6@f;6XAkfbc#wd=kw&$s*MMxmPs z9U+U-=Z@MFFd<3dEf~a!Qm7;pHxvli9p?1C;X;`T5*#@G+=||3rn+jt%~eUQo)W3l z+4YsB4~z-z`0;O=$ZBDmHHFXw{^~O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E_K&!P`_1m}-mA20PUyW&pTIOK}*)QY&R( zjTaho!|@}cUh09t+S&SgYN#sWMu|@?9z5bp{9JyPD%f6sA_TBg0dS>n@I<&>N)GA~ zVis}?vT&*ko_iXYXN2!-8NZ^9Eg*@4XNr^tvmXdjgamHPV_sl*~(b?{>tF#{sV0sZk{?&2eaHC`%!ZuksT zEb`*vEZ%TAJ&a71zTJcD-5{2hTKbJb6#c6;zXP7O^aZzL3#?3 z=qaGxo>A44sqSb=mMM}3&rFr7;`DDc+9e5ypaD?1I)#LxK47!qLh#x%(}o1xN;bq8 zzUg6P)TRY=8Y@Zx?_xYOKL72DFOmRX$S`?%`TxGlVaxFU^Dc)Tbf^eWY2&}wIe;iW zx$K!axBUO#F5&cUs}Ae?p=a&?S@ZvMf6bfYFF0tL?G&FiE$Q>!kfNWR`n#ILGqqWc p01E&&8RMl3!RI-&DS!CSC@H4P==tFBLg0BC44$rjF6*2UngA#xnN0uy diff --git a/packages/openspp/src/Adaptor.js b/packages/openspp/src/Adaptor.js index f6dc361b9..906b9a038 100644 --- a/packages/openspp/src/Adaptor.js +++ b/packages/openspp/src/Adaptor.js @@ -248,6 +248,7 @@ export function getGroupMembers(registrant_id, offset=0, callback=false) { if (callback) { return callback(nextState); } + return nextState; } catch (err) { console.log(`✗ Error: ${err}`); return state; @@ -296,6 +297,7 @@ export function getServicePoint(name, offset=0, callback=false) { if (callback) { return callback(nextState); } + return nextState; } catch (err) { console.log(`✗ Error: ${err}`); return state; diff --git a/packages/openspp/test/Adaptor.test.js b/packages/openspp/test/Adaptor.test.js index 3246db3ef..168d14e7b 100644 --- a/packages/openspp/test/Adaptor.test.js +++ b/packages/openspp/test/Adaptor.test.js @@ -1,16 +1,23 @@ import { expect } from "chai"; -import { execute } from "../src/Adaptor.js"; +import { + execute, + getServicePoint, + searchGroup, + searchIndividual, +} from "../src/Adaptor.js"; + +const state = { + configuration: { + username: "admin", + password: "admin", + baseUrl: "https://demo.openspp.org/", + database: "openspp_adaptor", + }, + references: [], +}; describe("execute", () => { it("executes each operation in sequence", done => { - const state = { - configuration: { - username: "admin", - password: "935j-jv38-yeu9", - baseUrl: "https://dev.newlogic-demo.com/", - database: "devel", - }, - };; const operations = [ state => { return { counter: 1 }; @@ -30,12 +37,25 @@ describe("execute", () => { .then(done) .catch(done); }); +}); + +describe("getServicePoint", () => { + it("get non-existing service point from demo server", async () => { + let finalState = await getServicePoint("n0n-3x15t1n6-53rv1c3-p01nt")(state); + expect(finalState.data).to.be.undefined; + }); +}); - it("assigns references, data to the initialState", () => { - const state = {}; +describe("searchGroup", () => { + it("search non-existing group from demo server", async () => { + let finalState = await searchGroup([["id", "=", -1]])(state); + expect(finalState.data).to.be.undefined; + }); +}); - execute()(state).then(finalState => { - expect(finalState).to.eql({ references: [], data: null }); - }); +describe("searchIndividual", () => { + it("search non-existing individual from demo server", async () => { + let finalState = await searchIndividual([["id", "=", -1]])(state); + expect(finalState.data).to.be.undefined; }); }); diff --git a/packages/openspp/test/job.example.js b/packages/openspp/test/job.example.js new file mode 100644 index 000000000..a8f1a74db --- /dev/null +++ b/packages/openspp/test/job.example.js @@ -0,0 +1,6 @@ +getServicePoint("Agent 1"); +searchGroup([["name", "ilike", "test group"]]); +searchIndividual([["name", "ilike", "butt"]]); +getGroup("GRP_7NAAH42X"); +getIndividual("IND_EJFW8GUQ"); +getProgram("PROG_2023_00000128");