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

Adding command 'ai:docs' #7

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Adding command 'ai:docs' #7

merged 1 commit into from
Sep 19, 2024

Conversation

sbosio
Copy link
Contributor

@sbosio sbosio commented Sep 17, 2024

Description

Here we're adding the implementation and unit tests for command ai:docs, according to the design outlined in the UX design doc.

How to test

Prepare your environment for testing

  • Fetch this branch.
  • Run yarn && yarn build.

Actual testing

  • Verify that help looks ok: ./bin/run ai:docs --help
  • Run ./bin/run ai:docs and press a key (except 'q') to open your default browser to the Dev Center AI article. Page doesn't exist yet, so expect the page not found webpage to be rendered.
  • Run: HEROKU_AI_DOCS_URL="https://dashboard.heroku.com" ./bin/run ai:docs, press a key and verify the command respects the env var value and opens Heroku Dashboard URL.
  • Run ./bin/run ai:docs and press q when you're prompted to press a key. No page should be open in the browser.
  • Attempt to change the browser that will be opening the article URL: ./bin/run ai:docs --browser safari (or any other browser you might have installed if Safari is your default browser) and press any key, a new window/tab should be opened in the specified browser to the article URL.
  • ./bin/run ai:docs --browser whatever (I'm expecting there isn't a 'whatever' browser in your box :-D) and press any key, an error should be raised indicating you to visit the URL.

SOC2 Compliance

GUS Work Item

@sbosio sbosio requested a review from a team as a code owner September 17, 2024 20:42
Copy link
Contributor

@zwhitfield3 zwhitfield3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Everything worked as expected. Something I noticed that isn't blocking, but when I was testing the quit functionality, pressing q errors out with this message.

Press any key to open up the browser to show Heroku AI documentation, or q to exit:
 ›   Error: quit

Just want to double check that was the same output you expected too @sbosio and should quitting the open prompt error?

@sbosio
Copy link
Contributor Author

sbosio commented Sep 19, 2024

Looks great! Everything worked as expected. Something I noticed that isn't blocking, but when I was testing the quit functionality, pressing q errors out with this message.

Press any key to open up the browser to show Heroku AI documentation, or q to exit:
 ›   Error: quit

Just want to double check that was the same output you expected too @sbosio and should quitting the open prompt error?

I have thought about it too, but I didn't come to a clear conclusion. For sure, it's the same experience with heroku login, where it outputs an error if either you press q or ctrl+c. My personal take is that the golden path for the command is opening the URL on the browser and you can consider that the command failed when you cancel at that point. But is subject to discussion, maybe design could help make a decision here.

@sbosio sbosio merged commit bf83d07 into main Sep 19, 2024
6 checks passed
@sbosio sbosio deleted the sbosio/ai-docs branch September 19, 2024 14:31
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

Successfully merging this pull request may close these issues.

2 participants