Skip to content

Commit

Permalink
[plugin-rest-api] Remove deprecated REST API steps (vividus-framework…
Browse files Browse the repository at this point in the history
…#4216)

Co-authored-by: draker94 <[email protected]>
  • Loading branch information
draker94 and web-flow authored Aug 10, 2023
1 parent e38fef7 commit eff13c6
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 580 deletions.
4 changes: 2 additions & 2 deletions docs/modules/commons/pages/variables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ When I set request headers:
\|name \|value \|
\|Content-Type\|application/json\|
When I execute HTTP POST request for resource with URL `${login-endpoint}`
Then the response code is equal to '200'
Then response code is equal to `200`
----

[WARNING]
Expand All @@ -129,7 +129,7 @@ When I set request headers:
\|name \|value \|
\|Content-Type\|application/json\|
When I execute HTTP POST request for resource with URL `/authenticate`
Then the response code is equal to '200'
Then response code is equal to `200`
----

|===
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/plugins/pages/plugin-excel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Then `$excelDocument` contains excel sheet with name `$name` and records:$record
[source,gherkin]
----
When I execute HTTP GET request for resource with URL `https://github.com/vividus-framework/vividus/blob/master/vividus-plugin-excel/src/test/resources/TestTemplate.xlsx?raw=true`
Then the response code is = '200'
Then response code is = `200`
Then `${response-as-bytes}` contains excel sheet with name `Mapping` and records:
{valueSeparator=!}
|cellsRange|valueRegex |
Expand All @@ -192,7 +192,7 @@ Then `$excelDocument` contains excel sheet with index `$index` and records:$reco
[source,gherkin]
----
When I execute HTTP GET request for resource with URL `https://github.com/vividus-framework/vividus/blob/master/vividus-plugin-excel/src/test/resources/TestTemplate.xlsx?raw=true`
Then the response code is = '200'
Then response code is = `200`
Then `${response-as-bytes}` contains excel sheet with index `0` and records:
{valueSeparator=!}
|cellsRange|valueRegex |
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/plugins/pages/plugin-json.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ${json-context}
.Validate the HTTP response matches the regular expression
[source,gherkin]
----
When I send HTTP GET to the relative URL '/get?productsPerPage=5'
When I execute HTTP GET request for resource with relative URL `/get?productsPerPage=5`
Then number of JSON elements from `${json-context}` by JSON path `$.product` is equal to 5
----

Expand Down
12 changes: 6 additions & 6 deletions docs/modules/plugins/pages/plugin-rest-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This expression allows to remove wrapping double quotes and use the value as is.
[source,gherkin]
----
When I save a JSON element from '${response}' by JSON path '$.id' to story variable 'id'
When I send HTTP GET to the relative URL 'rest/#{removeWrappingDoubleQuotes(${id})}'
When I execute HTTP GET request for resource with relative URL `rest/#{removeWrappingDoubleQuotes(${id})}`
----

.Examples of the expressions removing wrapping double quotes
Expand Down Expand Up @@ -160,7 +160,7 @@ ${response}
.Validate the HTTP response matches the regular expression
[source,gherkin]
----
When I send HTTP GET to the relative URL '/get?name=Content'
When I execute HTTP GET request for resource with relative URL `/get?name=Content`
Then `${response}` matches `.+Home.+`
----

Expand Down Expand Up @@ -194,7 +194,7 @@ ${response-code}
.Validate the HTTP response code
[source,gherkin]
----
When I send HTTP GET to the relative URL '/get?name=Content'
When I execute HTTP GET request for resource with relative URL `/get?name=Content`
Then `${response-code}` is equal to `200`
----

Expand Down Expand Up @@ -393,7 +393,7 @@ Given request body: #{loadBinaryResource(/data/image.png)}
When I set request headers:
|name |value |
|Content-Type|image/png|
When I send HTTP POST to the relative URL '/upload/png'
When I execute HTTP POST request for resource with relative URL `/upload/png`
----

=== Prepare multipart HTTP request
Expand Down Expand Up @@ -807,8 +807,8 @@ When I wait for response code $responseCode for $duration duration retrying $ret
[source,gherkin]
----
When I wait for response code `200` for `PT10S` duration retrying 3 times
|step |
|When I send HTTP GET to the relative URL '/delayed-resource'|
|step |
|When I execute HTTP GET request for resource with relative URL `/delayed-resource` |
----

=== Validate content type of response body
Expand Down
Loading

0 comments on commit eff13c6

Please sign in to comment.