Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

VER-3: depencies update and cypress removal. #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/react-lint-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run component tests
run: npm t
- name: Print tag if present
run: |
echo "Tags: $TAGS"
Expand All @@ -36,7 +34,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --depth=1 --tags origin
- name: Install yq
run: sudo snap install yq
Expand Down
32 changes: 4 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
org_name: ${{ steps.repo_ids.outputs.ORG_NAME }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check token
Expand Down Expand Up @@ -53,30 +53,6 @@ jobs:
- name: Lint
run: npm run lint

integration:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install dependencies
run: npm ci
- name: Run cypress integration tests
uses: cypress-io/github-action@v2
with:
browser: chrome
record: false
headless: true
build: npm run build
start: npm start
wait-on: 'http://localhost:3000'
env:
CYPRESS_TEST_USERNAME: ${{ secrets.AUTH0_USERNAME }}
CYPRESS_TEST_PASSWORD: ${{ secrets.AUTH0_PASSWORD }}

check-version:
name: 'Check version'
runs-on: ubuntu-latest
Expand All @@ -87,7 +63,7 @@ jobs:
is_prerelease: ${{ steps.get_version.outputs.IS_PRERELEASE }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --depth=1 --tags origin
- name: Install yq
run: sudo snap install yq
Expand All @@ -112,7 +88,7 @@ jobs:
if: ${{ needs.check-version.outputs.is_new_version == 'true' }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# Docker build
- name: Setup QEMU
Expand Down Expand Up @@ -164,4 +140,4 @@ jobs:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
prerelease: false
title: Latest Release ${{ needs.check-version.outputs.version }}
title: Latest Release ${{ needs.check-version.outputs.version }}
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,6 @@ To start the application, run:
npm run start
```

---

## Testing

> Framework - [CYPRESS](https://docs.cypress.io/)
There are two types of tests one for React component as per individual basis and integration for testing different flows. The idea is that component test will be triggered after update to branch excluding **main** and integration for release build or after it has been merged with **main**.

> Run component tests -> `npm t`

> Run integration tests -> `npm run test:integration`

> Plugins are configured in `cyopress/plugins/` folder

- **Component tests**
- Uses webpack so does not require a build and run [cypress/webpack-dev-server](https://npm.io/package/@cypress/webpack-dev-server)
- Each component can be tested in isolocation
- **Integration**
- Will start as a service
- Allows us to mock endpoints of external parties
- Part of Github checks for all branches excluding **main**

---

#### Local Development

Cypress can also be utilised in local development when you require other services you can mock out `api` responses and run under the watch flag.

```sh
npm run test:dev
```

---

## Interacting with the ACA Swagger API Layer directly

**[README](https://gist.github.com/andysign/145188bc361ea9dd7e44db1a5a8a282a)**
Expand Down
14 changes: 0 additions & 14 deletions cypress.json

This file was deleted.

13 changes: 0 additions & 13 deletions cypress/fixtures/agent-status.json

This file was deleted.

78 changes: 0 additions & 78 deletions cypress/integration/connects-to-agent.spec.js

This file was deleted.

9 changes: 0 additions & 9 deletions cypress/plugins/index.js

This file was deleted.

25 changes: 0 additions & 25 deletions cypress/support/commands.js

This file was deleted.

19 changes: 0 additions & 19 deletions cypress/support/index.js

This file was deleted.

Loading