Skip to content

Commit

Permalink
[readme] chore: Readme for yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
helloitsdave committed Jun 3, 2024
1 parent dbb113e commit 87f153a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 46 deletions.
49 changes: 24 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,33 @@ Refactored the app for testability and added a few additional tweaks.

[https://notes-app-full-stack-bjml.onrender.com/](https://notes-app-full-stack-bjml.onrender.com/)

## Frontend

### FE Implementation
## FE Implementation

- React
- Typescript
- [Axios](https://axios-http.com/docs/intro)

### End to End Tests (e2e)
## BE Implementation

- Node.js
- Typescript
- Express
- Postgres
- [Primsa](https://www.prisma.io/) (DB ORM)

### Database

- [Postgres](https://www.postgresql.org/) with Serverless hosting on [Neon](https://neon.tech/)

## Test Layers

### FE End to End Tests (e2e)
[![Playwright e2e Production Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/playwright-production-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/playwright-production-tests.yml)

- [Playwright.io](https://playwright.dev/) with typescript
- [Allure Production Test Report](https://helloitsdave.github.io/notes-app-full-stack-testing) with history

### Component Tests
### FE Component Tests
[![Frontend Component Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/frontend-component-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/frontend-component-tests.yml)

- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) with [vitest](https://vitest.dev/)
Expand All @@ -39,30 +51,17 @@ Refactored the app for testability and added a few additional tweaks.
### FE Service Tests
[![Frontend Service Tests - Playwright](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/frontend-service-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/frontend-service-tests.yml)

- Service tests with docker and [Playwright.io](https://playwright.dev/)

## Backend
- docker and [Playwright.io](https://playwright.dev/)

### BE Implementation

- Node.js
- Typescript
- Express
- Postgres
- [Primsa](https://www.prisma.io/) (DB ORM)

### BE Tests
### BE e2e Tests
[![Backend e2e Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-e2e-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-e2e-tests.yml)
[![Backend Integration Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-integration-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-integration-tests.yml)
- docker, [supertest](https://github.com/ladjs/supertest) and [vitest](https://vitest.dev/)

- e2e tests with docker, [supertest](https://github.com/ladjs/supertest) and [vitest](https://vitest.dev/)
- Integration tests with [supertest](https://github.com/ladjs/supertest), [vitest](https://vitest.dev/) and [vitest-mock-extended](https://github.com/eratio08/vitest-mock-extended)
### BE Integration Tests
[![Backend Integration Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-integration-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-integration-tests.yml)
- [supertest](https://github.com/ladjs/supertest), [vitest](https://vitest.dev/) and [vitest-mock-extended](https://github.com/eratio08/vitest-mock-extended)

### Contract Tests
### API Contract Tests
[![Backend Contract Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-contract-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-contract-tests.yml)

- Contract tests with [pact](https://docs.pact.io/)

## Database

- [Postgres](https://www.postgresql.org/) with Serverless hosting on [Neon](https://neon.tech/)
28 changes: 19 additions & 9 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Running the backend db and express server in a docker container
### Build

```bash
npm run docker:build
yarn docker:build
```

### Run

```bash
npm run docker:up
yarn docker:up
```

### Stop

```bash
npm run docker:down
yarn docker:down
```

## Test Execution
Expand All @@ -31,25 +31,35 @@ npm run docker:down
Execute the integration tests

```bash
npm run test
yarn test
```

### Integration Tests with Coverage

Execute the integration tests with coverage

```bash
npm run test:coverage
yarn test:coverage
```

### Service Tests
### e2e Tests

Execute the service tests against the local docker container

```bash
npm run docker:up
npm run test:service
npm run docker:down
yarn docker:up
yarn test:e2e
yarn docker:down
```

### Contract Tests

Execute the service tests against the local docker container

```bash
yarn docker:up
yarn test:contract
yarn docker:down
```

## Tag release
Expand Down
8 changes: 4 additions & 4 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo

In the project directory, you can run:

### `npm start`
### `yarn start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`
### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`
### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
Expand All @@ -31,7 +31,7 @@ Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`
### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

Expand Down
16 changes: 8 additions & 8 deletions playwright/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ To use the tests in this folder, you need to have Playwright installed.

```bash
cd ./playwright
npm ci
npx playwright install
yarn
yarn playwright install
```

## Test Execution
Expand All @@ -29,27 +29,27 @@ npx playwright install
Start the backend server:
```bash
cd ./backend
npm run docker:up
yarn docker:up
```

Start the frontend server:
```bash
cd ./frontend
npm run start
yarn start
```

Executing tests against the local server:

```bash
cd ./playwright
npm run test
yarn test
```

### Running tests in production

```bash
cd ./playwright
npm run test:production
yarn test:production
```

### Headed mode
Expand All @@ -58,7 +58,7 @@ By default, tests are executed in headless mode. To run tests in headed mode, pa

```bash
cd ./playwright
npm run test -- --headed
yarn test -- --headed
```

### Debug mode
Expand All @@ -67,7 +67,7 @@ To run tests in debug mode, pass the `--debug` flag:

```bash
cd ./playwright
npm run test -- --debug
yarn test -- --debug
```

## Page Object Model
Expand Down

2 comments on commit 87f153a

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage for this commit

98.10%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   authenticateToken.ts100%100%100%
   hash.ts100%100%100%
   index.ts50%50%83.33%31–33
   prisma.ts100%100%100%
src/__mocks__
   prisma.ts100%100%100%
src/routes
   loginRoutes.ts100%100%100%
   noteRoutes.ts100%100%100%
   userRoutes.ts100%100%100%

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage for this commit

96.83%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   App.tsx87.50%75%96%30–31, 40–41
   NoteApp.tsx94.44%100%97.04%72–76
src/api
   apiService.ts87.50%85.71%87.76%38, 38–43, 92–98
src/components
   Header.tsx100%100%100%
   Login.tsx81.82%100%98.72%32, 32–33
   Note.tsx100%100%100%
   NoteForm.tsx100%100%100%
   NoteFormModal.tsx100%100%100%
   NoteGrid.tsx100%100%100%
   RegistrationForm.tsx86.67%100%97.04%57, 57–61
   RegistrationLink.tsx100%100%100%
   Spinner.tsx100%100%100%

Please sign in to comment.