diff --git a/README.md b/README.md index fc014e48a..e5569b356 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,18 @@ [renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg [renovate-app]: https://renovateapp.com/ +```bash +yarn install + +# serve the app locally and test against it +yarn dev # on first tab +yarn cy:open-local [#376](https://github.com/vercel/commerce/issues/376) + +# execute the tests against the deployment +yarn cy:open-dev + +``` + # Next.js Commerce The all-in-one starter kit for high-performance e-commerce sites. With a few clicks, Next.js developers can clone, deploy and fully customize their own store. diff --git a/site/comments.md b/site/comments.md index 44c522b54..e4f315a7a 100644 --- a/site/comments.md +++ b/site/comments.md @@ -1,4 +1,4 @@ -## Adding a config files to test the deployment +## Adding config files to test the deployment Create a config folder and two json files `cypress/config/local.json`, `cypress/config/dev.json`. @@ -24,8 +24,6 @@ Create a config folder and two json files `cypress/config/local.json`, `cypress/ } ``` -(How I wish we could _extend_ the base `cypress.json`, because unfortunately Gleb's `cypress-extends` plugin clashes with other plugins like `cypress-grep`) - We slightly modify our `package.json` scripts to use the respective config files: ```json @@ -62,7 +60,7 @@ In contrast, after the feature branch is merged, we want to execute e2e tests ag For the app being locally served, in Github Actions, we can accomplish this task by using `pull_request` vs `push`. We also need to specify the config file we are using. -> We will also add a group property to make things a bit more clear on the Cypress Dashboard. +> We will also add a group property to the Cypress GHA in order make things a bit more clear on the Cypress Dashboard. `main.yml`: @@ -135,4 +133,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` -After the feature branch push, we can observe the tests running against the locally served app as usual. And after the merge, we can obj +After the feature branch push, we can observe the tests running against the locally served app as usual. + +And after the merge to main, we can observe the group name and see video recording on the Cypress Dashboard where the app is running against the deployment. + +![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tg6nbxiamruwpelsk1d.png)