Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser.php
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | class Browser extends \Laravel\Dusk\Browser | ||||
public function clearToasts() | public function clearToasts() | ||||
{ | { | ||||
$this->script("jQuery('.toast-container > *').remove()"); | $this->script("jQuery('.toast-container > *').remove()"); | ||||
return $this; | return $this; | ||||
} | } | ||||
/** | /** | ||||
* Wait until a button becomes enabled and click it | |||||
*/ | |||||
public function clickWhenEnabled($selector) | |||||
{ | |||||
return $this->waitFor($selector . ':not([disabled])')->click($selector); | |||||
} | |||||
/** | |||||
* Check if in Phone mode | * Check if in Phone mode | ||||
*/ | */ | ||||
public static function isPhone() | public static function isPhone() | ||||
{ | { | ||||
return getenv('TESTS_MODE') == 'phone'; | return getenv('TESTS_MODE') == 'phone'; | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |