Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer API: Use Consumer API SDK for integration tests #659

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
a67f84a
fix: consumer SDK generating paths witl backslashes
Dannyps Apr 3, 2024
eea55b9
chore: merge main
Dannyps Apr 3, 2024
d47bd0d
feat: add password helper
Dannyps Apr 11, 2024
799da7e
chore: add basic AccountController
Dannyps Apr 11, 2024
c3531d1
Merge remote-tracking branch 'origin/main' into NMSHDB-83-create-iden…
Dannyps Apr 16, 2024
6f504ba
feat: identity creation using consumer sdk
Dannyps Apr 17, 2024
b87e907
refactor: format and extract classes
Dannyps Apr 17, 2024
8827699
feat: complete example for challenges integration tests
Dannyps Apr 19, 2024
0e18aaa
chore: refactor
Dannyps Apr 19, 2024
3387412
fix: not using DI Factory
Dannyps Apr 19, 2024
855ec0f
fix: cannot parse body when there is no body to parse
Dannyps Apr 19, 2024
abdbd1d
Merge remote-tracking branch 'origin/main' into NMSHDB-83-create-iden…
Dannyps Apr 19, 2024
93a3e9c
chore: remove unused method
Dannyps Apr 23, 2024
eb66eff
Merge remote-tracking branch 'origin/main' into NMSHDB-83-create-iden…
Dannyps Apr 23, 2024
5b9c8f7
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 23, 2024
c80ac09
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 23, 2024
13a80f3
refactor: when string
Dannyps Apr 23, 2024
49770fb
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 24, 2024
fb941ba
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 25, 2024
4e487b2
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 26, 2024
897e341
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 26, 2024
a4adfde
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 26, 2024
edf0ccc
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 29, 2024
8a4e201
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 29, 2024
e72dbad
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 29, 2024
f3d0901
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 30, 2024
28cd78f
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 30, 2024
4f6f452
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 30, 2024
f5b488f
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] Apr 30, 2024
b870218
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 2, 2024
a6c2d77
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 2, 2024
089eca6
refactor: specify api version in each route
tnotheis May 2, 2024
9ed3346
feat: factory methods for consumer api Client
tnotheis May 2, 2024
028af08
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 3, 2024
0e0695f
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 3, 2024
1ec6b9d
Merge branch 'main' into improve-consumer-api-integration-tests
daniel-almeida-konkconsulting May 3, 2024
14007bb
feat: add challenges steps with SDK
daniel-almeida-konkconsulting May 3, 2024
57d16ef
Merge remote-tracking branch 'origin/main' into NMSHDB-83-create-iden…
Dannyps May 7, 2024
79d56c1
chore: fix merge
Dannyps May 7, 2024
a420e48
chore: code review fixes
Dannyps May 7, 2024
b1cb4bc
fix: missing using
Dannyps May 7, 2024
5c55a1a
chore: formatting
Dannyps May 7, 2024
e687915
chore: move PasswordHelper
Dannyps May 7, 2024
5ac0bcc
chore: remove accountController
Dannyps May 7, 2024
30f6692
chore: identityPublicKey should be passed as a Bas64 string
Dannyps May 7, 2024
8dbaf63
fix: using bad dsk method for challenge creation
Dannyps May 8, 2024
6df401b
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 8, 2024
012af04
chore: ensure empty payloads do not break the sdk
Dannyps May 8, 2024
400d102
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 13, 2024
e375383
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 13, 2024
e3fa9c1
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 13, 2024
a2f3e0c
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
Dannyps May 13, 2024
60c0268
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 13, 2024
6be9fca
Merge branch 'main' into NMSHDB-83-create-identities-via-sdk
mergify[bot] May 15, 2024
17ca4a6
chore: code review changes
Dannyps May 15, 2024
82fbcb8
Merge remote-tracking branch 'origin/main' into NMSHDB-83-create-iden…
Dannyps May 15, 2024
5ef12bb
refactor: use fluent assertion extensions and fix challenge creation …
daniel-almeida-konkconsulting May 15, 2024
e650a95
chore: remove unauthorized integration test
Dannyps May 16, 2024
24c2714
refactor: GivenTheUserIsAuthenticated
Dannyps May 16, 2024
819b26d
refactor: remove exception handling for response deserialization
daniel-almeida-konkconsulting May 16, 2024
7f7568d
chore: revert changes to test appsettings
Dannyps May 16, 2024
f65f6ce
chore: remove default _sdk variable for ChallengesApiStepDefinitions
Dannyps May 16, 2024
9b449ae
Merge branch 'NMSHDB-83-create-identities-via-sdk' of github.com:nmsh…
Dannyps May 16, 2024
7a4a54f
Merge branch 'main' into improve-consumer-api-integration-tests
daniel-almeida-konkconsulting May 16, 2024
15d3782
Merge branch 'NMSHDB-83-create-identities-via-sdk' into improve-consu…
daniel-almeida-konkconsulting May 16, 2024
b276421
test: add consumer api integration tests with SDK
daniel-almeida-konkconsulting May 17, 2024
1890efd
Merge branch 'main' into improve-consumer-api-integration-tests
daniel-almeida-konkconsulting May 17, 2024
0536df9
fix: post merge fixes
daniel-almeida-konkconsulting May 17, 2024
afd4d1c
Merge branch 'main' into improve-consumer-api-integration-tests
mergify[bot] May 21, 2024
6476a25
fix: add byte array converter to consumer api
daniel-almeida-konkconsulting May 21, 2024
6c60ebd
Merge branch 'improve-consumer-api-integration-tests' of https://gith…
daniel-almeida-konkconsulting May 21, 2024
bc9d2e2
refactor: use UrlSafeBase64ToByteArrayJsonConverter and shift registr…
daniel-almeida-konkconsulting May 21, 2024
8694544
refactor: use null suppression for sdk
daniel-almeida-konkconsulting May 21, 2024
84902bf
refactor: use hardcoded password value
daniel-almeida-konkconsulting May 21, 2024
3633a60
Merge branch 'main' into improve-consumer-api-integration-tests
mergify[bot] May 21, 2024
a0772a2
ci: change publish pipeline name
tnotheis May 22, 2024
2ab8118
refactor: rename token response field in case of unauthorized error
daniel-almeida-konkconsulting May 22, 2024
65250ce
refactor: remove unused parameter
daniel-almeida-konkconsulting May 22, 2024
f93ab78
fix: challenges test referencing non existent step definition
daniel-almeida-konkconsulting May 22, 2024
054562a
refactor: rename step definition
daniel-almeida-konkconsulting May 22, 2024
57a0e78
refactor: rename step definition for admin api integration tests
daniel-almeida-konkconsulting May 22, 2024
2635a72
refactor: reuse step definition with different regex to improve reada…
daniel-almeida-konkconsulting May 22, 2024
7206ec6
Merge branch 'improve-consumer-api-integration-tests' of https://gith…
daniel-almeida-konkconsulting May 22, 2024
f0390c2
refactor: use regex to avoid multiple attributes
daniel-almeida-konkconsulting May 22, 2024
f1203fb
refactor: introduce global constant for device password
daniel-almeida-konkconsulting May 22, 2024
3d1106b
refactor: remove unused step definition
daniel-almeida-konkconsulting May 22, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Helm Chart
name: Publish

