This commit is contained in:
2020-10-06 14:27:47 +07:00
commit 586be80cf6
16613 changed files with 3274099 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?php
$I = new WebGuy($scenario);
$I->wantTo('call friend with steps to ask expert work');
$I->amOnPage('/info');
$john = $I->haveFriend('john', '\WebGuy\RootWatcherSteps');
$john->does(function (WebGuy\RootWatcherSteps $I) {
$I->seeInRootPage('Welcome to test app!');
});
$I->seeInCurrentUrl('/info');

View File

@@ -0,0 +1,10 @@
<?php
$I = new WebGuy($scenario);
$I->wantTo('call friends to try multi session');
$I->amOnPage('/info');
$jon = $I->haveFriend('jon');
$jon->does(function (WebGuy $I) {
$I->amOnPage('/');
$I->seeInCurrentUrl('/');
});
$I->seeInCurrentUrl('/info');

View File

@@ -0,0 +1,14 @@
<?php
$I = new WebGuy($scenario);
$I->wantTo('test leave bug');
$I->amOnPage('/info');
$jon = $I->haveFriend('jon');
$jon->does(function (WebGuy $I) {
$I->amOnPage('/');
$I->seeInCurrentUrl('/');
});
$I->see('Information', 'h1');
$jon->leave();
$I->see('Don\'t do that at home');

View File

@@ -0,0 +1,9 @@
<?php
$I = new WebGuy($scenario);
$I->wantTo('test two different browsers in one test');
$I->changeBrowser('chrome');
$I->amOnPage('/user-agent');
$I->see('Chrome');
$I->changeBrowser('firefox');
$I->amOnPage('/user-agent');
$I->see('Firefox');

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
<?php
// Here you can initialize variables that will for your tests
\Codeception\Util\Autoload::registerSuffix('Steps', __DIR__.DIRECTORY_SEPARATOR.'_steps');

View File

@@ -0,0 +1,12 @@
<?php
namespace WebGuy;
class RootWatcherSteps extends \WebGuy
{
public function seeInRootPage($selector)
{
$I = $this;
$I->amOnPage('/');
$I->see($selector);
}
}