Skip to content

Commit bdabeb5

Browse files
committed
auto updated documentation
1 parent e247f6b commit bdabeb5

File tree

6 files changed

+244
-42
lines changed

6 files changed

+244
-42
lines changed

changelog.markdown

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,48 @@ title: Codeception Changelog
99

1010
#### 2.2.8
1111

12+
* **[WebDriver]** Added tab actions (not supported in PhantomJS):
13+
* `openNewTab` opens a new tab and switches to it
14+
* `closeTab` closes a tab and switches to previous
15+
* `switchToNextTab` switches to next tab
16+
* `switchToPreviousTab` switches to previous tab
17+
* **[WebDriver]** Added actions to click element by coordinates. Via **[gimler](https://github.com/gimler)**
18+
* `clickWithLeftButton` clicks element with offset
19+
* `clickWithRightButton` right clicks on element with offset
20+
* **[WebDriver]** Added `js_error_logging` option to print JS logs in console and in HTML report by **[ngraf](https://github.com/ngraf)**. See [#3821](https://github.com/Codeception/Codeception/issues/3821)
21+
* **[WebDriver]** Improvements to `seeInField` by **[gimler](https://github.com/gimler)**. See [#3905](https://github.com/Codeception/Codeception/issues/3905)
22+
* support option text in seeInField not only value
23+
* fix bug match with and without whitespaces
24+
* fix bug seeInField not working after selectOption
25+
* **[Wedriver]** `pageload_timeout` config option added. The amount of time to wait for a page load to complete before throwing an error. This patch allows to reduce issues from phantomjs random freezing. See [#3874](https://github.com/Codeception/Codeception/issues/3874). Thanks to **[oprudkyi](https://github.com/oprudkyi)**
26+
* **[WebDriver]** `checkOption` can check option by name [#3852](https://github.com/Codeception/Codeception/issues/3852). By **[gimler](https://github.com/gimler)**
27+
* **[WebDriver]** Fixed clicking numerical links, like `<a href='/'>222</a>` (DOM Exception 12 errors). See [#3865](https://github.com/Codeception/Codeception/issues/3865). By **[gimler](https://github.com/gimler)**
28+
* [PhpBrowser][Frameworks] Fixed [#3824](https://github.com/Codeception/Codeception/issues/3824) when submitForm used wrong value for `select` by **[JorisVanEijden](https://github.com/JorisVanEijden)**
1229
* **[Laravel5]** Added `seeNumRecords` and `grabNumRecords` methods. See [#3816](https://github.com/Codeception/Codeception/issues/3816). By **[dmoreno](https://github.com/dmoreno)**
13-
30+
* Improved `@depends` to work with `@dataprovider`. Fixes [#3862](https://github.com/Codeception/Codeception/issues/3862). Thanks **[edno](https://github.com/edno)**
31+
* Fixed relative paths for screenshots in HTML report. Fixes [#3857](https://github.com/Codeception/Codeception/issues/3857)
32+
* Improved error description when injecting invalid classes by **[timtkachenko](https://github.com/timtkachenko)**
33+
* Improved `--override` option to support deep configs. See [#3820](https://github.com/Codeception/Codeception/issues/3820)
34+
* **[Yii2]** Clear unloaded fixtures after test. Closes [#3794](https://github.com/Codeception/Codeception/issues/3794)
35+
* **[PhpBrowser]** Ensure sessions have independent cookies by **[insightfuls](https://github.com/insightfuls)**. Fixes [#3911](https://github.com/Codeception/Codeception/issues/3911)
36+
* Implemented load params from php files by **[arrilot](https://github.com/arrilot)**. See [#3914](https://github.com/Codeception/Codeception/issues/3914)
37+
* **[Yii2]** Fixes [#3916](https://github.com/Codeception/Codeception/issues/3916): Don't try to start transaction when working with non-transactional DBs by **[samdark](https://github.com/samdark)**.
38+
* **[REST]** Removed broken xdebug_remote functionality by **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#3883](https://github.com/Codeception/Codeception/issues/3883)
39+
* Added graceful termination by Ctrl-C in PHP 7.1 by **[AdrianSkierniewski](https://github.com/AdrianSkierniewski)**. See [#3907](https://github.com/Codeception/Codeception/issues/3907)
40+
* **[Db]** Disconnect after initializing when using reconnect, fixes [#3903](https://github.com/Codeception/Codeception/issues/3903). By **[insightfuls](https://github.com/insightfuls)**
41+
* **[Phalcon]** Fixed handling `$_SERVER` with Phalcon Connector by **[sergeyklay](https://github.com/sergeyklay)**
42+
* Avoid notice when checking width of terminal on Windows by **[ashnazg](https://github.com/ashnazg)**. See [#3893](https://github.com/Codeception/Codeception/issues/3893)
43+
* **[Filesystem]** `dontSeeFileFound` searches in path by **[Naktibalda](https://github.com/Naktibalda)**. Fixes [#3877](https://github.com/Codeception/Codeception/issues/3877)
44+
* [PhpBrowser][Frameworks] `grabValueFrom` to work after `fillField` by **[wumouse](https://github.com/wumouse)**. Fix [#3866](https://github.com/Codeception/Codeception/issues/3866)
45+
* **[Db]** Oci driver to cleans up views [#3881](https://github.com/Codeception/Codeception/issues/3881), and result set improvements [#3840](https://github.com/Codeception/Codeception/issues/3840) by **[ashnazg](https://github.com/ashnazg)**.
46+
* **[Yii2]** Close transaction created by the controller-action on interruption. See [#3834](https://github.com/Codeception/Codeception/issues/3834). By **[alex20465](https://github.com/alex20465)**
47+
* **[Yii2]** Fixed using `part: init` with other modules like WebDriver. See [#3876](https://github.com/Codeception/Codeception/issues/3876). By **[margori](https://github.com/margori)**
48+
* **[REST]** Implemented `dontSeeResponseJsonMatchesXpath` method by **[Naktibalda](https://github.com/Naktibalda)**. Closes [#3843](https://github.com/Codeception/Codeception/issues/3843)
49+
* **[REST]** Convert array having single element to XML correctly. Fixes [#3827](https://github.com/Codeception/Codeception/issues/3827) by **[Naktibalda](https://github.com/Naktibalda)**
50+
* Linter to check `exec` function to be enabled before using it. By **[Naktibalda](https://github.com/Naktibalda)**. See [#3886](https://github.com/Codeception/Codeception/issues/3886)
51+
* Fixed [#3922](https://github.com/Codeception/Codeception/issues/3922): division by zero in steps output on small terminal windows.
52+
* Improved getting terminal width from ENV variable (bash). Fixes [#3788](https://github.com/Codeception/Codeception/issues/3788) by **[schmunk42](https://github.com/schmunk42)**
53+
1454
#### 2.2.7
1555

1656
* **Config validation** with `codecept config:validate` command. Use it:

docs/06-ModulesAndHelpers.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ Use `$this->config['parameter']` to get its value.
483483

484484
Modules can be dynamically configured from environment variables.
485485
Parameter storage should be specified in the global `codeception.yml` configuration inside the `params` section.
486-
Parameters can be loaded from environment vars, from yaml (Symfony format), .env (Laravel format) or ini files.
486+
Parameters can be loaded from environment vars, from yaml (Symfony format), .env (Laravel format), ini, or php files.
487487

488488
Use the `params` section of the global configuration file `codeception.yml` to specify how to load them.
489489
You can specify several sources for parameters to be loaded from.
@@ -497,7 +497,7 @@ params:
497497

498498
{% endhighlight %}
499499

500-
Example: load parameters a yaml file (Symfony):
500+
Example: load parameters from YAML file (Symfony):
501501

502502
{% highlight yaml %}
503503

@@ -506,7 +506,16 @@ params:
506506

507507
{% endhighlight %}
508508

509-
Example: load parameters from env files (Laravel):
509+
Example: load parameters from php file (Yii)
510+
511+
{% highlight yaml %}
512+
513+
params:
514+
- config/params.php
515+
516+
{% endhighlight %}
517+
518+
Example: load parameters from .env files (Laravel):
510519

511520
{% highlight yaml %}
512521

docs/11-Codecoverage.md

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,7 @@ coverage:
2828

2929
{% endhighlight %}
3030

31-
That's ok for now. But what files should be present in final coverage report? You can filter files by providing blacklist and whitelist filters like this:
32-
33-
{% highlight yaml %}
34-
35-
coverage:
36-
enabled: true
37-
whitelist:
38-
include:
39-
- app/*
40-
exclude:
41-
- app/cache/*
42-
blacklist:
43-
include:
44-
- app/controllers/*
45-
exclude:
46-
- app/cache/CacheProvider.php
47-
48-
49-
{% endhighlight %}
50-
What are whitelists and blacklists?
51-
52-
* A **whitelist** is a list of files that should be included in report even they were not touched.
53-
* A **blacklist** is a list of files that should be excluded from report even they were touched.
54-
55-
<div class="alert alert-info">
56-
The blacklist functionality has been removed from PHPUnit 5, but it can still be used with PHPUnit 4.8.
57-
</div>
31+
That's ok for now. But what files should be present in final coverage report?
5832
Pass an array of files or directory to include/exclude sections. The path ending with '\*' matches the directory.
5933
Also you can use '\*' mask in a file name, i.e. `app/models/*Model.php` to match all models.
6034

@@ -70,10 +44,20 @@ coverage:
7044
- app/cache/*
7145

7246
{% endhighlight %}
47+
Include and exclude options can be redefined for each suite in corresponding config files.
48+
49+
By default, if coverage is reported to be < 35% it is marked as low, and >70% is high coverage.
50+
You can also define high and low boundaries with `low_limit` and `high_limit` config options:
51+
52+
{% highlight yaml %}
53+
54+
coverage:
55+
enabled: true
56+
low_limit: 30
57+
high_limit: 60
7358

74-
These `include` and `exclude` options are to add or remove files from a whitelist.
59+
{% endhighlight %}
7560

76-
All these settings can be redefined for each suite in their config files.
7761

7862
## Local CodeCoverage
7963

docs/modules/AngularJS.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,20 @@ $I->clickWithRightButton(['css' => '.checkout'], 20, 50);
331331
@throws \Codeception\Exception\ElementNotFound
332332

333333

334+
#### closeTab
335+
336+
Closes current browser tab and switches to previous active tab.
337+
338+
{% highlight php %}
339+
340+
<?php
341+
$I->closeTab();
342+
343+
{% endhighlight %}
344+
345+
Can't be used with PhantomJS
346+
347+
334348
#### debugWebDriverLogs
335349

336350
Print out latest Selenium Logs in debug mode
@@ -455,6 +469,7 @@ $I->dontSeeElement('input', ['value' => '123456']);
455469
Opposite of `seeElementInDOM`.
456470

457471
* `param` $selector
472+
* `param array` $attributes
458473

459474

460475
#### dontSeeInCurrentUrl
@@ -874,6 +889,23 @@ $I->moveMouseOver(['css' => '.checkout'], 20, 50);
874889
@throws \Codeception\Exception\ElementNotFound
875890

876891

892+
#### openNewTab
893+
894+
Opens a new browser tab (wherever it is possible) and switches to it.
895+
896+
{% highlight php %}
897+
898+
<?php
899+
$I->openNewTab();
900+
901+
{% endhighlight %}
902+
Tab is opened by using `window.open` javascript in a browser.
903+
Please note, that adblock can restrict creating such tabs.
904+
905+
Can't be used with PhantomJS
906+
907+
908+
877909
#### pauseExecution
878910

879911
Pauses test execution in debug mode.
@@ -1102,6 +1134,7 @@ $I->seeElementInDOM('//form/input[type=hidden]');
11021134
{% endhighlight %}
11031135

11041136
* `param` $selector
1137+
* `param array` $attributes
11051138

11061139

11071140
#### seeInCurrentUrl
@@ -1236,6 +1269,8 @@ as created by `window.alert`|`window.confirm`|`window.prompt`, contains the give
12361269

12371270
* `param` $text
12381271

1272+
@throws \Codeception\Exception\ModuleException
1273+
12391274

12401275
#### seeInSource
12411276

@@ -1588,6 +1623,46 @@ $I->switchToIFrame();
15881623
* `param string|null` $name
15891624
15901625
1626+
#### switchToNextTab
1627+
1628+
Switches to next browser tab.
1629+
An offset can be specified.
1630+
1631+
{% highlight php %}
1632+
1633+
<?php
1634+
// switch to next tab
1635+
$I->switchToNextTab();
1636+
// switch to 2nd next tab
1637+
$I->switchToNextTab(2);
1638+
1639+
{% endhighlight %}
1640+
1641+
Can't be used with PhantomJS
1642+
1643+
* `param int` $offset 1
1644+
1645+
1646+
#### switchToPreviousTab
1647+
1648+
Switches to next browser tab.
1649+
An offset can be specified.
1650+
1651+
{% highlight php %}
1652+
1653+
<?php
1654+
// switch to previous tab
1655+
$I->switchToNextTab();
1656+
// switch to 2nd previous tab
1657+
$I->switchToNextTab(-2);
1658+
1659+
{% endhighlight %}
1660+
1661+
Can't be used with PhantomJS
1662+
1663+
* `param int` $offset 1
1664+
1665+
15911666
#### switchToWindow
15921667
15931668
Switch to another window identified by name.
@@ -1613,7 +1688,9 @@ $I->switchToWindow();
16131688
16141689
{% endhighlight %}
16151690
1616-
If the window has no name, the only way to access it is via the `executeInSelenium()` method, like so:
1691+
If the window has no name, match it by switching to next active tab using `switchToNextTab` method.
1692+
1693+
Or use native Selenium functions to get access to all opened windows:
16171694
16181695
{% highlight php %}
16191696
@@ -1636,6 +1713,8 @@ Enters text into a native JavaScript prompt popup, as created by `window.prompt`
16361713
16371714
* `param` $keys
16381715
1716+
@throws \Codeception\Exception\ModuleException
1717+
16391718
16401719
#### uncheckOption
16411720

0 commit comments

Comments
 (0)