on:
push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Scenario: Deleting a non-existent Client
Given a non-existent Client c
When a DELETE request is sent to the /Clients endpoint
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Scenario: Changing the client secret of an existing Client with an empty secret
Scenario: Changing the client secret of a non-existent Client
When a PATCH request is sent to the /Clients/{clientId}/ChangeSecret endpoint
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Scenario: Changing the default tier of an existing Client with a non-existent ti
Given a Client c
When a PUT request is sent to the /Clients/{c.ClientId} endpoint with a non-existent tier id
Then the response status code is 400 (Bad request)
And the response content includes an error with the error code "error.platform.validation.device.tierIdInvalidOrDoesNotExist"
And the response content contains an error with the error code "error.platform.validation.device.tierIdInvalidOrDoesNotExist"

Scenario: Changing the default tier of a non-existing Client
When a PUT request is sent to the /Clients/{c.clientId} endpoint with a non-existing clientId
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Scenario: There can only be one active deletion process
And an active deletion process for Identity i exists
When a POST request is sent to the /Identities/{i.id}/DeletionProcesses endpoint
Then the response status code is 400 (Bad Request)
And the response content includes an error with the error code "error.platform.validation.device.onlyOneActiveDeletionProcessAllowed"
And the response content contains an error with the error code "error.platform.validation.device.onlyOneActiveDeletionProcessAllowed"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Scenario: Deleting an inexistent Individual Quota
Given an Identity i
When a DELETE request is sent to the /Identities/{i.address}/Quotas/inexistentQuotaId endpoint
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Scenario: Creating an Individual Quota for existing Identity
Scenario: Creating an Individual Quota for inexistent Identity
When a POST request is sent to the /Identity/{address}/Quotas endpoint with an inexistent identity address
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Scenario: Creating a Log
Scenario: Creating a Log with an invalid Log Level fails
When a POST request is sent to the /Logs endpoint with an invalid Log Level
Then the response status code is 400 (Bad Request)
And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Scenario: Requesting an invalid type Message List of an Identity
Given an Identity i
When a GET request is sent to the /Messages endpoint with type 'InvalidType' and participant i.Address
Then the response status code is 400 (Bad request)
And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Scenario: Deleting an inexistent Tier Quota
Given a Tier t
When a DELETE request is sent to the /Tiers/{t.id}/Quotas/{quotaId} endpoint with an inexistent quota id
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Scenario: Creating a Tier Quota for existing Tier
Scenario: Creating a Tier Quota for inexistent Tier
When a POST request is sent to the /Tiers/{tierId}/Quotas endpoint with an inexistent tier id
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Scenario: Creating a Tier with a name that already exists
Given a Tier t
When a POST request is sent to the /Tiers endpoint with the name t.Name
Then the response status code is 400 (Bad Request)
And the response content includes an error with the error code "error.platform.validation.device.tierNameAlreadyExists"
And the response content contains an error with the error code "error.platform.validation.device.tierNameAlreadyExists"
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void ThenTheResponseStatusCodeIs(int expectedStatusCode)
((int)_updateClientResponse!.Status).Should().Be(expectedStatusCode);
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
if (_getClientsResponse != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void ThenTheResponseStatusCodeIs(int expectedStatusCode)
((int)_identityDeletionProcessResponse!.Status).Should().Be(expectedStatusCode);
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
if (_identityResponse != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void ThenTheResponseContainsAnIndividualQuota()
_createQuotaResponse.Should().ComplyWithSchema();
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
if (_createQuotaResponse != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void ThenTheResponseStatusCodeIs(int expectedStatusCode)
((int)_postResponse!.Status).Should().Be(expectedStatusCode);
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
_postResponse!.Error.Should().NotBeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void ThenTheResponseContainsAListOfMessages()
_messagesResponse.Should().ComplyWithSchema();
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
if (_messagesResponse != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void ThenTheResponseContainsATierQuotaDefinition()
_createTierQuotaResponse.Should().ComplyWithSchema();
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
if (_createTierQuotaResponse != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void ThenTheResponseStatusCodeIs(int expectedStatusCode)
((int)_deleteResponse!.Status).Should().Be(expectedStatusCode);
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
_tierResponse!.Error.Should().NotBeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ User creates a Challenge

Scenario: Creating a Challenge as an anonymous user
Given the user is unauthenticated
When a POST request is sent to the Challenges endpoint without authentication
When a POST request is sent to the Challenges endpoint
Then the response status code is 201 (Created)
And the response contains a Challenge
And the Challenge does not contain information about the creator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Scenario: Requesting a nonexistent Challenge as an authenticated user
# Given the user is authenticated
# When a GET request is sent to the Challenges/{id} endpoint with <id>
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.invalidId"
# And the response content contains an error with the error code "error.platform.invalidId"
#Examples:
# | id | description |
# | CHLthishastoomanycharacters | More than 20 characters |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ Scenario: Deleting an un-onboarded Device
And d2 is deleted

Scenario: Deleting an onboarded Device is not possible
Given an Identity i with a device d1
When a DELETE request is sent to the Devices/{id} endpoint with d1.Id
Given an Identity i with a device d
When a DELETE request is sent to the Devices/{id} endpoint with d.Id
Then the response status code is 400 (Bad Request)
And the response content includes an error with the error code "error.platform.validation.device.deviceCannotBeDeleted"
And the response content contains an error with the error code "error.platform.validation.device.deviceCannotBeDeleted"
And d is not deleted

Scenario: Deleting a non existent Device
Given an Identity i with a device d1
When a DELETE request is sent to the Devices/{id} endpoint with a non existent id
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"
And d1 is not deleted

# baseApi is not capable to handle multiple identities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Scenario: There can only be one active deletion process
And an active deletion process for the identity exists
When a POST request is sent to the /Identities/Self/DeletionProcesses endpoint
Then the response status code is 400 (Bad Request)
And the response content includes an error with the error code "error.platform.validation.device.onlyOneActiveDeletionProcessAllowed"
And the response content contains an error with the error code "error.platform.validation.device.onlyOneActiveDeletionProcessAllowed"
14 changes: 7 additions & 7 deletions ConsumerApi.Tests.Integration/Features/Tokens/POST.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Scenario: Creating a Token as an anonymous user
# | Key | Value |
# | Content | {"expiresAt": "<tomorrow>"} |
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
# And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
#
#@ignore("skipping_due_to_required_backbone_changes")
#Scenario: Creating a Token with an empty "Content" request content property
Expand All @@ -30,7 +30,7 @@ Scenario: Creating a Token as an anonymous user
# | Key | Value |
# | Content | {"content": "","expiresAt": "<tomorrow>"} |
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
# And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
#
#@ignore("skipping_due_to_required_backbone_changes")
#Scenario: Creating a Token with an invalid base64 in the "Content" property
Expand All @@ -39,7 +39,7 @@ Scenario: Creating a Token as an anonymous user
# | Key | Value |
# | Content | {"content": "<invalid base64>","expiresAt": "<tomorrow>"} |
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
# And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
#
#@ignore("skipping_due_to_required_backbone_changes")
#Scenario: Creating a Token without the "expiresAt" request content property
Expand All @@ -48,7 +48,7 @@ Scenario: Creating a Token as an anonymous user
# | Key | Value |
# | Content | {"content": "QQ=="} |
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
# And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
#
#@ignore("skipping_due_to_required_backbone_changes")
#Scenario: Creating a Token with a date in the past in the "expiresAt" request content property
Expand All @@ -57,21 +57,21 @@ Scenario: Creating a Token as an anonymous user
# | Key | Value |
# | Content | {"content": "QQ==","expiresAt": "<yesterday>"} |
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
# And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
#
#@ignore("skipping_due_to_required_backbone_changes")
#Scenario: Creating a Token without a request content
# Given the user is authenticated
# When a POST request is sent to the Tokens endpoint with no request content
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.inputCannotBeParsed"
# And the response content contains an error with the error code "error.platform.inputCannotBeParsed"
#
#@ignore("skipping_due_to_required_backbone_changes")
#Scenario Outline: Creating a Token with an invalid DateTime format in the "expiresAt" request content property
# Given the user is authenticated
# When a POST request is sent to the Tokens endpoint with '<Content>', '<ExpiresAt>'
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.validation.invalidPropertyValue"
# And the response content contains an error with the error code "error.platform.validation.invalidPropertyValue"
#Examples:
# | Content | ExpiresAt |
# | QQ== | 31/12/9999 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Scenario: Requesting a nonexistent Token as an authenticated user
Given the user is authenticated
When a GET request is sent to the Tokens/{id} endpoint with "TOKthisisnonexisting"
Then the response status code is 404 (Not Found)
And the response content includes an error with the error code "error.platform.recordNotFound"
And the response content contains an error with the error code "error.platform.recordNotFound"

#@ignore("skipping_due_to_required_backbone_changes")
#Scenario: Requesting a Token with an unsupported Accept Header
Expand All @@ -40,7 +40,7 @@ Scenario: Requesting a nonexistent Token as an authenticated user
#Scenario Outline: Requesting a Token with an invalid id
# When a GET request is sent to the Tokens/{id} endpoint with <id>
# Then the response status code is 400 (Bad Request)
# And the response content includes an error with the error code "error.platform.invalidId"
# And the response content contains an error with the error code "error.platform.invalidId"
#Examples:
# | id | description |
# | TOKthishastoomanycharacters | More than 20 characters |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task GivenAChallengeC()
}

[When("a POST request is sent to the Challenges endpoint with")]
public async Task WhenAPOSTRequestIsSentToTheChallengesEndpointWith(Table table)
public async Task WhenAPOSTRequestIsSentToTheChallengesEndpointWith()
{
_response = await _sdk.Challenges.CreateChallenge();
daniel-almeida-konkconsulting marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down Expand Up @@ -110,7 +110,7 @@ public void ThenTheResponseStatusCodeIs(int expectedStatusCode)
actualStatusCode.Should().Be(expectedStatusCode);
}

[Then(@"the response content includes an error with the error code ""([^""]+)""")]
[Then(@"the response content contains an error with the error code ""([^""]+)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
_response!.Error.Should().NotBeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public DevicesStepDefinitions(HttpClientFactory factory, IOptions<HttpConfigurat
_clientCredentials = new ClientCredentials(httpConfiguration.Value.ClientCredentials.ClientId, httpConfiguration.Value.ClientCredentials.ClientSecret);
}

[Given("an Identity i with a device d")]
[Given("an Identity i with a device d1")]
daniel-almeida-konkconsulting marked this conversation as resolved.
Show resolved Hide resolved
public async Task GivenAnIdentityIWithADeviceD()
public async Task GivenAnIdentityIWithADevice()
{
_sdk = await Client.CreateForNewIdentity(_httpClient, _clientCredentials, "somePassword");
_deviceIdD1 = _sdk.DeviceData!.DeviceId;
Expand All @@ -42,8 +43,9 @@ public async Task GivenAnUnOnboardedDeviceD2()
_deviceIdD2 = client.DeviceData!.DeviceId;
}

[When("a DELETE request is sent to the Devices/{id} endpoint with d.Id")]
[When("a DELETE request is sent to the Devices/{id} endpoint with d1.Id")]
daniel-almeida-konkconsulting marked this conversation as resolved.
Show resolved Hide resolved
public async Task WhenADeleteRequestIsSentToTheDeviceIdEndpointWithDId()
public async Task WhenADeleteRequestIsSentToTheDeviceIdEndpointWithTheDeviceId()
{
_deletionResponse = await _sdk.Devices.DeleteDevice(_deviceIdD1!);
}
Expand All @@ -66,7 +68,7 @@ public void ThenTheResponseStatusCodeIs(int expectedStatusCode)
((int)_deletionResponse!.Status).Should().Be(expectedStatusCode);
}

[Then(@"the response content includes an error with the error code ""([^""]*)""")]
[Then(@"the response content contains an error with the error code ""([^""]*)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
_deletionResponse!.Error.Should().NotBeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task WhenAPOSTRequestIsSentToTheIdentitiesEndpoint()
_identityResponse = await _sdk.Identities.CreateIdentity(createIdentityPayload);
}

[Then(@"the response content includes an error with the error code ""([^""]*)""")]
[Then(@"the response content contains an error with the error code ""([^""]*)""")]
public void ThenTheResponseContentIncludesAnErrorWithTheErrorCode(string errorCode)
{
_startDeletionProcessResponse!.Error.Should().NotBeNull();
Expand Down
Loading