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

VER-3: deps update along with nodejs. #11

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
23 changes: 2 additions & 21 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"plugin:react/recommended",
"prettier"
],
"plugins": ["react", "prettier", "react-hooks", "cypress"],
"plugins": ["react", "prettier", "react-hooks"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
Expand Down Expand Up @@ -41,24 +41,5 @@
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"no-unused-vars": ["error", { "ignoreRestSiblings": true }]
},
"overrides": [
{
"files": ["**/*.{spec,test}.js", "./cypress/plugins/*.js"],
"rules": {
"prettier/prettier": "warn",
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"cypress/no-assigning-return-values": "error",
"cypress/no-unnecessary-waiting": "error",
"cypress/assertion-before-screenshot": "warn",
"cypress/no-force": "warn",
"cypress/no-async-tests": "error",
"cypress/no-pause": "error"
},
"env": {
"cypress/globals": true,
"node": true
}
}
]
}
}
6 changes: 2 additions & 4 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 Down
10 changes: 5 additions & 5 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 @@ -57,9 +57,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
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
Expand Down Expand Up @@ -87,7 +87,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 @@ -111,7 +111,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
39 changes: 0 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,6 @@ To start the application, run:
npm start
```

<<<<<<< HEAD
## 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**.

Before running any tests please make sure you have cypress environment variables present. By the default cypress will read all environment variables prefixed with `CYPRESS_` which can be accessed using `Cypress.env('VAR_NAME')` method. The main reason why **integration** test was excluded from branch check is because we have a limit of **auth0** request.

A list of variables currently used in this repo
```sh
CYPRESS_TEST_USERNAME='username' # Cypress.env('TEST_USERNAME')
CYPRESS_TEST_PASSWORD='password'
```

> 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 external endpoints

#### Local development using Cypress

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
```

#### TODO
- [ ] - include **integration** tests as part of github checks

=======
>>>>>>> main
---

## Interacting with the ACA Swagger API Layer directly

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

This file was deleted.

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

This file was deleted.

49 changes: 0 additions & 49 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.

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

This file was deleted.

Loading