AminoJS / Amino.JS

A powerful JavaScript library for interacting with the Amino API :star2:
MIT License
27 stars 5 forks source link

Testcase getUserBlogs is failing. #44

Closed moelrobii closed 6 years ago

moelrobii commented 6 years ago

Describe the bug We noticed that a Testcase is failing in our testing for Release 3.0. I think this is due to a backend change in Narvii's Systems.

To Reproduce Login a client with the AminoJS Libary, then call the Function: <AminoJS>.getUserBlogs(comID, userID, count); OR start the Testcases with npm test

The Bug should then be visible there.

Expected behavior The <calledVariable>.blogs should be an array. The testing system says that it's not.

Screenshots Here is the testcase result with another account:

code_2018-10-22_16-38-56

And here is the testcase with the testing Account and more debug logs. (JSON in text under screenshot)

code_2018-10-22_16-42-43

== Raw JSON response==
{
  "blogs": null,
  "status": "ok",
  "error": null
}

Desktop (please complete the following information):

akatsukilevi commented 6 years ago

I will be working to fix it

felixfong227 commented 6 years ago

Funny thing is when I try to run the test locally, everything works without anything sort of error image But when I kick start an other build with the same branch and same commit image https://travis-ci.org/AminoJS/Amino.JS/builds/439469084 🤔

moelrobii commented 6 years ago

Could it be that the User we are loading does not have any Userblogs? Which is impossible to be Honest da Travis itself a Blog creates. But you know it’s a thought.

felixfong227 commented 6 years ago

@moelrobii

Could it be that the User we are loading does not have any Userblobs

Haven’t really taken that as consideration 🤣

Well, should we just make a default return value as null and inside the test case, accept both array and null?

moelrobii commented 6 years ago

There is a thing already in Place that does this. :)

Check modules/getUserBlogs.js

felixfong227 commented 6 years ago

Ya, thanks @moelrobii https://github.com/AminoJS/Amino.JS/blob/37e5e544b9151f223b951642ab632e2d600ef9ba/modules/getUserBlogs.js#L29 😂 So now we just need to make the test case to also accept null as well 👍

moelrobii commented 6 years ago

Closed. Fixed with PR #41 and commit Hash bf34a278f0751bd66d0a2beae70df38d21fe186b