diff --git a/apps/boltcard/README.md b/apps/boltcard/README.md index f4da3c4c1cf..5d4b8e9f607 100644 --- a/apps/boltcard/README.md +++ b/apps/boltcard/README.md @@ -1,17 +1,54 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - ## Getting Started First, run the development server: +shell 1: + +```bash +core/api % yarn install +core/api % make reset-deps +core/api % bats -t test/bats/ln-receive.bats +core/api % make start +``` + +shell 2: +```bash +apps/boltcard % bun install +apps/boltcard % make reset-deps +apps/boltcard % bun next +``` + +shell 3: ```bash -npm run dev -# or -yarn dev -# or -pnpm dev +apps/boltcard % ngrok http 3000 ``` +update SERVER_URL in config.ts with Forwarding address + +shell 4: +```bash +apps/boltcard % bats -t bats/e2e-test.bats +``` + +for burning the card, need to only do some of the bats tests. we can do that by exiting early +```diff +diff --git a/apps/boltcard/bats/e2e-test.bats b/apps/boltcard/bats/e2e-test.bats +index ad1822e54..5a36a3a87 100644 +--- a/apps/boltcard/bats/e2e-test.bats ++++ b/apps/boltcard/bats/e2e-test.bats +@@ -24,6 +24,8 @@ random_phone() { + [[ $(echo $CALLBACK_API_URL) != "null" ]] || exit 1 + [[ $(echo $CALLBACK_UI_URL) != "null" ]] || exit 1 + ++ exit 1 ++ + # TODO: test CALLBACK_UI_URL + + # Making the follow-up curl request + +``` + + Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. diff --git a/apps/boltcard/bats/e2e-test.bats b/apps/boltcard/bats/e2e-test.bats index 4408ae16828..ad1822e5436 100644 --- a/apps/boltcard/bats/e2e-test.bats +++ b/apps/boltcard/bats/e2e-test.bats @@ -1,5 +1,5 @@ -load "../../../test/bats/helpers/setup-and-teardown" -load "../../../test/bats/helpers/ln" +load "../../../core/api/test/bats/helpers/setup-and-teardown" +load "../../../core/api/test/bats/helpers/ln" random_phone() { printf "+1%010d\n" $(( ($RANDOM * 1000000) + ($RANDOM % 1000000) ))