Skip to content

Commit ff657da

Browse files
committed
Merge branch 'dusk-wait-until-vue' of https://github.com/driesvints/docs into driesvints-dusk-wait-until-vue
2 parents 7f3593b + e3da11b commit ff657da

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dusk.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,16 @@ Sometimes you may wish to pause the execution of a test until a given JavaScript
551551
// Wait a maximum of one second for the expression to be true...
552552
$browser->waitUntil('App.data.servers.length > 0', 1);
553553

554+
#### Waiting On Vue Expressions
555+
556+
These work the same as the `waitUntil` methods above but will wait until a given Vue component's attribute has the given value at the given key or not:
557+
558+
// Wait until the component's key contains the given value.
559+
$browser->waitUntilVueIs('user.name', 'Taylor', '@user');
560+
561+
// Wait until the component's key doesn't contain the given value.
562+
$browser->waitUntilVueIsNot('user.name', null, '@user');
563+
554564
#### Waiting With A Callback
555565

556566
Many of the "wait" methods in Dusk rely on the underlying `waitUsing` method. You may use this method directly to wait for a given callback to return `true`. The `waitUsing` method accepts the maximum number of seconds to wait, the interval at which the Closure should be evaluated, the Closure, and an optional failure message:

0 commit comments

Comments
 (0)