From 1e8093793c924af85b0a2109f6be022381928b31 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Tue, 13 Dec 2022 15:58:07 +0000 Subject: [PATCH] test: test --- .../src/test/kotlin/common/CredentialSchemas.kt | 14 ++++++++++++++ .../src/test/kotlin/common/TestConstants.kt | 12 ------------ .../kotlin/features/connection/ConnectionSteps.kt | 2 -- .../credential_schemas/CredentialSchemasSteps.kt | 4 ---- .../issue_credentials/IssueCredentialsSteps.kt | 1 - 5 files changed, 14 insertions(+), 19 deletions(-) create mode 100644 tests/e2e-tests/src/test/kotlin/common/CredentialSchemas.kt diff --git a/tests/e2e-tests/src/test/kotlin/common/CredentialSchemas.kt b/tests/e2e-tests/src/test/kotlin/common/CredentialSchemas.kt new file mode 100644 index 0000000000..b08d1b776f --- /dev/null +++ b/tests/e2e-tests/src/test/kotlin/common/CredentialSchemas.kt @@ -0,0 +1,14 @@ +package common + +import api_models.CredentialSchema + +object CredentialSchemas { + val STUDENT_SCHEMA = CredentialSchema( + author = "University", + name = "Student schema", + description = "Simple student credentials schema", + attributes = listOf("name", "age"), + tags = listOf("school", "students"), + version = "1.0" + ) +} diff --git a/tests/e2e-tests/src/test/kotlin/common/TestConstants.kt b/tests/e2e-tests/src/test/kotlin/common/TestConstants.kt index 114298239a..6d5514d67f 100644 --- a/tests/e2e-tests/src/test/kotlin/common/TestConstants.kt +++ b/tests/e2e-tests/src/test/kotlin/common/TestConstants.kt @@ -1,20 +1,8 @@ package common -import api_models.CredentialSchema import java.util.UUID object TestConstants { val CREDENTIAL_SCHEMAS = CredentialSchemas val RANDOM_CONSTAND_UUID = UUID.randomUUID().toString() } - -object CredentialSchemas { - val STUDENT_SCHEMA = CredentialSchema( - author = "University", - name = "Student schema", - description = "Simple student credentials schema", - attributes = listOf("name", "age"), - tags = listOf("school", "students"), - version = "1.0" - ) -} \ No newline at end of file diff --git a/tests/e2e-tests/src/test/kotlin/features/connection/ConnectionSteps.kt b/tests/e2e-tests/src/test/kotlin/features/connection/ConnectionSteps.kt index fcaca95be8..5120fe1099 100644 --- a/tests/e2e-tests/src/test/kotlin/features/connection/ConnectionSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/connection/ConnectionSteps.kt @@ -25,7 +25,6 @@ class ConnectionSteps { inviter.attemptsTo( Post.to("/connections") .with { - it.header("Content-Type", "application/json") it.body("""{"label": "$connectionLabel"}""") } ) @@ -73,7 +72,6 @@ class ConnectionSteps { invitee.attemptsTo( Post.to("/connection-invitations") .with { - it.header("Content-Type", "application/json") it.body("""{"invitation": "${invitee.recall("invitationUrl")}"}""") } ) diff --git a/tests/e2e-tests/src/test/kotlin/features/credential_schemas/CredentialSchemasSteps.kt b/tests/e2e-tests/src/test/kotlin/features/credential_schemas/CredentialSchemasSteps.kt index c938b9b9d5..eff543a7a4 100644 --- a/tests/e2e-tests/src/test/kotlin/features/credential_schemas/CredentialSchemasSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/credential_schemas/CredentialSchemasSteps.kt @@ -24,7 +24,6 @@ class CredentialSchemasSteps { actor.attemptsTo( Post.to("/schema-registry/schemas") .with { - it.header("Content-Type", "application/json") it.body(TestConstants.CREDENTIAL_SCHEMAS.STUDENT_SCHEMA) } ) @@ -58,7 +57,6 @@ class CredentialSchemasSteps { actor.attemptsTo( Post.to("/schema-registry/schemas") .with { - it.header("Content-Type", "application/json") it.body(TestConstants.CREDENTIAL_SCHEMAS.STUDENT_SCHEMA) } ) @@ -93,7 +91,6 @@ class CredentialSchemasSteps { actor.attemptsTo( Post.to("/schema-registry/schemas") .with { - it.header("Content-Type", "application/json") it.body(wrongSchema) } ) @@ -111,7 +108,6 @@ class CredentialSchemasSteps { actor.attemptsTo( Post.to("/schema-registry/schemas") .with { - it.header("Content-Type", "application/json") it.body(wrongSchema) } ) diff --git a/tests/e2e-tests/src/test/kotlin/features/issue_credentials/IssueCredentialsSteps.kt b/tests/e2e-tests/src/test/kotlin/features/issue_credentials/IssueCredentialsSteps.kt index 5579ef3cb9..c508aa7cf9 100644 --- a/tests/e2e-tests/src/test/kotlin/features/issue_credentials/IssueCredentialsSteps.kt +++ b/tests/e2e-tests/src/test/kotlin/features/issue_credentials/IssueCredentialsSteps.kt @@ -45,7 +45,6 @@ class IssueCredentialsSteps { issuer.attemptsTo( Post.to("/issue-credentials/credential-offers") .with { - it.header("Content-Type", "application/json") it.body(newCredential) } )