Skip to content

Commit

Permalink
feat: ✨ test ui page section (contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
slugb0t committed Jul 23, 2024
1 parent 120a0bc commit 448c37a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/app/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ interface ExpectoRequest {
}
```

## **Step 4**: Add the API calls
## **Step 4**: Add the API routes

Finally, you will need to add the API calls to the Codefair frontend to retrieve and display the data from the MongoDB database, saving a draft, pushing content to a new branch and creating a pull request. You can navigate to `ui/server/api` and create a folder called `expecto` and within that folder another folder called `[identifier]`. There you will be able to add your different API calls.

Expand Down Expand Up @@ -610,3 +610,17 @@ export default defineEventHandler(async (event) => {
};
});
```

## **Step 5**: Test the feature

You can now test both the bot feature and correlating UI feature by running the Codefair repository locally. The terminal should output both the UI and bot servers running.

```bash
pnpm dev
```

![Terminal Output](/terminal-output.png)

If you only want to check out the UI created, visit `https://localhost:3000/add/expecto/[identifier]` in your browser. The identifier being the one stored in the mongoDB database.

Another alternative would be to visit the GitHub issue created by the bot and click on the `Edit Expecto Patronum` badge to be redirected to the UI page.

0 comments on commit 448c37a

Please sign in to comment.