Skip to content

Commit

Permalink
Merge branch '3.x' of github.com:codeceptjs/CodeceptJS into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Jan 8, 2022
2 parents e6ff8cf + c56e96d commit 9752b5c
Show file tree
Hide file tree
Showing 23 changed files with 398 additions and 282 deletions.
16 changes: 8 additions & 8 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Here is an overview of available options with their defaults:
* **timeout**: `10000` - default tests timeout
* **output**: `"./output"` - where to store failure screenshots, etc
* **helpers**: `{}` - list of enabled helpers
* **mocha**: `{}` - mocha options, [reporters](http://codecept.io/reports/) can be configured here
* **multiple**: `{}` - multiple options, see [Multiple Execution](http://codecept.io/parallel#multiple-browsers-execution)
* **bootstrap**: `"./bootstrap.js"` - an option to run code _before_ tests are run. See [Hooks](http://codecept.io/hooks/#bootstrap-teardown)).
* **bootstrapAll**: `"./bootstrap.js"` - an option to run code _before_ all test suites are run when using the run-multiple mode. See [Hooks](http://codecept.io/hooks/#bootstrap-teardown)).
* **teardown**: - an option to run code _after_ all test suites are run when using the run-multiple mode. See [Hooks](http://codecept.io/hooks/#bootstrap-teardown).
* **teardownAll**: - an option to run code _after_ tests are run. See [Hooks](http://codecept.io/hooks/#bootstrap-teardown).
* **mocha**: `{}` - mocha options, [reporters](https://codecept.io/reports/) can be configured here
* **multiple**: `{}` - multiple options, see [Multiple Execution](https://codecept.io/parallel#multiple-browsers-execution)
* **bootstrap**: `"./bootstrap.js"` - an option to run code _before_ tests are run. See [Hooks](https://codecept.io/hooks/#bootstrap-teardown)).
* **bootstrapAll**: `"./bootstrap.js"` - an option to run code _before_ all test suites are run when using the run-multiple mode. See [Hooks](https://codecept.io/hooks/#bootstrap-teardown)).
* **teardown**: - an option to run code _after_ all test suites are run when using the run-multiple mode. See [Hooks](https://codecept.io/hooks/#bootstrap-teardown).
* **teardownAll**: - an option to run code _after_ tests are run. See [Hooks](https://codecept.io/hooks/#bootstrap-teardown).
* **noGlobals**: `false` - disable registering global variables like `Actor`, `Helper`, `pause`, `within`, `DataTable`
* **hooks**: - include custom listeners to plug into execution workflow. See [Custom Hooks](http://codecept.io/hooks/#custom-hooks)
* **translation**: - [locale](http://codecept.io/translation/) to be used to print s teps output, as well as used in source code.
* **hooks**: - include custom listeners to plug into execution workflow. See [Custom Hooks](https://codecept.io/hooks/#custom-hooks)
* **translation**: - [locale](https://codecept.io/translation/) to be used to print s teps output, as well as used in source code.
* **require**: `[]` - array of module names to be required before codecept starts. See [Require](#require)


Expand Down
2 changes: 1 addition & 1 deletion docs/custom-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class MyHelper extends Helper {
const { WebDriver } = this.helpers
const { browser } = WebDriver;

// get all cookies according to http://webdriver.io/api/protocol/cookie.html
// get all cookies according to https://webdriver.io/api/protocol/cookie.html
// any helper method should return a value in order to be added to promise chain
const res = await browser.cookie();
// get values
Expand Down
18 changes: 9 additions & 9 deletions docs/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Data Management

# Data Management

> This chapter describes data management for external sources. If you are looking for using Data Sets in tests, see [Data Driven Tests](http://codecept.io/advanced/#data-drivern-tests) section*
> This chapter describes data management for external sources. If you are looking for using Data Sets in tests, see [Data Driven Tests](https://codecept.io/advanced/#data-drivern-tests) section*
Managing data for tests is always a tricky issue. How isolate data between tests, how to prepare data for different tests, etc.
There are different approaches to solve it:
Expand All @@ -22,7 +22,7 @@ API is supposed to be a stable interface and it can be used by acceptance tests.

## REST

[REST helper](http://codecept.io/helpers/REST/) allows sending raw HTTP requests to application.
[REST helper](https://codecept.io/helpers/REST/) allows sending raw HTTP requests to application.
This is a tool to make shortcuts and create your data pragmatically via API. However, it doesn't provide tools for testing APIs, so it should be paired with WebDriver, Nightmare or Protractor helpers for browser testing.

Enable REST helper in the config. It is recommended to set `endpoint`, a base URL for all API requests. If you need some authorization you can optionally set default headers too.
Expand Down Expand Up @@ -87,11 +87,11 @@ This can also be used to emulate Ajax requests:
I.sendPostRequest('/update-status', {}, { http_x_requested_with: 'xmlhttprequest' });
```

> See complete reference on [REST](http://codecept.io/helpers/REST) helper
> See complete reference on [REST](https://codecept.io/helpers/REST) helper
## GraphQL

[GraphQL helper](http://codecept.io/helpers/GraphQL/) allows sending GraphQL queries and mutations to application, over Http.
[GraphQL helper](https://codecept.io/helpers/GraphQL/) allows sending GraphQL queries and mutations to application, over Http.
This is a tool to make shortcuts and create your data pragmatically via GraphQL endpoint. However, it doesn't provide tools for testing the endpoint, so it should be paired with WebDriver, Nightmare or Protractor helpers for browser testing.

Enable GraphQL helper in the config. It is recommended to set `endpoint`, the URL to which the requests go to. If you need some authorization you can optionally set default headers too.
Expand Down Expand Up @@ -160,13 +160,13 @@ After(({ I }) => {
});
```

> See complete reference on [GraphQL](http://codecept.io/helpers/GraphQL) helper
> See complete reference on [GraphQL](https://codecept.io/helpers/GraphQL) helper
## Data Generation with Factories

This concept is extended by:
- [ApiDataFactory](http://codecept.io/helpers/ApiDataFactory/) helper, and,
- [GraphQLDataFactory](http://codecept.io/helpers/GraphQLDataFactory/) helper.
- [ApiDataFactory](https://codecept.io/helpers/ApiDataFactory/) helper, and,
- [GraphQLDataFactory](https://codecept.io/helpers/GraphQLDataFactory/) helper.

These helpers build data according to defined rules and use REST API or GraphQL mutations to store them and automatically clean them up after a test.

Expand Down Expand Up @@ -238,7 +238,7 @@ At the end of a test ApiDataFactory will clean up created record for you. This i
ids from crated records and running `DELETE /api/users/{id}` requests at the end of a test.
This rules can be customized in helper configuration.

> See complete reference on [ApiDataFactory](http://codecept.io/helpers/ApiDataFactory) helper
> See complete reference on [ApiDataFactory](https://codecept.io/helpers/ApiDataFactory) helper
### GraphQL Data Factory

Expand Down Expand Up @@ -303,7 +303,7 @@ data from crated records, creating deletion mutation objects by passing the data
This behavior is according the `revert` function be customized in helper configuration.
The revert function returns an object, that contains the query for deletion, and the variables object to go along with it.
> See complete reference on [GraphQLDataFactory](http://codecept.io/helpers/GraphQLDataFactory) helper
> See complete reference on [GraphQLDataFactory](https://codecept.io/helpers/GraphQLDataFactory) helper
## Requests Using Browser Session
Expand Down
10 changes: 10 additions & 0 deletions docs/helpers/FileSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ I.seeInThisFile('FileSystem');
I.dontSeeInThisFile("WebDriverIO");
```

## Configuration

Enable helper in config file:

```js
helpers: {
FileSystem: {},
}
```

## Methods

### amInPath
Expand Down

0 comments on commit 9752b5c

Please sign in to comment.