diff --git a/app/config/database.php b/app/config/database.php
index 927adb590042..c0e856411d87 100755
--- a/app/config/database.php
+++ b/app/config/database.php
@@ -54,10 +54,10 @@ return array(
'mysql' => array(
'driver' => 'mysql',
- 'host' => getenv('DB_HOST'),
- 'database' => getenv('DB_NAME'),
- 'username' => getenv('DB_USER'),
- 'password' => getenv('DB_PASS'),
+ 'host' => 'localhost',
+ 'database' => 'ninja',
+ 'username' => 'ninja',
+ 'password' => 'ninja',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php
index 172f86e3b078..41956778434b 100755
--- a/app/controllers/InvoiceController.php
+++ b/app/controllers/InvoiceController.php
@@ -246,6 +246,7 @@ class InvoiceController extends \BaseController {
}
$input = json_decode(Input::get('data'));
+
$invoice = $input->invoice;
if ($errors = $this->invoiceRepo->getErrors($invoice))
diff --git a/app/views/header.blade.php b/app/views/header.blade.php
index 62e2e5f4b173..d6214918bc62 100755
--- a/app/views/header.blade.php
+++ b/app/views/header.blade.php
@@ -206,12 +206,14 @@
{{ Former::populateField('new_last_name', Auth::user()->last_name); }}
{{ Former::populateField('new_email', Auth::user()->email); }}
@endif
+
{{ Former::hidden('path')->value(Request::path()) }}
{{ Former::text('new_first_name')->label('First name') }}
{{ Former::text('new_last_name')->label('Last name') }}
- {{ Former::text('new_email')->label('Email') }}
- {{ Former::password('new_password')->label('Password') }}
- {{ Former::close() }}
+ {{ Former::text('new_email')->label('Email') }}
+ {{ Former::password('new_password')->label('Password') }}
+ {{ Former::close() }}
+
The email address is already regiestered
diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php
index 2dbf3f67e8cf..b130b01dd6d2 100755
--- a/app/views/invoices/edit.blade.php
+++ b/app/views/invoices/edit.blade.php
@@ -24,7 +24,7 @@
@@ -34,7 +34,7 @@
@@ -208,7 +208,7 @@
diff --git a/app/views/payments/edit.blade.php b/app/views/payments/edit.blade.php
index cd9211a3d6c6..e0fafb63c8fc 100755
--- a/app/views/payments/edit.blade.php
+++ b/app/views/payments/edit.blade.php
@@ -39,7 +39,7 @@
- {{ Button::lg_primary_submit('Save') }} |
+ {{ Button::lg_primary_submit_success('Save') }} |
{{ link_to('payments/' . ($payment ? $payment->public_id : ''), 'Cancel') }}
diff --git a/app/views/splash.blade.php b/app/views/splash.blade.php
index 7982be9abf7c..9c292243db66 100755
--- a/app/views/splash.blade.php
+++ b/app/views/splash.blade.php
@@ -83,7 +83,7 @@
diff --git a/codecept.phar b/codecept.phar
new file mode 100644
index 000000000000..3ef3fa547ac1
Binary files /dev/null and b/codecept.phar differ
diff --git a/codeception.yml b/codeception.yml
new file mode 100644
index 000000000000..f4d0ff9e9be1
--- /dev/null
+++ b/codeception.yml
@@ -0,0 +1,18 @@
+paths:
+ tests: tests
+ log: tests/_log
+ data: tests/_data
+ helpers: tests/_helpers
+settings:
+ bootstrap: _bootstrap.php
+ suite_class: \PHPUnit_Framework_TestSuite
+ colors: true
+ memory_limit: 1024M
+ log: true
+modules:
+ config:
+ Db:
+ dsn: 'mysql:host=localhost;dbname=ninja'
+ user: 'ninja'
+ password: 'ninja'
+ dump: tests/_data/dump.sql
diff --git a/composer.json b/composer.json
index 51e0668d397d..93a5dc2ea1f9 100755
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,8 @@
"omnipay/omnipay": "2.x",
"intervention/image": "dev-master",
"webpatser/laravel-countries": "dev-master",
- "anahkiasen/rocketeer": "dev-develop"
+ "anahkiasen/rocketeer": "dev-develop",
+ "codeception/codeception": "*"
},
"autoload": {
"classmap": [
diff --git a/composer.lock b/composer.lock
index c2da0d0793ee..b61359be70c4 100755
--- a/composer.lock
+++ b/composer.lock
@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
- "hash": "c5ddc3dddbc7d41a2d8929990a68536b",
+ "hash": "0373f16d12e501e049fc9caeffc95430",
"packages": [
{
"name": "anahkiasen/former",
@@ -351,6 +351,69 @@
],
"time": "2013-06-24 22:58:34"
},
+ {
+ "name": "codeception/codeception",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Codeception/Codeception.git",
+ "reference": "ec9f5a7470bf82788087aed13ca3240d3a9d1ca8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Codeception/Codeception/zipball/ec9f5a7470bf82788087aed13ca3240d3a9d1ca8",
+ "reference": "ec9f5a7470bf82788087aed13ca3240d3a9d1ca8",
+ "shasum": ""
+ },
+ "require": {
+ "fabpot/goutte": "*",
+ "facebook/webdriver": "~0.3",
+ "monolog/monolog": "*",
+ "php": ">=5.4.0",
+ "phpunit/phpunit": "3.7.*",
+ "symfony/console": "~2.3",
+ "symfony/event-dispatcher": "~2.3",
+ "symfony/finder": "~2.3",
+ "symfony/yaml": "~2.3"
+ },
+ "require-dev": {
+ "facebook/php-sdk": "3.*",
+ "videlalvaro/php-amqplib": "*"
+ },
+ "suggest": {
+ "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests"
+ },
+ "bin": [
+ "codecept"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Codeception": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Bodnarchuk",
+ "email": "davert@mail.ua",
+ "homepage": "http://codegyre.com"
+ }
+ ],
+ "description": "BDD-style testing framework",
+ "homepage": "http://codeception.com/",
+ "keywords": [
+ "BDD",
+ "TDD",
+ "acceptance testing",
+ "functional testing",
+ "unit testing"
+ ],
+ "time": "2014-02-01 00:19:30"
+ },
{
"name": "d11wtq/boris",
"version": "v1.0.8",
@@ -385,6 +448,100 @@
"notification-url": "https://packagist.org/downloads/",
"time": "2014-01-17 12:21:18"
},
+ {
+ "name": "fabpot/goutte",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/fabpot/Goutte.git",
+ "reference": "a30e84e28fbaf14909d2d007249c24cd0ecd425e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/fabpot/Goutte/zipball/a30e84e28fbaf14909d2d007249c24cd0ecd425e",
+ "reference": "a30e84e28fbaf14909d2d007249c24cd0ecd425e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-curl": "*",
+ "guzzle/http": "~3.1",
+ "php": ">=5.3.0",
+ "symfony/browser-kit": "~2.1",
+ "symfony/css-selector": "~2.1",
+ "symfony/dom-crawler": "~2.1",
+ "symfony/finder": "~2.1",
+ "symfony/process": "~2.1"
+ },
+ "require-dev": {
+ "guzzle/plugin-history": "~3.1",
+ "guzzle/plugin-mock": "~3.1"
+ },
+ "type": "application",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Goutte": "."
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "A simple PHP Web Scraper",
+ "homepage": "https://github.com/fabpot/Goutte",
+ "keywords": [
+ "scraper"
+ ],
+ "time": "2014-01-31 18:02:50"
+ },
+ {
+ "name": "facebook/webdriver",
+ "version": "v0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/facebook/php-webdriver.git",
+ "reference": "1b0facc33133f0ff990df8cebe7f2e19b2603da3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1b0facc33133f0ff990df8cebe7f2e19b2603da3",
+ "reference": "1b0facc33133f0ff990df8cebe7f2e19b2603da3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.19",
+ "phpunit/phpunit": "3.7.*"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "lib/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "A php client for WebDriver",
+ "homepage": "https://github.com/facebook/php-webdriver",
+ "keywords": [
+ "facebook",
+ "php",
+ "selenium",
+ "webdriver"
+ ],
+ "time": "2013-11-26 23:16:02"
+ },
{
"name": "filp/whoops",
"version": "1.0.10",
@@ -3135,6 +3292,381 @@
],
"time": "2014-01-22 03:16:33"
},
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "1.2.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "6ba4ed2895d538a039d5d5866edc4ec0424c7852"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6ba4ed2895d538a039d5d5866edc4ec0424c7852",
+ "reference": "6ba4ed2895d538a039d5d5866edc4ec0424c7852",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "phpunit/php-file-iterator": ">=1.3.0@stable",
+ "phpunit/php-text-template": ">=1.2.0@stable",
+ "phpunit/php-token-stream": ">=1.1.3@stable"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*@dev"
+ },
+ "suggest": {
+ "ext-dom": "*",
+ "ext-xdebug": ">=2.0.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "PHP/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ ""
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+ "keywords": [
+ "coverage",
+ "testing",
+ "xunit"
+ ],
+ "time": "2014-02-03 07:44:47"
+ },
+ {
+ "name": "phpunit/php-file-iterator",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
+ "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "File/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ ""
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
+ ],
+ "time": "2013-10-10 15:34:57"
+ },
+ {
+ "name": "phpunit/php-text-template",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
+ "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "Text/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ ""
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "keywords": [
+ "template"
+ ],
+ "time": "2014-01-30 17:20:04"
+ },
+ {
+ "name": "phpunit/php-timer",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+ "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "PHP/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ ""
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ],
+ "time": "2013-08-02 07:42:54"
+ },
+ {
+ "name": "phpunit/php-token-stream",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+ "reference": "292f4d5772dad5a12775be69f4a8dd663b20f103"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/292f4d5772dad5a12775be69f4a8dd663b20f103",
+ "reference": "292f4d5772dad5a12775be69f4a8dd663b20f103",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "PHP/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ ""
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Wrapper around PHP's tokenizer extension.",
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+ "keywords": [
+ "tokenizer"
+ ],
+ "time": "2013-10-21 14:03:39"
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "3.7.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "2f33258fa5a0c330515b7deba2bc040fa5c3953b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f33258fa5a0c330515b7deba2bc040fa5c3953b",
+ "reference": "2f33258fa5a0c330515b7deba2bc040fa5c3953b",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=5.3.3",
+ "phpunit/php-code-coverage": "~1.2.1",
+ "phpunit/php-file-iterator": ">=1.3.1",
+ "phpunit/php-text-template": ">=1.1.1",
+ "phpunit/php-timer": ">=1.0.4",
+ "phpunit/phpunit-mock-objects": "~1.2.0",
+ "symfony/yaml": "~2.0"
+ },
+ "require-dev": {
+ "pear-pear/pear": "1.9.4"
+ },
+ "suggest": {
+ "ext-json": "*",
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "phpunit/php-invoker": ">=1.1.0,<1.2.0"
+ },
+ "bin": [
+ "composer/bin/phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.7.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "PHPUnit/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ "",
+ "../../symfony/yaml/"
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "The PHP Unit Testing framework.",
+ "homepage": "http://www.phpunit.de/",
+ "keywords": [
+ "phpunit",
+ "testing",
+ "xunit"
+ ],
+ "time": "2014-01-31 08:54:33"
+ },
+ {
+ "name": "phpunit/phpunit-mock-objects",
+ "version": "1.2.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "ed9c8ef8cecd7fa0e7dcee78970e5a972bcfd751"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ed9c8ef8cecd7fa0e7dcee78970e5a972bcfd751",
+ "reference": "ed9c8ef8cecd7fa0e7dcee78970e5a972bcfd751",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "phpunit/php-text-template": ">=1.1.1@stable"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*@dev"
+ },
+ "suggest": {
+ "ext-soap": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "PHPUnit/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ ""
+ ],
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Mock Object library for PHPUnit",
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+ "keywords": [
+ "mock",
+ "xunit"
+ ],
+ "time": "2014-01-30 16:40:39"
+ },
{
"name": "predis/predis",
"version": "0.8.x-dev",
@@ -4030,6 +4562,53 @@
"homepage": "http://symfony.com",
"time": "2014-01-24 14:36:08"
},
+ {
+ "name": "symfony/yaml",
+ "version": "dev-master",
+ "target-dir": "Symfony/Component/Yaml",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Yaml.git",
+ "reference": "9921872611710df49cf035c259e5a461ea2d0f8c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Yaml/zipball/9921872611710df49cf035c259e5a461ea2d0f8c",
+ "reference": "9921872611710df49cf035c259e5a461ea2d0f8c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Yaml\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Yaml Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-01-07 13:29:57"
+ },
{
"name": "webpatser/laravel-countries",
"version": "dev-master",
diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php
new file mode 100644
index 000000000000..f36fc70057b2
--- /dev/null
+++ b/tests/_bootstrap.php
@@ -0,0 +1,2 @@
+executeInSelenium(function(\WebDriver\Session $webdriver) {
+ * $webdriver->back();
+ * });
+ * ```
+ *
+ * Use [WebDriver Session API](https://github.com/facebook/php-webdriver)
+ * Not recommended this command too be used on regular basis.
+ * If Codeception lacks important Selenium methods implement then and submit patches.
+ *
+ * @param callable $function
+ * @see Codeception\Module\Selenium2::executeInSelenium()
+ * @return \Codeception\Maybe
+ */
+ public function executeInSelenium($function) {
+ $this->scenario->addStep(new \Codeception\Step\Action('executeInSelenium', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Perform a click on link or button.
+ * Link or button are found by their names or CSS selector.
+ * Submits a form if button is a submit type.
+ *
+ * If link is an image it's found by alt attribute value of image.
+ * If button is image button is found by it's value
+ * If link or button can't be found by name they are searched by CSS selector.
+ *
+ * The second parameter is a context: CSS or XPath locator to narrow the search.
+ *
+ * Examples:
+ *
+ * ``` php
+ * click('Logout');
+ * // button of form
+ * $I->click('Submit');
+ * // CSS button
+ * $I->click('#form input[type=submit]');
+ * // XPath
+ * $I->click('//form/*[@type=submit]')
+ * // link in context
+ * $I->click('Logout', '#nav');
+ * ?>
+ * ```
+ * @param $link
+ * @param $context
+ * @see Codeception\Module\Selenium2::click()
+ * @return \Codeception\Maybe
+ */
+ public function click($link, $context = null, $strict = null) {
+ $this->scenario->addStep(new \Codeception\Step\Action('click', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Accept alert or confirm popup
+ *
+ * Example:
+ * ``` php
+ * click('Show alert popup');
+ * $I->acceptPopup();
+ *
+ * ```
+ * @see Codeception\Module\Selenium2::acceptPopup()
+ * @return \Codeception\Maybe
+ */
+ public function acceptPopup() {
+ $this->scenario->addStep(new \Codeception\Step\Action('acceptPopup', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Dismiss alert or confirm popup
+ *
+ * Example:
+ * ``` php
+ * click('Show confirm popup');
+ * $I->cancelPopup();
+ *
+ * ```
+ * @see Codeception\Module\Selenium2::cancelPopup()
+ * @return \Codeception\Maybe
+ */
+ public function cancelPopup() {
+ $this->scenario->addStep(new \Codeception\Step\Action('cancelPopup', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Checks if popup contains the $text
+ *
+ * Example:
+ * ``` php
+ * click('Show alert popup');
+ * $I->seeInPopup('Error message');
+ *
+ * ```
+ *
+ * @param string $text
+ * Conditional Assertion: Test won't be stopped on fail
+ * @see Codeception\Module\Selenium2::seeInPopup()
+ * @return \Codeception\Maybe
+ */
+ public function canSeeInPopup($text) {
+ $this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('seeInPopup', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Checks if popup contains the $text
+ *
+ * Example:
+ * ``` php
+ * click('Show alert popup');
+ * $I->seeInPopup('Error message');
+ *
+ * ```
+ *
+ * @param string $text
+ * @see Codeception\Module\Selenium2::seeInPopup()
+ * @return \Codeception\Maybe
+ */
+ public function seeInPopup($text) {
+ $this->scenario->addStep(new \Codeception\Step\Assertion('seeInPopup', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Check if popup don't contains the $text
+ *
+ * Example:
+ * ``` php
+ * click();
+ * $I->dontSeeInPopup('Error message');
+ *
+ * ```
+ *
+ * @param string $text
+ * Conditional Assertion: Test won't be stopped on fail
+ * @see Codeception\Module\Selenium2::dontSeeInPopup()
+ * @return \Codeception\Maybe
+ */
+ public function cantSeeInPopup($text) {
+ $this->scenario->addStep(new \Codeception\Step\ConditionalAssertion('dontSeeInPopup', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Check if popup don't contains the $text
+ *
+ * Example:
+ * ``` php
+ * click();
+ * $I->dontSeeInPopup('Error message');
+ *
+ * ```
+ *
+ * @param string $text
+ * @see Codeception\Module\Selenium2::dontSeeInPopup()
+ * @return \Codeception\Maybe
+ */
+ public function dontSeeInPopup($text) {
+ $this->scenario->addStep(new \Codeception\Step\Assertion('dontSeeInPopup', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Switch to another window identified by its name.
+ *
+ * The window can only be identified by its name. If the $name parameter is blank it will switch to the parent window.
+ *
+ * Example:
+ * ``` html
+ *
+ * ```
+ *
+ * ``` php
+ * click("Open window");
+ * # switch to another window
+ * $I->switchToWindow("another_window");
+ * # switch to parent window
+ * $I->switchToWindow();
+ * ?>
+ * ```
+ *
+ * If the window has no name, the only way to access it is via the `executeInSelenium()` method like so:
+ *
+ * ```
+ * executeInSelenium(function (\Webdriver\Session $webdriver) {
+ * $handles=$webdriver->window_handles();
+ * $last_window = end($handles);
+ * $webdriver->focusWindow($last_window);
+ * });
+ * ?>
+ * ```
+ *
+ * @param string|null $name
+ * @see Codeception\Module\Selenium2::switchToWindow()
+ * @return \Codeception\Maybe
+ */
+ public function switchToWindow($name = null) {
+ $this->scenario->addStep(new \Codeception\Step\Action('switchToWindow', func_get_args()));
+ if ($this->scenario->running()) {
+ $result = $this->scenario->runStep();
+ return new Maybe($result);
+ }
+ return new Maybe();
+ }
+
+
+ /**
+ * This method is generated.
+ * Documentation taken from corresponding module.
+ * ----------------------------------------------
+ *
+ * Switch to another frame
+ *
+ * Example:
+ * ``` html
+ *