Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Documentation #97

Closed
amorenew opened this issue May 17, 2019 · 19 comments
Closed

Test Documentation #97

amorenew opened this issue May 17, 2019 · 19 comments
Assignees

Comments

@amorenew
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I want to run the test but there is not enough documentation on the tests

Describe the solution you'd like
1-Test cases need to be cleaner and documented
2-Constant Ids and key used in the test case should be in the Secrets file or in a general constant class
3-The Secrets file should be there with empty value instead of Secrets.dart.asc

Additional context
I read PDD docs but I didn't find installation area so how I will use PDD command

@0crat
Copy link
Collaborator

0crat commented May 17, 2019

@ammaratef45/z please, pay attention to this issue

@0crat
Copy link
Collaborator

0crat commented May 17, 2019

@amorenew/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@ammaratef45
Copy link
Owner

@amorenew Here the testing operation is described
You create the secrets file and run the command.

I have no intention for adding an empty file instead of the encrypted one because I want that file (secrets) to be ignored by GIT.

PDD isn't related to testing (It's to check that all todo's in the right format and can be caught and opened as new tickets)
I will edit the docs and include how to install it.

I will leave this issue opened just for the tests documentation part, thanks for mentioning that.

@amorenew
Copy link
Contributor Author

amorenew commented May 18, 2019

@ammaratef45
I made a file called secerts.dart as the documentation

class Secrets {
 static const apiKey = '''-----BEGIN PGP MESSAGE-----

hQEMA5qETcGag5w6AQf7BuyfhZj1GUzHZ/qGcYyEAcK3BfB=ajgB
-----END PGP MESSAGE-----''';
}

I used my key gap then I used flutter test but I got 6 failed tests.
What I did is right or I missed a step?

@amorenew
Copy link
Contributor Author

what is .asc stand for?

@ammaratef45
Copy link
Owner

@amorenew it's an encrypted file
You're not using wrong APIkey, get your API key from WTS

@amorenew
Copy link
Contributor Author

@ammaratef45 Yes I did use the key gap from wts website but same error.
Note I have 0 zents but this is not the issue if so I will not get 6 fails

@amorenew
Copy link
Contributor Author

amorenew commented May 18, 2019

@ammaratef45 I think I found the issue
FormatException: Invalid HTTP header field value: "-----BEGIN PGP MESSAGE-----\n\nhQE"
I got \n for spaces because I used '''text'''
I wonder how you use your key because with single quotes I need to use escape slash '' in several places

@amorenew
Copy link
Contributor Author

I installed Ruby and pdd but still the test case I don't know how to set the key in the proper format

@ammaratef45
Copy link
Owner

@amorenew The api key can be found here: https://wts.zold.io/api

it has the following format ammaratef45-xxxxxxxxx

@amorenew amorenew mentioned this issue May 18, 2019
@amorenew
Copy link
Contributor Author

@ammaratef45 Yes it is working well thanks
But I got only 2 tests failed.
First:

wallet_test.dart: test transactions order [E]
  Expected: not <0>
    Actual: <0>

Second:

api_test.dart: test API invoice.json [E]
  Expected: '25aXXXXX'
    Actual: 'd9YYYYYY'

@ammaratef45
Copy link
Owner

@amorenew Thanks for reporting this

I should fix them

@ammaratef45 ammaratef45 self-assigned this May 21, 2019
@0crat 0crat added the scope label May 21, 2019
@0crat
Copy link
Collaborator

0crat commented May 21, 2019

The job #97 assigned to @ammaratef45/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@0crat
Copy link
Collaborator

0crat commented May 21, 2019

Manual assignment of issues is discouraged, see §19: -5 point(s) just awarded to @ammaratef45/z

@0crat
Copy link
Collaborator

0crat commented May 21, 2019

Bug was reported, see §29: +15 point(s) just awarded to @amorenew/z

ammaratef45 pushed a commit that referenced this issue May 23, 2019
ammaratef45 pushed a commit that referenced this issue May 23, 2019
ammaratef45 pushed a commit that referenced this issue May 23, 2019
@ammaratef45
Copy link
Owner

@amorenew can you tell me if tests are good now? what else you think we should have?

@amorenew
Copy link
Contributor Author

@ammaratef45 Yes all tests passed
Thanks

@0crat 0crat removed the scope label May 24, 2019
@0crat
Copy link
Collaborator

0crat commented May 24, 2019

The job #97 is now out of scope

@0crat
Copy link
Collaborator

0crat commented May 24, 2019

Order was finished: +30 point(s) just awarded to @ammaratef45/z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants