Skip to content

Commit

Permalink
test: Credential-Service: Add integration tests for unauthorized scen…
Browse files Browse the repository at this point in the history
…ario [DEV-3141] (#364)

* Add playwright.config.ts.

* Add setup script for authorizing before running
tests.

* Add playwright reports to .gitignore.

* Update package-lock.json.

* Add a new script for running e2e tests.

* Update tsconfig.json.

* Add playwright.yml for GitHub Actions.

* Remove unused includes in tsconfig.json.

* Add new test user environment variables.

* Update playwright.config.ts.

* Use env variables instead of magic strings.

* Add test example.

* Update playwright.yml.

* Add common e2e tests for an unauthorized scenario.

* Update package-lock.json.

* Update package-lock.json.

* Update playwright-ct.config.ts.

* Add different commands for running authorized and
unauthorized integration tests.

* Add positive integration tests payloads.

* Add more positive integration tests.

* Remove an unused import.

* Remove an incorrect line in .gitignore.

* Update integration tests and payloads.

* Add negative integration tests for:
- /did/search;
- /resource/search.

* Update integration tests' description.

* Add negative integration tests for
/credential/verify endpoint.

* Add negative integration tests for
/status-list/search endpoint.

* Add negative integration tests for
/credential-status/check endpoint.

* Add TODO comment for completing e2e tests.

* Refactor integration tests.

* Move constants.ts to inside "tests" folder.

* Remove test user from example.env

* Delete playwright.yml

* Update build.yml

* Add condition for checks

* Update .gitignore

* Fix test script command

* Have only one playwright file

* Update environment.d.ts

* Update constants.ts.

* Remove verida files from .gitignore so it blocks
integration tests.

* Re-architecture integration tests.

* Add project to running separately no-auth.tests.

* Use constant global variable instead of magic str.

* Refactor integration tests' constants.

* Refactor integration tests.

* Update playwright.config.ts

* Fix an error playwright.config.ts.

* Refactor tests

* Get rid of dupliated constants

* Fix tests due ti latest changes

* Update mlc_config.json

* Actions updates

* lockfile

---------

Co-authored-by: Ankur Banerjee <ankurdotb@users.noreply.github.com>
Co-authored-by: Andrew Nikitin <andrew.nikitin@cheqd.io>
  • Loading branch information
3 people authored Dec 20, 2023
1 parent a1ee0aa commit 307fd67
Show file tree
Hide file tree
Showing 44 changed files with 2,174 additions and 1,535 deletions.
3 changes: 3 additions & 0 deletions .github/linters/mlc_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"ignorePatterns": [
{
"pattern": "^https://resolver.cheqd.net/"
},
{
"pattern": "^https://twitter.com/"
}
],
"retryOn429": true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
VERIDA_NETWORK: ${{ vars.VERIDA_NETWORK }}
VERIDA_PRIVATE_KEY: ${{ secrets.VERIDA_PRIVATE_KEY }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
cache-to: type=gha,mode=min

- name: Upload build image as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: credential-service-staging
path: credential-service-staging.tar
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0

- name: Initialise CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'javascript'
queries: security-and-quality
Expand All @@ -35,4 +35,4 @@ jobs:
npm run build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download docker image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: credential-service-staging

Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ tsconfig.tsbuildinfo
**/logto-local.env
**/postgres-local.env

# Verida
v[0-9,a-z]*


### GENERAL EXCLUSIONS ###

Expand Down
Loading

0 comments on commit 307fd67

Please sign in to comment.