- World
- ~World
- .baseUrl
- .baseGraphQLUrl
- .req
- .req
- .apiSpec
- .currentAgent
- .currentAgent
- .newAgent()
- .getAgentByRole(role)
- .setAgentByRole(role, agent)
- .getEndpointSpec()
- .getOAuthAccessToken(url, credentials)
- .replaceVars(val)
- .replaceVariablesInitiator()
- .getResponse(res)
- .saveCurrentResponse()
- .retrieveResponse(resource, method, status)
- ~World
State and stateful utilities can be shared between steps using an instance of "World"
Kind: inner class of World
- ~World
- .baseUrl
- .baseGraphQLUrl
- .req
- .req
- .apiSpec
- .currentAgent
- .currentAgent
- .newAgent()
- .getAgentByRole(role)
- .setAgentByRole(role, agent)
- .getEndpointSpec()
- .getOAuthAccessToken(url, credentials)
- .replaceVars(val)
- .replaceVariablesInitiator()
- .getResponse(res)
- .saveCurrentResponse()
- .retrieveResponse(resource, method, status)
Getter for the baseUrl
used for all requests
Kind: instance property of World
Getter for the baseGraphQLUrl
used for all requests
Kind: instance property of World
Getter for the currently active Superagent request object
Kind: instance property of World
Setter for the active request
Kind: instance property of World
Getter for the full Open API spec
Kind: instance property of World
Getter for the current Superagent agent. Reuse this agent in step definitions to preserve client sessions
Kind: instance property of World
Setter for the current Superagent agent. Reuse this agent in step definitions to preserve client sessions
Kind: instance property of World
Creates and returns a new SuperAgent agent
Kind: instance method of World
Get a Superagent agent for a specific authorization role
Kind: instance method of World
Param | Type | Description |
---|---|---|
role | string |
The role, such as 'admin' |
Save a Superagent agent for a given authorization role
Kind: instance method of World
Param | Type |
---|---|
role | string |
agent | * |
Get part of the Open API spec for just a single endpoint (resource + method)
Kind: instance method of World
Get an Oauth2 access token, by sending the credentials to the endpoint url
Kind: instance method of World
Param | Type | Description |
---|---|---|
url | * |
The full token url () |
credentials | * |
Replace placeholders in a value with variables currently stored from environemtn config and previous responses.
Kind: instance method of World
Param | Type |
---|---|
val | * |
Returns Super Agent middleware that replaces placeholders with variables
Kind: instance method of World
Gets the body from a response. Includes logic to parse JSON from JSON responses that have an incorrect 'text/html' content type.
Kind: instance method of World
Param | Description |
---|---|
res | A Superagent response object |
Save the current response so its values can be used for future requests
Kind: instance method of World
Retrieve a response cached by saveCurrentResponse
Kind: instance method of World
Param | Type | Default | Description |
---|---|---|---|
resource | An HTTP resource | ||
method | * |
An HTTP method | |
status | * |
200 |
The response status, defaults to 200 |