Skip to content

Commit

Permalink
docs, import sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Dec 6, 2019
1 parent c342e3e commit 8c7ee6b
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Concerns/InteractsWithAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function login()
* Log into the application using a given user ID or email.
*
* @param object|string $userId
* @param string $guard
* @param string $guard
* @return $this
*/
public function loginAs($userId, $guard = null)
Expand Down
16 changes: 8 additions & 8 deletions src/Concerns/MakesAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ public function assertNotSelected($field, $value)
/**
* Assert that the given array of values are available to be selected.
*
* @param string $field
* @param array $values
* @param string $field
* @param array $values
* @return $this
*/
public function assertSelectHasOptions($field, array $values)
Expand All @@ -478,8 +478,8 @@ public function assertSelectHasOptions($field, array $values)
/**
* Assert that the given array of values are not available to be selected.
*
* @param string $field
* @param array $values
* @param string $field
* @param array $values
* @return $this
*/
public function assertSelectMissingOptions($field, array $values)
Expand All @@ -495,8 +495,8 @@ public function assertSelectMissingOptions($field, array $values)
/**
* Assert that the given value is available to be selected on the given field.
*
* @param string $field
* @param string $value
* @param string $field
* @param string $value
* @return $this
*/
public function assertSelectHasOption($field, $value)
Expand All @@ -507,8 +507,8 @@ public function assertSelectHasOption($field, $value)
/**
* Assert that the given value is not available to be selected on the given field.
*
* @param string $field
* @param string $value
* @param string $field
* @param string $value
* @return $this
*/
public function assertSelectMissingOption($field, $value)
Expand Down
4 changes: 4 additions & 0 deletions src/Concerns/ProvidesBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static function afterClass(Closure $callback)
*
* @param \Closure $callback
* @return \Laravel\Dusk\Browser|void
*
* @throws \Exception
* @throws \Throwable
*/
Expand Down Expand Up @@ -85,6 +86,7 @@ public function browse(Closure $callback)
*
* @param \Closure $callback
* @return array
*
* @throws \ReflectionException
*/
protected function createBrowsersFor(Closure $callback)
Expand Down Expand Up @@ -118,6 +120,7 @@ protected function newBrowser($driver)
*
* @param \Closure $callback
* @return int
*
* @throws \ReflectionException
*/
protected function browsersNeededFor(Closure $callback)
Expand Down Expand Up @@ -184,6 +187,7 @@ public static function closeAll()
* Create the remote web driver instance.
*
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
*
* @throws \Exception
*/
protected function createWebDriver()
Expand Down
14 changes: 12 additions & 2 deletions src/Concerns/WaitsForElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ trait WaitsForElements
* Execute the given callback in a scoped browser once the selector is available.
*
* @param string $selector
* @param Closure $callback
* @param \Closure $callback
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function whenAvailable($selector, Closure $callback, $seconds = null)
Expand All @@ -33,6 +34,7 @@ public function whenAvailable($selector, Closure $callback, $seconds = null)
* @param string $selector
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitFor($selector, $seconds = null)
Expand All @@ -50,6 +52,7 @@ public function waitFor($selector, $seconds = null)
* @param string $selector
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitUntilMissing($selector, $seconds = null)
Expand All @@ -73,6 +76,7 @@ public function waitUntilMissing($selector, $seconds = null)
* @param array|string $text
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitForText($text, $seconds = null)
Expand All @@ -92,6 +96,7 @@ public function waitForText($text, $seconds = null)
* @param string $link
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitForLink($link, $seconds = null)
Expand All @@ -109,6 +114,7 @@ public function waitForLink($link, $seconds = null)
* @param string $path
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitForLocation($path, $seconds = null)
Expand All @@ -125,6 +131,7 @@ public function waitForLocation($path, $seconds = null)
* @param array $parameters
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitForRoute($route, $parameters = [], $seconds = null)
Expand All @@ -139,6 +146,7 @@ public function waitForRoute($route, $parameters = [], $seconds = null)
* @param int $seconds
* @param string $message
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitUntil($script, $seconds = null, $message = null)
Expand Down Expand Up @@ -213,6 +221,7 @@ public function waitForDialog($seconds = null)
* @param Closure $callback
* @param int $seconds
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitForReload($callback = null, $seconds = null)
Expand All @@ -235,9 +244,10 @@ public function waitForReload($callback = null, $seconds = null)
*
* @param int $seconds
* @param int $interval
* @param Closure $callback
* @param \Closure $callback
* @param string|null $message
* @return $this
*
* @throws \Facebook\WebDriver\Exception\TimeOutException
*/
public function waitUsing($seconds, $interval, Closure $callback, $message = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ChromeDriverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ protected function rename($binary, $os)
/**
* Get the contents of a URL using the 'proxy' and 'ssl-no-verify' command options.
*
* @param string $url
* @param string $url
* @return string|bool
*/
protected function getUrl(string $url)
Expand Down
1 change: 1 addition & 0 deletions src/DuskServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function boot()
* Register any package services.
*
* @return void
*
* @throws \Exception
*/
public function register()
Expand Down
12 changes: 10 additions & 2 deletions src/ElementResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function pageElements(array $elements)
*
* @param string $field
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function resolveForTyping($field)
Expand All @@ -95,6 +96,7 @@ public function resolveForTyping($field)
*
* @param string $field
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function resolveForSelection($field)
Expand All @@ -111,9 +113,10 @@ public function resolveForSelection($field)
/**
* Resolve all the options with the given value on the select field.
*
* @param string $field
* @param array $values
* @param string $field
* @param array $values
* @return \Facebook\WebDriver\Remote\RemoteWebElement[]
*
* @throws \Exception
*/
public function resolveSelectOptions($field, array $values)
Expand All @@ -136,6 +139,7 @@ public function resolveSelectOptions($field, array $values)
* @param string $field
* @param string $value
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function resolveForRadioSelection($field, $value = null)
Expand All @@ -161,6 +165,7 @@ public function resolveForRadioSelection($field, $value = null)
* @param string|null $field
* @param string $value
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function resolveForChecking($field, $value = null)
Expand Down Expand Up @@ -189,6 +194,7 @@ public function resolveForChecking($field, $value = null)
*
* @param string $field
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function resolveForAttachment($field)
Expand All @@ -207,6 +213,7 @@ public function resolveForAttachment($field)
*
* @param string $field
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function resolveForField($field)
Expand Down Expand Up @@ -331,6 +338,7 @@ public function find($selector)
*
* @param array $selectors
* @return \Facebook\WebDriver\Remote\RemoteWebElement
*
* @throws \Exception
*/
public function firstOrFail($selectors)
Expand Down
2 changes: 2 additions & 0 deletions src/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function user($guard = null)
*
* @param string $userId
* @param string $guard
* @return void
*/
public function login($userId, $guard = null)
{
Expand All @@ -50,6 +51,7 @@ public function login($userId, $guard = null)
* Log the user out of the application.
*
* @param string $guard
* @return void
*/
public function logout($guard = null)
{
Expand Down
4 changes: 2 additions & 2 deletions stubs/DuskTestCase.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Tests;

use Laravel\Dusk\TestCase as BaseTestCase;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Laravel\Dusk\TestCase as BaseTestCase;

abstract class DuskTestCase extends BaseTestCase
{
Expand Down
4 changes: 2 additions & 2 deletions stubs/ExampleTest.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Tests\Browser;

use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;

class ExampleTest extends DuskTestCase
{
Expand Down

0 comments on commit 8c7ee6b

Please sign in to comment.