forked from codeceptjs/CodeceptJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Codeception/master
merge
- Loading branch information
Showing
23 changed files
with
473 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#### What are you trying to achieve? | ||
|
||
#### What do you get instead? | ||
|
||
> Provide console output if related. Use `--verbose` mode for more details. | ||
```bash | ||
# paste output here | ||
``` | ||
> Provide test source code if related | ||
```php | ||
// paste test | ||
``` | ||
### Details | ||
|
||
* CodeceptJS version: | ||
* NodeJS Version: | ||
* Operating System: | ||
* Protractor || WebDriverIO || Nightmare version (if related) | ||
* Configuration file: | ||
|
||
```js | ||
# paste suite config here | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
Executes async script on page. | ||
Provided function should execute a passed callback (as first argument) to signal it is finished. | ||
|
||
@param fn | ||
@param fn | ||
@param args | ||
|
||
Examples for Vue.js. | ||
In order to make components completely rendered we are waiting for [nextTick](https://vuejs.org/v2/api/#Vue-nextTick). | ||
|
||
```js | ||
I.executeAsyncScript(function(done) { | ||
Vue.nextTick(done); // waiting for next tick | ||
}) | ||
``` | ||
|
||
By passing value to `done()` function you can return values. | ||
Additional arguments can be passed as well, while `done` function is always last parameter in arguments list. | ||
|
||
```js | ||
let val = yield I.executeAsyncScript(function(url, done) { | ||
// in browser context | ||
$.ajax(url, { success: (data) => done(data); } | ||
}, 'http://ajax.callback.url/'); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.