diff --git a/CHANGELOG.md b/CHANGELOG.md index 772590cf..b3f9e5ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,26 +1,5 @@ # Changelog -## [2.14.0-develop.1](https://github.com/cheqd/credential-service/compare/2.13.0...2.14.0-develop.1) (2023-12-26) - - -### Features - -* Add key/import api [DEV-3486] ([#448](https://github.com/cheqd/credential-service/issues/448)) ([524cebb](https://github.com/cheqd/credential-service/commit/524cebb5542b8a0d639decf7820929d52dacd05a)) - -## [2.13.0](https://github.com/cheqd/credential-service/compare/2.12.0...2.13.0) (2023-12-22) - - -### Features - -* Add more validation for user requests [DEV-3453] ([#443](https://github.com/cheqd/credential-service/issues/443)) ([109c518](https://github.com/cheqd/credential-service/commit/109c518355392e54ee7228a5b94b539b64ed9469)), closes [#19](https://github.com/cheqd/credential-service/issues/19) - -## [2.13.0-develop.1](https://github.com/cheqd/credential-service/compare/2.12.0...2.13.0-develop.1) (2023-12-22) - - -### Features - -* Add more validation for user requests [DEV-3453] ([#443](https://github.com/cheqd/credential-service/issues/443)) ([109c518](https://github.com/cheqd/credential-service/commit/109c518355392e54ee7228a5b94b539b64ed9469)), closes [#19](https://github.com/cheqd/credential-service/issues/19) - ## [2.12.0](https://github.com/cheqd/credential-service/compare/2.11.0...2.12.0) (2023-12-20) diff --git a/package.json b/package.json index 497e71ac..9d27ab7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cheqd/credential-service", - "version": "2.14.0-develop.1", + "version": "2.12.0", "description": "cheqd Credential Service Backend", "source": "src/index.ts", "main": "dist/index.js", diff --git a/tests/e2e/credential/issue-verify-flow.spec.ts b/tests/e2e/credential/issue-verify-flow.spec.ts index 7c7313a4..959c8c62 100644 --- a/tests/e2e/credential/issue-verify-flow.spec.ts +++ b/tests/e2e/credential/issue-verify-flow.spec.ts @@ -3,16 +3,14 @@ import type { VerifiableCredential } from '@veramo/core'; import { test, expect } from '@playwright/test'; import { StatusCodes } from 'http-status-codes'; import * as fs from 'fs'; -import { CONTENT_TYPE } from '../constants'; +import { CONTENT_TYPE, PAYLOADS_PATH } from '../constants'; test.use({ storageState: 'playwright/.auth/user.json' }); -const PAYLOADS_BASE_PATH = './tests/payloads/credential'; - let jwtCredential: VerifiableCredential, jsonldCredential: VerifiableCredential; test(' Issue a jwt credential', async ({ request }) => { - const credentialData = JSON.parse(fs.readFileSync(`${PAYLOADS_BASE_PATH}/credential-issue-jwt.json`, 'utf-8')); + const credentialData = JSON.parse(fs.readFileSync(`${PAYLOADS_PATH.CREDENTIAL}/credential-issue-jwt.json`, 'utf-8')); const response = await request.post(`/credential/issue`, { data: JSON.stringify(credentialData), headers: { @@ -50,7 +48,7 @@ test(' Verify a jwt credential', async ({ request }) => { }); test(' Issue a jwt credential with a deactivated DID', async ({ request }) => { - const credentialData = JSON.parse(fs.readFileSync(`${PAYLOADS_BASE_PATH}/credential-issue-jwt.json`, 'utf-8')); + const credentialData = JSON.parse(fs.readFileSync(`${PAYLOADS_PATH.CREDENTIAL}/credential-issue-jwt.json`, 'utf-8')); credentialData.issuerDid = 'did:cheqd:testnet:edce6dfb-b59c-493b-a4b8-1d16a6184349'; const response = await request.post(`/credential/issue`, { data: JSON.stringify(credentialData), @@ -62,7 +60,7 @@ test(' Issue a jwt credential with a deactivated DID', async ({ request }) => { }); test(' Issue a jsonLD credential', async ({ request }) => { - const credentialData = JSON.parse(fs.readFileSync(`${PAYLOADS_BASE_PATH}/credential-issue-jsonld.json`, 'utf-8')); + const credentialData = JSON.parse(fs.readFileSync(`${PAYLOADS_PATH.CREDENTIAL}/credential-issue-jsonld.json`, 'utf-8')); const response = await request.post(`/credential/issue`, { data: JSON.stringify(credentialData), headers: { diff --git a/tests/e2e/credential/revocation-flow.spec.ts b/tests/e2e/credential/revocation-flow.spec.ts index 8802df09..7b4f379b 100644 --- a/tests/e2e/credential/revocation-flow.spec.ts +++ b/tests/e2e/credential/revocation-flow.spec.ts @@ -3,17 +3,15 @@ import type { VerifiableCredential } from '@veramo/core'; import { test, expect } from '@playwright/test'; import { StatusCodes } from 'http-status-codes'; import * as fs from 'fs'; -import { CONTENT_TYPE } from '../constants'; +import { CONTENT_TYPE, PAYLOADS_PATH } from '../constants'; test.use({ storageState: 'playwright/.auth/user.json' }); -const PAYLOADS_BASE_PATH = './tests/payloads/credential'; - let jwtCredential: VerifiableCredential; test(' Issue a jwt credential with revocation statuslist', async ({ request }) => { const credentialData = JSON.parse( - fs.readFileSync(`${PAYLOADS_BASE_PATH}/credential-issue-jwt-revocation.json`, 'utf-8') + fs.readFileSync(`${PAYLOADS_PATH.CREDENTIAL}/credential-issue-jwt-revocation.json`, 'utf-8') ); const response = await request.post(`/credential/issue`, { data: JSON.stringify(credentialData), diff --git a/tests/e2e/credential/suspension-flow.spec.ts b/tests/e2e/credential/suspension-flow.spec.ts index 86a38b4b..f201e35a 100644 --- a/tests/e2e/credential/suspension-flow.spec.ts +++ b/tests/e2e/credential/suspension-flow.spec.ts @@ -3,17 +3,15 @@ import type { VerifiableCredential } from '@veramo/core'; import { test, expect } from '@playwright/test'; import { StatusCodes } from 'http-status-codes'; import * as fs from 'fs'; -import { CONTENT_TYPE } from '../constants'; +import { CONTENT_TYPE, PAYLOADS_PATH } from '../constants'; test.use({ storageState: 'playwright/.auth/user.json' }); -const PAYLOADS_BASE_PATH = './tests/payloads/credential'; - let jwtCredential: VerifiableCredential; test(' Issue a jwt credential with suspension statuslist', async ({ request }) => { const credentialData = JSON.parse( - fs.readFileSync(`${PAYLOADS_BASE_PATH}/credential-issue-jwt-revocation.json`, 'utf-8') + fs.readFileSync(`${PAYLOADS_PATH.CREDENTIAL}/credential-issue-jwt-revocation.json`, 'utf-8') ); credentialData.credentialStatus.statusPurpose = 'suspension'; const response = await request.post(`/credential/issue`, { diff --git a/tests/e2e/did/create-positive.spec.ts b/tests/e2e/did/create-positive.spec.ts index 0a11d99e..eca263ae 100644 --- a/tests/e2e/did/create-positive.spec.ts +++ b/tests/e2e/did/create-positive.spec.ts @@ -1,6 +1,6 @@ import { ID_TYPE, DEFAULT_CONTEXT, CONTENT_TYPE } from '../constants'; import { v4 } from 'uuid'; -import { buildSimpleService } from 'helpers'; +import { buildSimpleService } from '../helpers'; import { test, expect } from '@playwright/test'; import { StatusCodes } from 'http-status-codes'; diff --git a/tests/payloads/credential/credential-issue-jsonld.json b/tests/e2e/payloads/credential/credential-issue-jsonld.json similarity index 100% rename from tests/payloads/credential/credential-issue-jsonld.json rename to tests/e2e/payloads/credential/credential-issue-jsonld.json diff --git a/tests/payloads/credential/credential-issue-jwt-revocation.json b/tests/e2e/payloads/credential/credential-issue-jwt-revocation.json similarity index 100% rename from tests/payloads/credential/credential-issue-jwt-revocation.json rename to tests/e2e/payloads/credential/credential-issue-jwt-revocation.json diff --git a/tests/payloads/credential/credential-issue-jwt.json b/tests/e2e/payloads/credential/credential-issue-jwt.json similarity index 100% rename from tests/payloads/credential/credential-issue-jwt.json rename to tests/e2e/payloads/credential/credential-issue-jwt.json