From b50579b6bbf1f2929bdf91c0627120572b1072b6 Mon Sep 17 00:00:00 2001 From: Murat Ozcan Date: Wed, 11 May 2022 08:16:21 -0500 Subject: [PATCH 1/2] added picture of Cypress dashboard with tests running on the deployment --- site/comments.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site/comments.md b/site/comments.md index 44c522b54..fd887226a 100644 --- a/site/comments.md +++ b/site/comments.md @@ -135,4 +135,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, 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) From 3b7d498aa94f8f0f5036124d5f364062faa3b1ac Mon Sep 17 00:00:00 2001 From: Murat Ozcan Date: Wed, 11 May 2022 08:20:38 -0500 Subject: [PATCH 2/2] final readme edit --- README.md | 12 ++++++++++++ site/comments.md | 8 +++----- 2 files changed, 15 insertions(+), 5 deletions(-) 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 fd887226a..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`: @@ -137,6 +135,6 @@ jobs: After the feature branch push, we can observe the tests running against the locally served app as usual. -And after the merge, we can observe the group name and see video recording on the Cypress Dashboard where the app is running against the deployment. +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)