pieces-app / cli-agent

Pieces CLI for interacting with Pieces OS
https://docs.pieces.app/extensions-plugins/cli
MIT License
50 stars 19 forks source link

Add a test for the auth commands (login/logout) #75

Closed BishoyHanyRaafat closed 1 month ago

mdex-geek commented 2 months ago

hey i am interested in this problem you tell me about this

Bishoy-at-pieces commented 2 months ago

Hey @mdex-geek , Let me know how I can help! Checkout the other tests for an idea

mdex-geek commented 2 months ago

@Bishoy-at-pieces i have a question i have to write the code that see that user input user id and password is correct or not ?

Bishoy-at-pieces commented 2 months ago

No no just check if the command runs properly, check if the website is opened successfully

mdex-geek commented 2 months ago

@Bishoy-at-pieces currently cmd is not working properly I check it . Bishop I am new in OSS can you help me how can i implement this I clone the project and install the poetry package

Bishoy-at-pieces commented 2 months ago

Okay great to run it just run pieces package as you run any python script

python src/pieces run

Alternatively you can run it from the poetry

poetry run pieces run

To run the tests do

poetry run pytest

Please let me know if you need any sort of help

mdex-geek commented 2 months ago

@Bishoy-at-pieces Sorry if I'm disturbing you the command login and logout is working properly and I tested it and it work properly .

https://github.com/pieces-app/cli-agent/assets/107706485/dd0c939d-d27d-4773-b9dc-390d3281c74c

Bishoy-at-pieces commented 2 months ago

Yes here you should add a test to test this command checkout the /tests directory

mdex-geek commented 2 months ago

Where in terminal I add test and you explain me test directory I am getting little confuse

Bishoy-at-pieces commented 2 months ago

https://docs.python.org/3/library/unittest.html

https://github.com/pieces-app/cli-agent/tree/main/tests

sambhavnoobcoder commented 1 month ago

@mdex-geek are you looking into this ? if not , then I would like to give this a go .

sambhavnoobcoder commented 1 month ago

raised a PR #147 to fix the issue . kindly give it a look .