8000 Release 2.6.10 by Vorobeyko · Pull Request #2555 · codeceptjs/CodeceptJS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release 2.6.10 #2555

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

Merged
merged 1 commit into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.10

* Fixed saving options for suite via `Feature('title', {key: value})` by @Diokuz. See #2553 and [Docs](https://codecept.io/advanced/#dynamic-configuration)

## 2.6.9

* [Puppeteer][Playwright] SessionStorage is now cleared in after hook. See #2524
Expand Down
21 changes: 21 additions & 0 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,27 @@ Feature('My feature', {key: val});
Scenario('My scenario', {key: val}, (I) => {});
```

You can use this options for build your own [plugins](https://codecept.io/hooks/#plugins) with [event listners](https://codecept.io/hooks/#api). Example:

```js
// for test
event.dispatcher.on(event.test.before, (test) => {
...
if (test.opts.key) {
...
}
...
});
// or for suite
event.dispatcher.on(event.suite.before, (suite) => {
...
if (suite.opts.key) {
...
}
...
});
```

### Timeout

By default there is no timeout for tests, however you can change this value for a specific suite:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeceptjs",
"version": "2.6.9",
"version": "2.6.10",
"description": "Supercharged End 2 End Testing Framework for NodeJS",
"keywords": [
"acceptance",
Expand Down
7 changes: 6 additions & 1 deletion test/unit/ui_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ describe('ui', () => {
it('Feature are not skipped by default', () => {
suiteConfig = context.Feature('not skipped suite');
assert.equal(suiteConfig.suite.pending, false, 'Feature must not contain pending === true');
assert.equal(suiteConfig.suite.opts, undefined, 'Features should have no skip info');
assert.deepEqual(suiteConfig.suite.opts, {}, 'Features should have no skip info');
});

it('Feature should correctly pass options to suite context', () => {
suiteConfig = context.Feature('not skipped suite', { key: 'value' });
assert.deepEqual(suiteConfig.suite.opts, { key: 'value' }, 'Features should have passed options');
});
});

Expand Down
0