diff --git a/.githook b/.githook
new file mode 100644
index 000000000..66311e3b5
--- /dev/null
+++ b/.githook
@@ -0,0 +1,16 @@
+config:
+ phpstan:
+ level: 0
+ architecture:
+ priority: 2
+
+preCommitFileCommands:
+ - GitHook\Command\FileCommand\PreCommit\CodeStyleCheckCommand
+ - GitHook\Command\FileCommand\PreCommit\CodeStyleFixCommand
+ - GitHook\Command\FileCommand\PreCommit\PhpMdCheckCommand
+ - GitHook\Command\FileCommand\PreCommit\PhpStanCheckCommand
+ - GitHook\Command\FileCommand\PreCommit\ArchitectureCheckCommand
+ - GitHook\Command\FileCommand\PreCommit\DependencyViolationCheckCommand
+
+preCommitRepositoryCommands:
+ - GitHook\Command\RepositoryCommand\PreCommit\GitAddCommand
diff --git a/.gitignore b/.gitignore
index 8b5b4055b..b90ed5d70 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,6 +64,9 @@ npm-debug.log
/tests/_support/_generated/*
!/tests/_support/_generated/.gitkeep
+/tests/PyzTest/*/*/_output/*
+/tests/PyzTest/*/*/_support/_generated/*
+
# propel classes
/src/Propel/Base/*
/src/Propel/Map/*
@@ -79,3 +82,4 @@ npm-debug.log
# tools
composer.phar
c3.php
+
diff --git a/codeception.yml b/codeception.yml
index 8c364d9b6..1212dd17f 100644
--- a/codeception.yml
+++ b/codeception.yml
@@ -1,5 +1,9 @@
+namespace: PyzTest
actor: Tester
+include:
+ - tests/PyzTest/*/*
+
paths:
tests: tests
log: tests/_output
@@ -25,4 +29,4 @@ extensions:
- Codeception\Extension\Phantoman
config:
Codeception\Extension\Phantoman:
- suites: ['Acceptance', 'Presentation']
+ suites: ['Presentation']
diff --git a/composer.json b/composer.json
index 26948997c..63197cbfd 100644
--- a/composer.json
+++ b/composer.json
@@ -177,9 +177,9 @@
"pdepend/pdepend": "^2.2.4",
"phploc/phploc": "^3.0.1",
"phpmd/phpmd": "~2.4.3",
- "sebastian/phpcpd": "~2.0.2",
- "sensiolabs/security-checker": "~3.0.2",
- "silex/web-profiler": "~1.0.8",
+ "sebastian/phpcpd": "^2.0.2",
+ "sensiolabs/security-checker": "^3.0.2",
+ "silex/web-profiler": "^1.0.8",
"symfony/web-profiler-bundle": "*",
"symfony/var-dumper": "*",
"site5/phantoman": "^1.1",
@@ -212,6 +212,14 @@
"Acceptance\\Auth\\": "vendor/spryker/auth/tests/"
}
},
+ "autoload-dev": {
+ "psr-0": {
+ "PyzTest": "tests"
+ },
+ "files": [
+ "test-autoload.php"
+ ]
+ },
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
@@ -246,10 +254,14 @@
"./deploy/heroku/run.sh"
],
"post-install-cmd": [
- "PhantomInstaller\\Installer::installPhantomJS"
+ "PhantomInstaller\\Installer::installPhantomJS",
+ "GitHook\\Composer\\Scripts\\HookInstaller::installSprykerHooks",
+ "GitHook\\Composer\\Scripts\\HookInstaller::installProjectHooks"
],
"post-update-cmd": [
- "PhantomInstaller\\Installer::installPhantomJS"
+ "PhantomInstaller\\Installer::installPhantomJS",
+ "GitHook\\Composer\\Scripts\\HookInstaller::installSprykerHooks",
+ "GitHook\\Composer\\Scripts\\HookInstaller::installProjectHooks"
]
}
}
diff --git a/config/Shared/ci/travis/config_ci.php b/config/Shared/ci/travis/config_ci.php
index 18be2a431..18d75a8d7 100644
--- a/config/Shared/ci/travis/config_ci.php
+++ b/config/Shared/ci/travis/config_ci.php
@@ -10,7 +10,6 @@
use Spryker\Shared\Kernel\Store;
use Spryker\Shared\Mail\MailConstants;
use Spryker\Shared\Payolution\PayolutionConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\Search\SearchConstants;
@@ -41,7 +40,6 @@
$config[ApplicationConstants::PORT_SSL_YVES]
);
$config[ProductManagementConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
-$config[PayoneConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[PayolutionConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[NewsletterConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[CustomerConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
@@ -142,29 +140,6 @@
// ---------- Email
$config[MailConstants::MAILCATCHER_GUI] = 'http://' . $config[ApplicationConstants::HOST_ZED] . ':1080';
-// ---------- Payone
-$config[PayoneConstants::PAYONE] = [
- PayoneConstants::PAYONE_CREDENTIALS_ENCODING => 'UTF-8',
- PayoneConstants::PAYONE_CREDENTIALS_KEY => getenv('PAYONE_CREDENTIALS_KEY'),
- PayoneConstants::PAYONE_CREDENTIALS_MID => getenv('PAYONE_CREDENTIALS_MID'),
- PayoneConstants::PAYONE_CREDENTIALS_AID => getenv('PAYONE_CREDENTIALS_AID'),
- PayoneConstants::PAYONE_CREDENTIALS_PORTAL_ID => getenv('PAYONE_CREDENTIALS_PORTAL_ID'),
- PayoneConstants::PAYONE_PAYMENT_GATEWAY_URL => 'https://api.pay1.de/post-gateway/',
- PayoneConstants::PAYONE_REDIRECT_SUCCESS_URL => sprintf(
- '%s/checkout/success/',
- $config[ApplicationConstants::BASE_URL_YVES]
- ),
- PayoneConstants::PAYONE_REDIRECT_ERROR_URL => sprintf(
- '/checkout/index/',
- $config[ApplicationConstants::BASE_URL_YVES]
- ),
- PayoneConstants::PAYONE_REDIRECT_BACK_URL => sprintf(
- '/checkout/regular-redirect-payment-cancellation/',
- $config[ApplicationConstants::BASE_URL_YVES]
- ),
- PayoneConstants::PAYONE_MODE => '',
-];
-
// ---------- Payolution
$config[PayolutionConstants::TRANSACTION_GATEWAY_URL] = 'https://test.ctpe.net/frontend/payment.prc';
$config[PayolutionConstants::CALCULATION_GATEWAY_URL] = 'https://test-payment.payolution.com/payolution-payment/rest/request/v2';
diff --git a/config/Shared/config_default-development-heroku.php b/config/Shared/config_default-development-heroku.php
index 56ec33c56..02863b271 100644
--- a/config/Shared/config_default-development-heroku.php
+++ b/config/Shared/config_default-development-heroku.php
@@ -10,7 +10,6 @@
use Spryker\Shared\EventJournal\EventJournalConstants;
use Spryker\Shared\Kernel\KernelConstants;
use Spryker\Shared\Log\LogConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\Search\SearchConstants;
use Spryker\Shared\Session\SessionConstants;
@@ -89,17 +88,6 @@
// ---------- Zed request
$config[ZedRequestConstants::TRANSFER_DEBUG_SESSION_FORWARD_ENABLED] = false;
-// ---------- Payone
-$config[PayoneConstants::PAYONE] = [
- PayoneConstants::PAYONE_CREDENTIALS_ENCODING => 'UTF-8',
- PayoneConstants::PAYONE_CREDENTIALS_KEY => '',
- PayoneConstants::PAYONE_CREDENTIALS_MID => '',
- PayoneConstants::PAYONE_CREDENTIALS_AID => '',
- PayoneConstants::PAYONE_CREDENTIALS_PORTAL_ID => '',
- PayoneConstants::PAYONE_PAYMENT_GATEWAY_URL => 'https://api.pay1.de/post-gateway/',
- PayoneConstants::PAYONE_MODE => '',
-];
-
// ---------- Navigation
$config[ZedNavigationConstants::ZED_NAVIGATION_CACHE_ENABLED] = true;
diff --git a/config/Shared/config_default-development-heroku_DE.php b/config/Shared/config_default-development-heroku_DE.php
index 16be5c161..09a0c5d6d 100644
--- a/config/Shared/config_default-development-heroku_DE.php
+++ b/config/Shared/config_default-development-heroku_DE.php
@@ -7,7 +7,6 @@
use Spryker\Shared\EventJournal\EventJournalConstants;
use Spryker\Shared\Mail\MailConstants;
use Spryker\Shared\Payolution\PayolutionConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Search\SearchConstants;
use Spryker\Shared\Session\SessionConstants;
@@ -32,7 +31,6 @@
$config[ApplicationConstants::PORT_SSL_YVES]
);
$config[ProductManagementConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
-$config[PayoneConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[PayolutionConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[NewsletterConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[CustomerConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
@@ -71,20 +69,6 @@
// ---------- Jenkins
$config[SetupConstants::JENKINS_BASE_URL] = 'http://localhost:10007/';
-// ---------- Payone
-$config[PayoneConstants::PAYONE][PayoneConstants::PAYONE_REDIRECT_SUCCESS_URL] = sprintf(
- '%s/checkout/success/',
- $config[ApplicationConstants::BASE_URL_YVES]
-);
-$config[PayoneConstants::PAYONE][PayoneConstants::PAYONE_REDIRECT_ERROR_URL] = sprintf(
- '%s/checkout/index/',
- $config[ApplicationConstants::BASE_URL_YVES]
-);
-$config[PayoneConstants::PAYONE][PayoneConstants::PAYONE_REDIRECT_BACK_URL] = sprintf(
- '%s/checkout/regular-redirect-payment-cancellation/',
- $config[ApplicationConstants::BASE_URL_YVES]
-);
-
// ---------- Elasticsearch
$ELASTICA_INDEX_NAME = 'de_search';
$config[ApplicationConstants::ELASTICA_PARAMETER__INDEX_NAME] = $ELASTICA_INDEX_NAME;
diff --git a/config/Shared/config_default-development.php b/config/Shared/config_default-development.php
index 5dcdb36e3..9cdc0f164 100644
--- a/config/Shared/config_default-development.php
+++ b/config/Shared/config_default-development.php
@@ -13,7 +13,6 @@
use Spryker\Shared\Kernel\KernelConstants;
use Spryker\Shared\Kernel\Store;
use Spryker\Shared\Log\LogConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\PropelQueryBuilder\PropelQueryBuilderConstants;
use Spryker\Shared\RabbitMq\RabbitMqConstants;
@@ -77,20 +76,6 @@
$config[ZedRequestConstants::TRANSFER_DEBUG_SESSION_FORWARD_ENABLED] = true;
$config[ZedRequestConstants::SET_REPEAT_DATA] = true;
-// ---------- Payone
-$config[PayoneConstants::PAYONE] = [
- PayoneConstants::PAYONE_CREDENTIALS_ENCODING => 'UTF-8',
- PayoneConstants::PAYONE_CREDENTIALS_KEY => '',
- PayoneConstants::PAYONE_CREDENTIALS_MID => '',
- PayoneConstants::PAYONE_CREDENTIALS_AID => '',
- PayoneConstants::PAYONE_CREDENTIALS_PORTAL_ID => '',
- PayoneConstants::PAYONE_PAYMENT_GATEWAY_URL => 'https://api.pay1.de/post-gateway/',
- PayoneConstants::PAYONE_REDIRECT_SUCCESS_URL => '',
- PayoneConstants::PAYONE_REDIRECT_ERROR_URL => '',
- PayoneConstants::PAYONE_REDIRECT_BACK_URL => '',
- PayoneConstants::PAYONE_MODE => '',
-];
-
// ---------- Twig
$config[TwigConstants::ZED_TWIG_OPTIONS] = [
'cache' => sprintf('%s/data/%s/cache/Yves/twig', APPLICATION_ROOT_DIR, $CURRENT_STORE),
diff --git a/config/Shared/config_default-development_DE.php b/config/Shared/config_default-development_DE.php
index 1f76bbe97..1b8f0733d 100644
--- a/config/Shared/config_default-development_DE.php
+++ b/config/Shared/config_default-development_DE.php
@@ -3,7 +3,6 @@
use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Shared\Collector\CollectorConstants;
use Spryker\Shared\Mail\MailConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\Queue\QueueConstants;
use Spryker\Shared\RabbitMq\RabbitMqConstants;
@@ -15,20 +14,6 @@
// ---------- Email
$config[MailConstants::MAILCATCHER_GUI] = sprintf('http://%s:1080', $config[ApplicationConstants::HOST_ZED]);
-// ---------- Payone
-$config[PayoneConstants::PAYONE][PayoneConstants::PAYONE_REDIRECT_SUCCESS_URL] = sprintf(
- '%s/checkout/success/',
- $config[ApplicationConstants::BASE_URL_YVES]
-);
-$config[PayoneConstants::PAYONE][PayoneConstants::PAYONE_REDIRECT_ERROR_URL] = sprintf(
- '%s/checkout/index/',
- $config[ApplicationConstants::BASE_URL_YVES]
-);
-$config[PayoneConstants::PAYONE][PayoneConstants::PAYONE_REDIRECT_BACK_URL] = sprintf(
- '%s/checkout/regular-redirect-payment-cancellation/',
- $config[ApplicationConstants::BASE_URL_YVES]
-);
-
// ---------- Elasticsearch
$ELASTICA_INDEX_NAME = 'de_search';
$config[ApplicationConstants::ELASTICA_PARAMETER__INDEX_NAME] = $ELASTICA_INDEX_NAME;
diff --git a/config/Shared/config_default-devtest.php b/config/Shared/config_default-devtest.php
index 7df83682d..9ccc8a9a0 100644
--- a/config/Shared/config_default-devtest.php
+++ b/config/Shared/config_default-devtest.php
@@ -6,8 +6,9 @@
use Pyz\Yves\Application\YvesBootstrap;
use Pyz\Zed\Application\Communication\ZedBootstrap;
+use Spryker\Shared\ErrorHandler\ErrorHandlerConstants;
+use Spryker\Shared\ErrorHandler\ErrorRenderer\WebExceptionErrorRenderer;
use Spryker\Shared\Kernel\KernelConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\RabbitMq\RabbitMqConstants;
use Spryker\Shared\Search\SearchConstants;
@@ -70,7 +71,5 @@
$config[SetupConstants::JENKINS_BASE_URL] = 'http://localhost:10007/';
$config[SetupConstants::JENKINS_DIRECTORY] = '/data/shop/development/shared/data/common/jenkins';
-// ---------- Payone
-$config[PayoneConstants::PAYONE] = [
- PayoneConstants::PAYONE_MODE => '',
-];
+// ---------- ErrorHandler
+$config[ErrorHandlerConstants::ERROR_RENDERER] = WebExceptionErrorRenderer::class;
diff --git a/config/Shared/config_default-devtest_DE.php b/config/Shared/config_default-devtest_DE.php
index eaa2a85bd..e27cab254 100644
--- a/config/Shared/config_default-devtest_DE.php
+++ b/config/Shared/config_default-devtest_DE.php
@@ -8,7 +8,6 @@
use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Shared\Customer\CustomerConstants;
use Spryker\Shared\Payolution\PayolutionConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\RabbitMq\RabbitMqConstants;
@@ -30,7 +29,6 @@
$config[ApplicationConstants::PORT_SSL_YVES]
);
$config[ProductManagementConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
-$config[PayoneConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[PayolutionConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[NewsletterConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[CustomerConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
@@ -57,6 +55,7 @@
$config[ApplicationConstants::YVES_TRUSTED_HOSTS] = [
$config[ApplicationConstants::HOST_YVES],
$config[ApplicationConstants::HOST_ZED],
+ 'localhost',
];
// ---------- Propel
diff --git a/config/Shared/config_default_DE.php b/config/Shared/config_default_DE.php
index c9cbd516e..f663ba030 100644
--- a/config/Shared/config_default_DE.php
+++ b/config/Shared/config_default_DE.php
@@ -5,7 +5,6 @@
use Spryker\Shared\Customer\CustomerConstants;
use Spryker\Shared\Event\EventConstants;
use Spryker\Shared\Payolution\PayolutionConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Session\SessionConstants;
use Spryker\Shared\ZedRequest\ZedRequestConstants;
@@ -25,7 +24,6 @@
$config[ApplicationConstants::PORT_SSL_YVES]
);
$config[ProductManagementConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
-$config[PayoneConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[PayolutionConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[NewsletterConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
$config[CustomerConstants::BASE_URL_YVES] = $config[ApplicationConstants::BASE_URL_YVES];
diff --git a/data/import/cms_block.csv b/data/import/cms_block.csv
index bc2b0d829..510c40af7 100644
--- a/data/import/cms_block.csv
+++ b/data/import/cms_block.csv
@@ -2,8 +2,8 @@ block_name,template_name,template_path,active,products,placeholder.title.de_DE,p
Teaser for home page,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,Static CMS Block,Static CMS Block,"
Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum. Proin malesuada metus ac tempor convallis. Pellentesque finibus, urna et vestibulum egestas, metus purus porta ligula, sit amet tincidunt dui justo vel nulla. Nam sodales nisi vel augue consectetur malesuada. Nulla semper neque a nunc tristique ullamcorper. Mauris at nisi non elit fringilla commodo. Curabitur at libero sed nisl condimentum cursus eget nec ligula. Aenean nec elit ut lacus feugiat fermentum. Phasellus quis quam mi. Duis id arcu quis ipsum viverra egestas at at diam. Cras vel dui maximus, scelerisque dui ut, suscipit lectus.
","Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus. Pellentesque sit amet sagittis justo, congue fringilla lacus. Sed vel dui et nunc sodales feugiat non in erat. Aliquam nunc mi, dignissim id tempor bibendum, sodales a tellus. Aliquam vitae efficitur turpis, quis consequat neque. Suspendisse interdum semper mi. Cras tortor justo, pretium at convallis a, lobortis non lorem. Duis ullamcorper sagittis efficitur. In erat libero, suscipit ac metus in, varius laoreet neque. Morbi ligula arcu, rutrum facilisis varius non, viverra id dui. Curabitur accumsan ultricies mauris eget vestibulum. Mauris pellentesque molestie nibh eu finibus. Fusce ut gravida massa, et vehicula arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed convallis erat ut mi pretium dapibus. Ut orci leo, scelerisque vitae velit a, ultricies porta ligula.
"
Product SEO content,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,"035,139,078,093,066,086",Product CMS Block,Product CMS Block,"Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum. Proin malesuada metus ac tempor convallis. Pellentesque finibus, urna et vestibulum egestas, metus purus porta ligula, sit amet tincidunt dui justo vel nulla. Nam sodales nisi vel augue consectetur malesuada. Nulla semper neque a nunc tristique ullamcorper. Mauris at nisi non elit fringilla commodo. Curabitur at libero sed nisl condimentum cursus eget nec ligula. Aenean nec elit ut lacus feugiat fermentum. Phasellus quis quam mi. Duis id arcu quis ipsum viverra egestas at at diam. Cras vel dui maximus, scelerisque dui ut, suscipit lectus.
","Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus. Pellentesque sit amet sagittis justo, congue fringilla lacus. Sed vel dui et nunc sodales feugiat non in erat. Aliquam nunc mi, dignissim id tempor bibendum, sodales a tellus. Aliquam vitae efficitur turpis, quis consequat neque. Suspendisse interdum semper mi. Cras tortor justo, pretium at convallis a, lobortis non lorem. Duis ullamcorper sagittis efficitur. In erat libero, suscipit ac metus in, varius laoreet neque. Morbi ligula arcu, rutrum facilisis varius non, viverra id dui. Curabitur accumsan ultricies mauris eget vestibulum. Mauris pellentesque molestie nibh eu finibus. Fusce ut gravida massa, et vehicula arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed convallis erat ut mi pretium dapibus. Ut orci leo, scelerisque vitae velit a, ultricies porta ligula.
"
Category CMS page showcase for Top position,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,Category CMS page showcase for Top position,Category CMS page showcase for Top position,"Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum. Proin malesuada metus ac tempor convallis. Pellentesque finibus, urna et vestibulum egestas, metus purus porta ligula, sit amet tincidunt dui justo vel nulla. Nam sodales nisi vel augue consectetur malesuada. Nulla semper neque a nunc tristique ullamcorper. Mauris at nisi non elit fringilla commodo. Curabitur at libero sed nisl condimentum cursus eget nec ligula. Aenean nec elit ut lacus feugiat fermentum. Phasellus quis quam mi. Duis id arcu quis ipsum viverra egestas at at diam. Cras vel dui maximus, scelerisque dui ut, suscipit lectus.
","Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus. Pellentesque sit amet sagittis justo, congue fringilla lacus. Sed vel dui et nunc sodales feugiat non in erat. Aliquam nunc mi, dignissim id tempor bibendum, sodales a tellus. Aliquam vitae efficitur turpis, quis consequat neque. Suspendisse interdum semper mi. Cras tortor justo, pretium at convallis a, lobortis non lorem. Duis ullamcorper sagittis efficitur. In erat libero, suscipit ac metus in, varius laoreet neque. Morbi ligula arcu, rutrum facilisis varius non, viverra id dui. Curabitur accumsan ultricies mauris eget vestibulum. Mauris pellentesque molestie nibh eu finibus. Fusce ut gravida massa, et vehicula arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed convallis erat ut mi pretium dapibus. Ut orci leo, scelerisque vitae velit a, ultricies porta ligula.
"
-Category CMS page showcase for Middle position,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,Category CMS page showcase for Middle position,Category CMS page showcase for Middle position,Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum.
,"Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus. Pellentesque sit amet sagittis justo, congue fringilla lacus. Sed vel dui et nunc sodales feugiat non in erat. Aliquam nunc mi, dignissim id tempor bibendum, sodales a tellus. Aliquam vitae efficitur turpis, quis consequat neque. Suspendisse interdum semper mi. Cras tortor justo, pretium at convallis a, lobortis non lorem. Duis ullamcorper sagittis efficitur. In erat libero, suscipit ac metus in, varius laoreet neque. Morbi ligula arcu, rutrum facilisis varius non, viverra id dui. Curabitur accumsan ultricies mauris eget vestibulum. Mauris pellentesque molestie nibh eu finibus. Fusce ut gravida massa, et vehicula arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed convallis erat ut mi pretium dapibus. Ut orci leo, scelerisque vitae velit a, ultricies porta ligula.
"
-Category CMS page showcase for Bottom position,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,Category CMS page showcase for Bottom position,Category CMS page showcase for Bottom position,"Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum. Proin malesuada metus ac tempor convallis. Pellentesque finibus, urna et vestibulum egestas, metus purus porta ligula, sit amet tincidunt dui justo vel nulla. Nam sodales nisi vel augue consectetur malesuada. Nulla semper neque a nunc tristique ullamcorper. Mauris at nisi non elit fringilla commodo. Curabitur at libero sed nisl condimentum cursus eget nec ligula. Aenean nec elit ut lacus feugiat fermentum. Phasellus quis quam mi. Duis id arcu quis ipsum viverra egestas at at diam. Cras vel dui maximus, scelerisque dui ut, suscipit lectus.
","Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus.
"
+Category CMS page showcase for Middle position,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,Category CMS page showcase for Middle position,Category CMS page showcase for Middle position,Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum.
,"Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus.
"
+Category CMS page showcase for Bottom position,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,Category CMS page showcase for Bottom position,Category CMS page showcase for Bottom position,"Sed imperdiet non quam nec molestie. Integer eu ipsum non odio dignissim rutrum. Proin malesuada metus ac tempor convallis. Pellentesque finibus, urna et vestibulum egestas, metus purus porta ligula, sit amet tincidunt dui justo vel nulla. Nam sodales nisi vel augue consectetur malesuada. Nulla semper neque a nunc tristique ullamcorper. Mauris at nisi non elit fringilla commodo. Curabitur at libero sed nisl condimentum cursus eget nec ligula. Aenean nec elit ut lacus feugiat fermentum. Phasellus quis quam mi. Duis id arcu quis ipsum viverra egestas at at diam. Cras vel dui maximus, scelerisque dui ut, suscipit lectus.
","Ut cursus, ligula vel pretium porta, justo nulla consectetur mauris, in aliquet nisl sapien feugiat lectus. Pellentesque sit amet sagittis justo, congue fringilla lacus. Sed vel dui et nunc sodales feugiat non in erat. Aliquam nunc mi, dignissim id tempor bibendum, sodales a tellus. Aliquam vitae efficitur turpis, quis consequat neque. Suspendisse interdum semper mi. Cras tortor justo, pretium at convallis a, lobortis non lorem. Duis ullamcorper sagittis efficitur. In erat libero, suscipit ac metus in, varius laoreet neque. Morbi ligula arcu, rutrum facilisis varius non, viverra id dui. Curabitur accumsan ultricies mauris eget vestibulum. Mauris pellentesque molestie nibh eu finibus. Fusce ut gravida massa, et vehicula arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed convallis erat ut mi pretium dapibus. Ut orci leo, scelerisque vitae velit a, ultricies porta ligula.
"
CMS block for category Computers,Title and description block,@CmsBlock/template/title_and_description_block.twig,1,,"DAS IST EINE LANDING PAGE FÜR COMPUTERS
","THIS IS A LANDING PAGE FOR COMPUTERS
","
Sed volutpat felis non elit elementum fermentum. Sed sit amet nunc lacinia ligula malesuada pretium. Duis imperdiet sem id nibh tristique, non convallis nunc luctus. Fusce congue vestibulum purus in rhoncus. Suspendisse eu nisl non diam ornare convallis. Nullam cursus, magna vitae porttitor consectetur, leo justo volutpat augue, vitae gravida eros metus ac diam. Donec iaculis diam at massa posuere posuere. Ut molestie, mauris nec tempus aliquam, massa mauris pellentesque ligula, eu mattis quam diam nec magna. Nunc ante odio, pulvinar ac nisl quis, efficitur eleifend enim. Nam consectetur placerat ligula, nec aliquet eros feugiat quis.
Sed eget imperdiet dolor. Nullam fringilla facilisis odio eu mattis. Morbi nibh erat, ornare et malesuada vel, commodo vel ligula. Donec maximus odio dolor, in aliquam mi tempus eu. Vivamus imperdiet imperdiet hendrerit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec quis dapibus libero, id sagittis dolor. Sed efficitur malesuada turpis sit amet efficitur. Etiam mattis ex elit, sit amet cursus sapien maximus id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
This is a list of product groups in a CMS page:
{{ product_group(['139', '141', '152', '140', '143', '150', '132', '151']) }}","
Sed volutpat felis non elit elementum fermentum. Sed sit amet nunc lacinia ligula malesuada pretium. Duis imperdiet sem id nibh tristique, non convallis nunc luctus. Fusce congue vestibulum purus in rhoncus. Suspendisse eu nisl non diam ornare convallis. Nullam cursus, magna vitae porttitor consectetur, leo justo volutpat augue, vitae gravida eros metus ac diam. Donec iaculis diam at massa posuere posuere. Ut molestie, mauris nec tempus aliquam, massa mauris pellentesque ligula, eu mattis quam diam nec magna. Nunc ante odio, pulvinar ac nisl quis, efficitur eleifend enim. Nam consectetur placerat ligula, nec aliquet eros feugiat quis.
Sed eget imperdiet dolor. Nullam fringilla facilisis odio eu mattis. Morbi nibh erat, ornare et malesuada vel, commodo vel ligula. Donec maximus odio dolor, in aliquam mi tempus eu. Vivamus imperdiet imperdiet hendrerit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec quis dapibus libero, id sagittis dolor. Sed efficitur malesuada turpis sit amet efficitur. Etiam mattis ex elit, sit amet cursus sapien maximus id. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
This is a list of product groups in a CMS page:
diff --git a/data/import/discount.csv b/data/import/discount.csv
index bb9a01399..10e7ab26e 100644
--- a/data/import/discount.csv
+++ b/data/import/discount.csv
@@ -2,4 +2,5 @@ discount_key,display_name,description,amount,calculator_plugin,is_exclusive,is_a
discount_1,10% Discount for all orders above €100,Get a 10% discount on all orders above €100. This discount is exclusive and can only be redeemed on its own.,1000,PLUGIN_CALCULATOR_PERCENTAGE,1,1,2016-01-01,2020-12-31,"sub-total >= ""100""","sku = ""*""",cart_rule
discount_2,€5 every tuesday and wednesday for buying 5 items,Every wednesday discount promotion for 5 items. This discount is exclusive and can only be redeemed on its own.,500,PLUGIN_CALCULATOR_FIXED,1,1,2016-01-01,2020-12-31,"(day-of-week = ""2"" OR day-of-week = ""3"") AND item-quantity >= ""5""","item-quantity = ""5""",cart_rule
discount_3,5% discount on all white products,Get a 5% discount on all white products. This discount is not exclusive and can be combined with other discounts.,500,PLUGIN_CALCULATOR_PERCENTAGE,1,1,2016-01-01,2020-12-31,,"attribute.color = ""white""",voucher
-discount_4,10% on all products with a 64-bit processor,Get a 10% discount on all products with a 64-bit processor with this voucher. This discount is exclusive and can only be redeemed on its own.,1000,PLUGIN_CALCULATOR_PERCENTAGE,1,1,2016-01-01,2020-12-31,,"attribute.processor_operating_models = ""64-bit""",voucher
\ No newline at end of file
+discount_4,10% on all products with a 64-bit processor,Get a 10% discount on all products with a 64-bit processor with this voucher. This discount is exclusive and can only be redeemed on its own.,1000,PLUGIN_CALCULATOR_PERCENTAGE,1,1,2016-01-01,2020-12-31,,"attribute.processor_operating_models = ""64-bit""",voucher
+discount_5,Free standard delivery for all orders above €300,,10000,PLUGIN_CALCULATOR_PERCENTAGE,0,1,2016-01-01,2020-12-31,"sub-total >= ""300""","shipment-method = ""Standard (Spryker Dummy Shipment)"" OR shipment-method = ""Air Standard (Spryker Drone Shipment)""",cart_rule
\ No newline at end of file
diff --git a/data/import/glossary.csv b/data/import/glossary.csv
index 51e23e629..927f3a39e 100644
--- a/data/import/glossary.csv
+++ b/data/import/glossary.csv
@@ -966,4 +966,6 @@ catalog.sale,SALE %,de_DE
catalog.new,New,en_US
catalog.new,Neu,de_DE
product.filter.label,Product Labels,en_US
-product.filter.label,Product Labels,de_DE
\ No newline at end of file
+product.filter.label,Product Labels,de_DE
+customer.order.canceledTotal,Canceled amount,en_US
+customer.order.canceledTotal,Stornobetrag,de_DE
\ No newline at end of file
diff --git a/data/import/shipment.csv b/data/import/shipment.csv
index 14cd4a9ac..2c5bebb50 100644
--- a/data/import/shipment.csv
+++ b/data/import/shipment.csv
@@ -1,3 +1,6 @@
name,price,carrier,taxSetName
Standard,490,Spryker Dummy Shipment,Shipment Taxes
-Express,590,Spryker Dummy Shipment,Shipment Taxes
\ No newline at end of file
+Express,590,Spryker Dummy Shipment,Shipment Taxes
+Air Standard,500,Spryker Drone Shipment,Shipment Taxes
+Air Sonic,1000,Spryker Drone Shipment,Shipment Taxes
+Air Light,1500,Spryker Drone Shipment,Shipment Taxes
\ No newline at end of file
diff --git a/deploy/heroku/conf/nginx_Zed.conf b/deploy/heroku/conf/nginx_Zed.conf
index 22b63be02..50855a28b 100644
--- a/deploy/heroku/conf/nginx_Zed.conf
+++ b/deploy/heroku/conf/nginx_Zed.conf
@@ -16,13 +16,6 @@ location ~ (/images/|/scripts|/styles|/fonts|/bundles|/favicon.ico|/robots.txt)
try_files $uri =404;
}
-# Payone - PHP application gets all other requests without authorized
-location /payone/ {
- auth_basic off;
- add_header X-Server $hostname;
- try_files $uri @rewriteapp;
-}
-
# PHP application gets all other requests
location / {
#add_header X-Server $hostname;
diff --git a/src/Orm/Zed/Payone/Persistence/SpyPaymentPayone.php b/src/Orm/Zed/Payone/Persistence/SpyPaymentPayone.php
deleted file mode 100644
index a33037711..000000000
--- a/src/Orm/Zed/Payone/Persistence/SpyPaymentPayone.php
+++ /dev/null
@@ -1,18 +0,0 @@
-{{ expense.sumNetPrice | default(0) | money }}
{{ expense.unitGrossPrice | default(0) | money }} |
{{ expense.sumGrossPrice | default(0) | money }} |
- {{ expense.dumDiscountAmountAggregation | default(0) | money }} |
+ {{ expense.sumDiscountAmountAggregation | default(0) | money }} |
{{ expense.taxRate | default(0) }}% |
{{ expense.sumTaxAmount | default(0) | money }} |
{{ expense.dumPriceToPayAggregation | default(0) | money }} |
diff --git a/src/Pyz/Yves/Cart/CartFactory.php b/src/Pyz/Yves/Cart/CartFactory.php
index bda895ebb..745e55c66 100644
--- a/src/Pyz/Yves/Cart/CartFactory.php
+++ b/src/Pyz/Yves/Cart/CartFactory.php
@@ -10,9 +10,9 @@
use Pyz\Yves\Cart\Form\VoucherForm;
use Pyz\Yves\Cart\Handler\CartItemHandler;
use Pyz\Yves\Cart\Handler\CartOperationHandler;
-use Pyz\Yves\Cart\Handler\CartVoucherHandler;
use Pyz\Yves\Cart\Handler\ProductBundleCartOperationHandler;
use Pyz\Yves\Cart\Plugin\Provider\AttributeVariantsProvider;
+use Pyz\Yves\Discount\Handler\VoucherHandler;
use Pyz\Yves\Product\Mapper\AttributeVariantMapper;
use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Yves\Kernel\AbstractFactory;
@@ -38,11 +38,15 @@ public function getCartClient()
}
/**
- * @return \Pyz\Yves\Cart\Handler\CartVoucherHandler
+ * @return \Pyz\Yves\Discount\Handler\VoucherHandlerInterface
*/
public function createCartVoucherHandler()
{
- return new CartVoucherHandler($this->getCalculationClient(), $this->getCartClient(), $this->getFlashMessenger());
+ return new VoucherHandler(
+ $this->getCalculationClient(),
+ $this->getCartClient(),
+ $this->getFlashMessenger()
+ );
}
/**
diff --git a/src/Pyz/Yves/Checkout/CheckoutFactory.php b/src/Pyz/Yves/Checkout/CheckoutFactory.php
index 020c7a1e7..819da36c6 100644
--- a/src/Pyz/Yves/Checkout/CheckoutFactory.php
+++ b/src/Pyz/Yves/Checkout/CheckoutFactory.php
@@ -9,6 +9,7 @@
use Pyz\Yves\Checkout\Form\FormFactory;
use Pyz\Yves\Checkout\Process\StepFactory;
+use Pyz\Yves\Discount\Handler\VoucherHandler;
use Spryker\Yves\Kernel\AbstractFactory;
class CheckoutFactory extends AbstractFactory
@@ -40,6 +41,18 @@ public function createCheckoutFormFactory()
return new FormFactory();
}
+ /**
+ * @return \Pyz\Yves\Discount\Handler\VoucherHandler
+ */
+ public function createVoucherHandler()
+ {
+ return new VoucherHandler(
+ $this->getCalculationClient(),
+ $this->getCartClient(),
+ $this->getFlashMessenger()
+ );
+ }
+
/**
* @return \Symfony\Component\Routing\Generator\UrlGeneratorInterface
*/
@@ -56,4 +69,28 @@ protected function getApplication()
return $this->getProvidedDependency(CheckoutDependencyProvider::PLUGIN_APPLICATION);
}
+ /**
+ * @return \Spryker\Client\Calculation\CalculationClientInterface
+ */
+ protected function getCalculationClient()
+ {
+ return $this->getProvidedDependency(CheckoutDependencyProvider::CLIENT_CALCULATION);
+ }
+
+ /**
+ * @return \Spryker\Client\Cart\CartClientInterface
+ */
+ protected function getCartClient()
+ {
+ return $this->getProvidedDependency(CheckoutDependencyProvider::CLIENT_CART);
+ }
+
+ /**
+ * @return \Spryker\Yves\Messenger\FlashMessenger\FlashMessengerInterface
+ */
+ protected function getFlashMessenger()
+ {
+ return $this->getApplication()['flash_messenger'];
+ }
+
}
diff --git a/src/Pyz/Yves/Checkout/Controller/CheckoutController.php b/src/Pyz/Yves/Checkout/Controller/CheckoutController.php
index bc27862ea..037183c0d 100644
--- a/src/Pyz/Yves/Checkout/Controller/CheckoutController.php
+++ b/src/Pyz/Yves/Checkout/Controller/CheckoutController.php
@@ -8,6 +8,8 @@
namespace Pyz\Yves\Checkout\Controller;
use Pyz\Yves\Application\Controller\AbstractController;
+use Pyz\Yves\Checkout\Form\Voucher\VoucherForm;
+use Pyz\Yves\Checkout\Plugin\Provider\CheckoutControllerProvider;
use Symfony\Component\HttpFoundation\Request;
/**
@@ -137,6 +139,29 @@ public function errorAction()
return [];
}
+ /**
+ * @param \Symfony\Component\HttpFoundation\Request $request
+ *
+ * @return \Symfony\Component\HttpFoundation\RedirectResponse
+ */
+ public function addVoucherAction(Request $request)
+ {
+ $form = $this->getFactory()
+ ->createCheckoutFormFactory()
+ ->getVoucherForm()
+ ->handleRequest($request);
+
+ if ($form->isValid()) {
+ $voucherCode = $form->get(VoucherForm::FIELD_VOUCHER_DISCOUNTS)->getData();
+
+ $this->getFactory()
+ ->createVoucherHandler()
+ ->add($voucherCode);
+ }
+
+ return $this->redirectResponseInternal(CheckoutControllerProvider::CHECKOUT_SUMMARY);
+ }
+
/**
* @return \Spryker\Yves\StepEngine\Process\StepEngine
*/
diff --git a/src/Pyz/Yves/Checkout/Form/FormFactory.php b/src/Pyz/Yves/Checkout/Form/FormFactory.php
index 939261837..bf34e9bed 100644
--- a/src/Pyz/Yves/Checkout/Form/FormFactory.php
+++ b/src/Pyz/Yves/Checkout/Form/FormFactory.php
@@ -11,6 +11,7 @@
use Pyz\Yves\Checkout\Form\DataProvider\SubFormDataProviders;
use Pyz\Yves\Checkout\Form\Steps\PaymentForm;
use Pyz\Yves\Checkout\Form\Steps\SummaryForm;
+use Pyz\Yves\Checkout\Form\Voucher\VoucherForm;
use Pyz\Yves\Customer\Form\CheckoutAddressCollectionForm;
use Pyz\Yves\Customer\Form\CustomerCheckoutForm;
use Pyz\Yves\Customer\Form\DataProvider\CheckoutAddressFormDataProvider;
@@ -112,6 +113,15 @@ public function createSummaryFormCollection()
return $this->createFormCollection($this->createSummaryFormTypes());
}
+ /**
+ * @return \Symfony\Component\Form\FormInterface
+ */
+ public function getVoucherForm()
+ {
+ return $this->getProvidedDependency(ApplicationConstants::FORM_FACTORY)
+ ->create($this->createVoucherFormType());
+ }
+
/**
* @return \Symfony\Component\Form\FormTypeInterface[]
*/
@@ -167,9 +177,18 @@ protected function createSummaryFormTypes()
{
return [
$this->createSummaryForm(),
+ $this->createVoucherFormType(),
];
}
+ /**
+ * @return \Pyz\Yves\Checkout\Form\Voucher\VoucherForm
+ */
+ protected function createVoucherFormType()
+ {
+ return new VoucherForm();
+ }
+
/**
* @param \Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginCollection $subForms
*
diff --git a/src/Pyz/Yves/Checkout/Form/Voucher/VoucherForm.php b/src/Pyz/Yves/Checkout/Form/Voucher/VoucherForm.php
new file mode 100644
index 000000000..f551cce85
--- /dev/null
+++ b/src/Pyz/Yves/Checkout/Form/Voucher/VoucherForm.php
@@ -0,0 +1,55 @@
+setAction('/checkout/add-voucher');
+
+ $this->addVoucherCodeField($builder);
+ }
+
+ /**
+ * @param \Symfony\Component\Form\FormBuilderInterface $builder
+ *
+ * @return $this
+ */
+ protected function addVoucherCodeField(FormBuilderInterface $builder)
+ {
+ $builder->add(static::FIELD_VOUCHER_DISCOUNTS, 'text', [
+ 'label' => 'page.checkout.finalize.enter-voucher',
+ 'required' => true,
+ ]);
+
+ return $this;
+ }
+
+}
diff --git a/src/Pyz/Yves/Checkout/Plugin/Provider/CheckoutControllerProvider.php b/src/Pyz/Yves/Checkout/Plugin/Provider/CheckoutControllerProvider.php
index 8276901ac..a2a4b47fa 100644
--- a/src/Pyz/Yves/Checkout/Plugin/Provider/CheckoutControllerProvider.php
+++ b/src/Pyz/Yves/Checkout/Plugin/Provider/CheckoutControllerProvider.php
@@ -22,6 +22,7 @@ class CheckoutControllerProvider extends AbstractYvesControllerProvider
const CHECKOUT_ERROR = 'checkout-error';
const CHECKOUT_SUCCESS = 'checkout-success';
const CHECKOUT_INDEX = 'checkout-index';
+ const CHECKOUT_VOUCHER_ADD = 'checkout-voucher-add';
/**
* @param \Silex\Application $app
@@ -76,6 +77,11 @@ protected function defineControllers(Application $app)
->assert('checkout', $allowedLocalesPattern . 'checkout|checkout')
->value('checkout', 'checkout')
->method('GET|POST');
+
+ $this->createController('/{checkout}/add-voucher', self::CHECKOUT_VOUCHER_ADD, 'Checkout', 'Checkout', 'addVoucher')
+ ->assert('checkout', $allowedLocalesPattern . 'checkout|checkout')
+ ->value('checkout', 'checkout')
+ ->method('GET|POST');
}
}
diff --git a/src/Pyz/Yves/Checkout/Theme/default/checkout/partials/voucher-form.twig b/src/Pyz/Yves/Checkout/Theme/default/checkout/partials/voucher-form.twig
new file mode 100644
index 000000000..d09163d51
--- /dev/null
+++ b/src/Pyz/Yves/Checkout/Theme/default/checkout/partials/voucher-form.twig
@@ -0,0 +1,17 @@
+{{ form_start(voucherForm) }}
+
+
+
+
{{ voucherForm.voucherDiscounts.vars.label | trans }}
+
+ {{ form_errors(voucherForm.voucherDiscounts) }}
+
+
+
+{{ form_end(voucherForm) }}
diff --git a/src/Pyz/Yves/Checkout/Theme/default/checkout/summary.twig b/src/Pyz/Yves/Checkout/Theme/default/checkout/summary.twig
index 6c9e8d38b..ffa06ddfd 100644
--- a/src/Pyz/Yves/Checkout/Theme/default/checkout/summary.twig
+++ b/src/Pyz/Yves/Checkout/Theme/default/checkout/summary.twig
@@ -79,6 +79,9 @@
+
+
+ {% include '@checkout/checkout/partials/voucher-form.twig' %}
diff --git a/src/Pyz/Yves/Customer/Theme/default/order/partials/details-sum.twig b/src/Pyz/Yves/Customer/Theme/default/order/partials/details-sum.twig
index f950fdb59..89623e6dc 100644
--- a/src/Pyz/Yves/Customer/Theme/default/order/partials/details-sum.twig
+++ b/src/Pyz/Yves/Customer/Theme/default/order/partials/details-sum.twig
@@ -5,5 +5,10 @@
{% endfor %}
{{ 'customer.order.discount.total' | trans }}: -{{ order.totals.discountTotal | money }}
+
+ {% if order.totals.canceledTotal %}
+ {{ 'customer.order.canceledTotal' | trans }}: -{{ order.totals.canceledTotal | money }}
+ {% endif %}
+
{{ 'customer.order.grandTotal' | trans }}: {{ order.totals.grandTotal | money }}
diff --git a/src/Pyz/Yves/Discount/Handler/BaseHandler.php b/src/Pyz/Yves/Discount/Handler/BaseHandler.php
new file mode 100644
index 000000000..ca71ec8a1
--- /dev/null
+++ b/src/Pyz/Yves/Discount/Handler/BaseHandler.php
@@ -0,0 +1,48 @@
+flashMessenger = $flashMessenger;
+ }
+
+ /**
+ * @param \Spryker\Client\Kernel\AbstractClient $client
+ *
+ * @return void
+ */
+ public function setFlashMessagesFromLastZedRequest(AbstractClient $client)
+ {
+ foreach ($client->getZedStub()->getErrorMessages() as $errorMessage) {
+ $this->flashMessenger->addErrorMessage($errorMessage->getValue());
+ }
+
+ foreach ($client->getZedStub()->getSuccessMessages() as $successMessage) {
+ $this->flashMessenger->addSuccessMessage($successMessage->getValue());
+ }
+
+ foreach ($client->getZedStub()->getInfoMessages() as $infoMessage) {
+ $this->flashMessenger->addInfoMessage($infoMessage->getValue());
+ }
+ }
+
+}
diff --git a/src/Pyz/Yves/Cart/Handler/CartVoucherHandler.php b/src/Pyz/Yves/Discount/Handler/VoucherHandler.php
similarity index 85%
rename from src/Pyz/Yves/Cart/Handler/CartVoucherHandler.php
rename to src/Pyz/Yves/Discount/Handler/VoucherHandler.php
index 901e6d232..d1f4ec0b1 100644
--- a/src/Pyz/Yves/Cart/Handler/CartVoucherHandler.php
+++ b/src/Pyz/Yves/Discount/Handler/VoucherHandler.php
@@ -4,7 +4,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Pyz\Yves\Cart\Handler;
+namespace Pyz\Yves\Discount\Handler;
use ArrayObject;
use Generated\Shared\Transfer\DiscountTransfer;
@@ -13,7 +13,7 @@
use Spryker\Client\Cart\CartClientInterface;
use Spryker\Yves\Messenger\FlashMessenger\FlashMessengerInterface;
-class CartVoucherHandler extends BaseHandler
+class VoucherHandler extends BaseHandler implements VoucherHandlerInterface
{
/**
@@ -56,13 +56,25 @@ public function add($voucherCode)
$quoteTransfer->addVoucherDiscount($voucherDiscount);
$quoteTransfer = $this->calculationClient->recalculate($quoteTransfer);
+ $this->addFlashMessages($quoteTransfer, $voucherCode);
- if (!$this->isVoucherCodeApplied($quoteTransfer, $voucherCode)) {
- $this->flashMessenger->addErrorMessage('cart.voucher.apply.failed');
+ $this->cartClient->storeQuote($quoteTransfer);
+ }
+
+ /**
+ * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
+ * @param string $voucherCode
+ *
+ * @return void
+ */
+ protected function addFlashMessages($quoteTransfer, $voucherCode)
+ {
+ if ($this->isVoucherCodeApplied($quoteTransfer, $voucherCode)) {
+ $this->setFlashMessagesFromLastZedRequest($this->calculationClient);
+ return;
}
- $this->setFlashMessagesFromLastZedRequest($this->calculationClient);
- $this->cartClient->storeQuote($quoteTransfer);
+ $this->flashMessenger->addErrorMessage('cart.voucher.apply.failed');
}
/**
diff --git a/src/Pyz/Yves/Discount/Handler/VoucherHandlerInterface.php b/src/Pyz/Yves/Discount/Handler/VoucherHandlerInterface.php
new file mode 100644
index 000000000..4bf0cfe59
--- /dev/null
+++ b/src/Pyz/Yves/Discount/Handler/VoucherHandlerInterface.php
@@ -0,0 +1,31 @@
+addDataImporter($this->createCategoryTemplateImporter())
->addDataImporter($this->createCategoryImporter())
->addDataImporter($this->createGlossaryImporter())
+ ->addDataImporter($this->createTaxImporter())
+ ->addDataImporter($this->createShipmentImporter())
->addDataImporter($this->createDiscountImporter())
->addDataImporter($this->createDiscountVoucherImporter())
- ->addDataImporter($this->createTaxImporter())
->addDataImporter($this->createStockImporter())
->addDataImporter($this->createProductAttributeKeyImporter())
->addDataImporter($this->createProductManagementAttributeImporter())
@@ -96,7 +97,6 @@ public function getImporter()
->addDataImporter($this->createProductSetImporter())
->addDataImporter($this->createProductSearchAttributeMapImporter())
->addDataImporter($this->createProductSearchAttributeImporter())
- ->addDataImporter($this->createShipmentImporter())
->addDataImporter($this->createCmsTemplateImporter())
->addDataImporter($this->createCmsPageImporter())
->addDataImporter($this->createCmsBlockImporter())
diff --git a/src/Pyz/Zed/DataImport/Business/Model/Discount/DiscountWriterStep.php b/src/Pyz/Zed/DataImport/Business/Model/Discount/DiscountWriterStep.php
index 2f67c59f4..e505814ad 100644
--- a/src/Pyz/Zed/DataImport/Business/Model/Discount/DiscountWriterStep.php
+++ b/src/Pyz/Zed/DataImport/Business/Model/Discount/DiscountWriterStep.php
@@ -10,6 +10,8 @@
use DateTime;
use Orm\Zed\Discount\Persistence\SpyDiscountQuery;
use Orm\Zed\Discount\Persistence\SpyDiscountVoucherPoolQuery;
+use Orm\Zed\Shipment\Persistence\SpyShipmentCarrierQuery;
+use Orm\Zed\Shipment\Persistence\SpyShipmentMethodQuery;
use Spryker\Shared\Discount\DiscountConstants;
use Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface;
use Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface;
@@ -42,6 +44,9 @@ public function execute(DataSetInterface $dataSet)
->filterByDiscountKey($dataSet[static::KEY_DISCOUNT_KEY])
->findOneOrCreate();
+ $dataSet[static::KEY_DECISION_RULE_QUERY_STRING] = $this->processQueryString($dataSet[static::KEY_DECISION_RULE_QUERY_STRING]);
+ $dataSet[static::KEY_COLLECTOR_QUERY_STRING] = $this->processQueryString($dataSet[static::KEY_COLLECTOR_QUERY_STRING]);
+
if ($dataSet[static::KEY_DISCOUNT_TYPE] === DiscountConstants::TYPE_VOUCHER) {
$discountVoucherPoolEntity = SpyDiscountVoucherPoolQuery::create()
->filterByName($dataSet[static::KEY_DISPLAY_NAME])
@@ -67,4 +72,105 @@ public function execute(DataSetInterface $dataSet)
->save();
}
+ /**
+ * @param string $queryString
+ *
+ * @return string
+ */
+ protected function processQueryString($queryString)
+ {
+ $queryString = $this->convertShipmentCarrierNameToId($queryString);
+ $queryString = $this->convertShipmentMethodNameToId($queryString);
+
+ return $queryString;
+ }
+
+ /**
+ * @param string $queryString
+ *
+ * @return string
+ */
+ protected function convertShipmentMethodNameToId($queryString)
+ {
+ $shipmentConditionValues = $this->extractConditionValuesWithShipmentCarrierMethodNames($queryString);
+
+ foreach ($shipmentConditionValues as $shipmentConditionValue) {
+ $shipmentMethodEntity = $this->findShipmentMethodByConditionValue($shipmentConditionValue);
+ $queryString = str_replace($shipmentConditionValue, $shipmentMethodEntity->getIdShipmentMethod(), $queryString);
+ }
+
+ return $queryString;
+ }
+
+ /**
+ * @param string $queryString
+ *
+ * @return string
+ */
+ protected function convertShipmentCarrierNameToId($queryString)
+ {
+ $shipmentCarrierNames = $this->extractConditionValueWithShipmentCarrierNames($queryString);
+
+ foreach ($shipmentCarrierNames as $shipmentCarrierName) {
+ $spyShipmentCarrier = SpyShipmentCarrierQuery::create()
+ ->filterByName($shipmentCarrierName)
+ ->findOne();
+
+ $queryString = str_replace('"' . $shipmentCarrierName . '"', '"' . $spyShipmentCarrier->getIdShipmentCarrier() . '"', $queryString);
+ }
+
+ return $queryString;
+ }
+
+ /**
+ * @param string $queryString
+ *
+ * @return string[]
+ */
+ protected function extractConditionValuesWithShipmentCarrierMethodNames($queryString)
+ {
+ $shipmentMethodNames = [];
+ preg_match_all('/shipment-method = "([\w \(\)]*)"/', $queryString, $shipmentMethodNames);
+ $shipmentMethodNames = $shipmentMethodNames[1];
+
+ return $shipmentMethodNames;
+ }
+
+ /**
+ * @param string $queryString
+ *
+ * @return string[]
+ */
+ protected function extractConditionValueWithShipmentCarrierNames($queryString)
+ {
+ $shipmentCarrierNames = [];
+ preg_match_all('/shipment-carrier = "([\w \(\)]*)"/', $queryString, $shipmentCarrierNames);
+ $shipmentCarrierNames = $shipmentCarrierNames[1];
+
+ return $shipmentCarrierNames;
+ }
+
+ /**
+ * @param string $conditionValue
+ *
+ * @return \Orm\Zed\Shipment\Persistence\SpyShipmentMethod
+ */
+ protected function findShipmentMethodByConditionValue($conditionValue)
+ {
+ $shipmentCarrierNameMatches = [];
+ preg_match_all('/([\w ]+)\(([\w ]+)\)/', $conditionValue, $shipmentCarrierNameMatches);
+
+ $shipmentMethodName = empty($shipmentCarrierNameMatches[1][0]) ? $conditionValue : trim($shipmentCarrierNameMatches[1][0]);
+ $shipmentCarrierName = empty($shipmentCarrierNameMatches[2][0]) ? '' : trim($shipmentCarrierNameMatches[2][0]);
+
+ $spyShipmentMethod = SpyShipmentMethodQuery::create()
+ ->filterByName($shipmentMethodName)
+ ->useShipmentCarrierQuery()
+ ->filterByName($shipmentCarrierName)
+ ->endUse()
+ ->findOne();
+
+ return $spyShipmentMethod;
+ }
+
}
diff --git a/src/Pyz/Zed/Discount/DiscountDependencyProvider.php b/src/Pyz/Zed/Discount/DiscountDependencyProvider.php
index 69ee438c7..d2dba2462 100644
--- a/src/Pyz/Zed/Discount/DiscountDependencyProvider.php
+++ b/src/Pyz/Zed/Discount/DiscountDependencyProvider.php
@@ -13,6 +13,12 @@
use Spryker\Zed\ProductDiscountConnector\Communication\Plugin\DecisionRule\ProductAttributeDecisionRulePlugin;
use Spryker\Zed\ProductLabelDiscountConnector\Communication\Plugin\Collector\ProductLabelCollectorPlugin;
use Spryker\Zed\ProductLabelDiscountConnector\Communication\Plugin\DecisionRule\ProductLabelDecisionRulePlugin;
+use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DecisionRule\ShipmentCarrierDecisionRulePlugin;
+use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DecisionRule\ShipmentMethodDecisionRulePlugin;
+use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DecisionRule\ShipmentPriceDecisionRulePlugin;
+use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DiscountCollector\ItemByShipmentCarrierPlugin;
+use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DiscountCollector\ItemByShipmentMethodPlugin;
+use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DiscountCollector\ItemByShipmentPricePlugin;
class DiscountDependencyProvider extends SprykerDiscountDependencyProvider
{
@@ -22,13 +28,14 @@ class DiscountDependencyProvider extends SprykerDiscountDependencyProvider
*/
protected function getDecisionRulePlugins()
{
- $decisionRulePlugins = parent::getDecisionRulePlugins();
-
- $decisionRulePlugins[] = new ProductAttributeDecisionRulePlugin();
- $decisionRulePlugins[] = new CustomerGroupDecisionRulePlugin();
- $decisionRulePlugins[] = new ProductLabelDecisionRulePlugin();
-
- return $decisionRulePlugins;
+ return array_merge(parent::getDecisionRulePlugins(), [
+ new ProductAttributeDecisionRulePlugin(),
+ new CustomerGroupDecisionRulePlugin(),
+ new ProductLabelDecisionRulePlugin(),
+ new ShipmentCarrierDecisionRulePlugin(),
+ new ShipmentMethodDecisionRulePlugin(),
+ new ShipmentPriceDecisionRulePlugin(),
+ ]);
}
/**
@@ -36,11 +43,13 @@ protected function getDecisionRulePlugins()
*/
protected function getCollectorPlugins()
{
- $collectorPlugins = parent::getCollectorPlugins();
- $collectorPlugins[] = new ProductAttributeCollectorPlugin();
- $collectorPlugins[] = new ProductLabelCollectorPlugin();
-
- return $collectorPlugins;
+ return array_merge(parent::getCollectorPlugins(), [
+ new ProductAttributeCollectorPlugin(),
+ new ProductLabelCollectorPlugin(),
+ new ItemByShipmentCarrierPlugin(),
+ new ItemByShipmentMethodPlugin(),
+ new ItemByShipmentPricePlugin(),
+ ]);
}
}
diff --git a/src/Pyz/Zed/Sales/Business/ConstantsInterface/Orderprocess.php b/src/Pyz/Zed/Sales/Business/ConstantsInterface/Orderprocess.php
index b2665bb15..671933767 100644
--- a/src/Pyz/Zed/Sales/Business/ConstantsInterface/Orderprocess.php
+++ b/src/Pyz/Zed/Sales/Business/ConstantsInterface/Orderprocess.php
@@ -31,70 +31,6 @@ interface Orderprocess extends OrderprocessConstant
const FLAG_ITEM_EXPORTED = 'item exported';
const FLAG_RESERVED = 'reserved';
- /************************************************************************************************
- * PAYONE
- ************************************************************************************************/
-
- // --- PAYONE Processes
-
- const ORDER_PROCESS_PAYONE_PRE_PAYMENT_01 = 'PayonePrePayment01';
- const ORDER_PROCESS_PAYONE_CREDIT_CARD_PSEUDO_01 = 'PayoneCreditCardPseudo01';
- const ORDER_PROCESS_PAYONE_DIRECT_DEBIT_01 = 'PayoneDirectDebit01';
- const ORDER_PROCESS_PAYONE_PAYPAL_01 = 'PayonePaypal01';
- const ORDER_PROCESS_PAYONE_INVOICE_01 = 'PayoneInvoice01';
- const ORDER_PROCESS_PAYONE_SOFORT_UEBERWEISUNG_01 = 'PayoneSofortUeberweisung01';
-
- // --- PAYONE Payment
-
- const STATE_PAYONE_INIT_PAYMENT = 'init payment (payone)';
- const STATE_PAYONE_WAITING_FOR_AUTHORIZATION_APPOINTMENT = 'waiting for authorization appointment (payone)';
- const STATE_PAYONE_WAITING_FOR_PREAUTHORIZATION_APPOINTMENT = 'waiting for preauthorization appointment (payone)';
- const STATE_PAYONE_CLARIFY_WAITING_FOR_PREAUTHORIZATION_APPOINTMENT = 'clarify waiting for preauthorization appointment (payone)';
- const STATE_PAYONE_CLARIFY_WAITING_FOR_AUTHORIZATION_APPOINTMENT = 'clarify waiting for authorization appointment (payone)';
- const STATE_PAYONE_CLARIFY_WAITING_FOR_PAID = 'clarify waiting for paid (payone)';
- const STATE_PAYONE_PAYMENT_AUTHORIZED = 'payment authorized (payone)';
- const STATE_PAYONE_PAYMENT_PREAUTHORIZED = 'payment preauthorized (payone)';
- const STATE_PAYONE_PAYMENT_NOT_REDIRECTED = 'payment not redirected (payone)';
- const STATE_PAYONE_PAYMENT_REDIRECTED = 'payment redirected (payone)';
- const STATE_PAYONE_CLARIFY_PAYMENT_REMINDED = 'clarify payment reminded (payone)';
-
- const STATE_PAYONE_PAID = 'paid (payone)';
- const STATE_PAYONE_UNDERPAID = 'underpaid (payone)';
- const STATE_PAYONE_CLARIFY_UNDERPAID = 'clarify underpaid (payone)';
- const STATE_PAYONE_CLARIFY_WAITING_FOR_CAPTURE_APPOINTMENT = 'clarify waiting for capture appointment (payone)';
-
- const STATE_PAYONE_PAYMENT_REMINDED = 'payment reminded (payone)';
-
- const EVENT_PAYONE_CANCEL_REMINDED = 'cancel reminded (payone)';
- const EVENT_PAYONE_CANCEL_UNDERPAID = 'cancel underpaid (payone)';
- const EVENT_PAYONE_MANUALLY_SET_PAID = 'manually set paid (payone)';
- const EVENT_PAYONE_MANUALLY_SET_AUTHORIZED = 'manually set authorized (payone)';
- const EVENT_PAYONE_MANUALLY_SET_CAPTURED = 'manually set captured (payone)';
- const EVENT_PAYONE_RETRY_CAPTURE = 'retry capture (payone)';
-
- // --- PAYONE Cancelation
-
- const STATE_PAYONE_INIT_CANCELLATION = 'init cancellation (payone)';
- const STATE_PAYONE_CANCELLATION_CLARIFY = 'cancellation clarify (payone)';
- const STATE_PAYONE_CANCELLATION_RETURN = 'cancellation return (payone)';
- const STATE_PAYONE_CANCELLATION_OBJECTIVE = 'cancellation objective (payone)';
-
- const EVENT_PAYONE_MANUAL_CLARIFIED_CANCELLATION_OBJECTIVE = 'manual clarified cancellation objective (payone)';
- const EVENT_PAYONE_MANUAL_CLARIFIED_CANCELLATION_RETURN = 'manual clarified cancellation return (payone)';
-
- const EVENT_PAYONE_MANUAL_SET_PAYMENT_INVALID = 'manual set payment invalid (payone)';
- const EVENT_PAYONE_MANUAL_SET_PAYMENT_AUTHORIZED = 'manual set payment authorized (payone)';
-
- // --- PAYONE Capture
-
- const STATE_PAYONE_INIT_CAPTURE_PROCESS = 'init capture process (payone)';
- const STATE_PAYONE_WAITING_FOR_CAPTURE_APPOINTMENT = 'waiting for capture appointment (payone)';
- const STATE_PAYONE_CAPTURE_FAILED = 'capture failed (payone)';
- const STATE_PAYONE_CLARIFY_CAPTURE_FAILED = 'clarify capture failed (payone)';
- const STATE_PAYONE_CAPTURED = 'captured (payone)';
-
- const STATE_PAYONE_WAITING_FOR_RECEIPT_OF_PAYMENT = 'waiting for receipt of payment (payone)';
-
/************************************************************************************************
* INVOICE CREATION
************************************************************************************************/
diff --git a/test-autoload.php b/test-autoload.php
new file mode 100644
index 000000000..b20a55f32
--- /dev/null
+++ b/test-autoload.php
@@ -0,0 +1,36 @@
+wantTo('Open product page, and add item to cart with larger quantity than available');
- $i->expectTo('Display error message');
-
- $i->amOnPage(AvailabilityTester::FUJITSU2_PRODUCT_PAGE);
-
- $i->click(ProductDetailPage::ADD_TO_CART_XPATH);
-
- $i->see(CartListPage::CART_HEADER);
-
- $i->fillField(CartListPage::FIRST_CART_ITEM_QUANTITY_INPUT_XPATH, 50);
- $i->click(CartListPage::FIRST_CART_ITEM_CHANGE_QUANTITY_BUTTON_XPATH);
-
- $i->see(AvailabilityTester::CART_PRE_CHECK_AVAILABILITY_ERROR_MESSAGE);
- }
-
-}
diff --git a/tests/Acceptance/Availability/CheckoutAvailabilityCest.php b/tests/Acceptance/Availability/CheckoutAvailabilityCest.php
deleted file mode 100644
index 73ffad137..000000000
--- a/tests/Acceptance/Availability/CheckoutAvailabilityCest.php
+++ /dev/null
@@ -1,79 +0,0 @@
-wantTo('Checkout item with stock');
- $i->expectTo('Availability changed during SM processing.');
-
- $i->amOnPage(AvailabilityTester::FUJITSU_PRODUCT_PAGE);
-
- $i->click(ProductDetailPage::ADD_TO_CART_XPATH);
-
- $i->see(CartListPage::CART_HEADER);
- $i->click(CartListPage::START_CHECKOUT_XPATH);
-
- $i->processCheckout();
-
- $zedTester = $i->haveFriend('zedTester', ZedAcceptanceTester::class);
-
- $zedTester->does(function (ZedAcceptanceTester $i) {
- $i->amLoggedInUser();
-
- $idProductFujitsu = 118;
-
- $i->amOnPage(sprintf(AvailabilityViewPage::VIEW_PRODUCT_AVAILABILITY_URL, $idProductFujitsu));
-
- $reservedProductsBefore = $i->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');
-
- $i->amOnPage(OrderListPage::ORDER_LIST_URL);
- $i->wait(2);
-
- $idSalesOrder = $i->grabTextFrom('//*[@class="dataTables_scrollBody"]/table/tbody/tr[1]/td[1]');
-
- $i->amOnPage(sprintf(OrderDetailPage::ORDER_DETAIL_PAGE_URL, $idSalesOrder));
-
- $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'pay'));
- $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'ship'));
- $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'stock-update'));
- $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'return'));
- $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'refund'));
-
- $i->amOnPage(sprintf(AvailabilityViewPage::VIEW_PRODUCT_AVAILABILITY_URL, $idProductFujitsu));
-
- $reservedProductsAfter = $i->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');
-
- $i->assertEquals($reservedProductsAfter, $reservedProductsBefore - 1); //Reserved item returned back
-
- });
-
- $zedTester->leave();
- }
-
-}
diff --git a/tests/Acceptance/Availability/PageObject/AvailabilityPageTester.php b/tests/Acceptance/Availability/PageObject/AvailabilityPageTester.php
deleted file mode 100644
index 33573ca0a..000000000
--- a/tests/Acceptance/Availability/PageObject/AvailabilityPageTester.php
+++ /dev/null
@@ -1,12 +0,0 @@
-getScenario());
- $checkoutTester->processAllCheckoutSteps();
- }
-
-}
diff --git a/tests/Acceptance/Checkout/Tester/CheckoutTester.php b/tests/Acceptance/Checkout/Tester/CheckoutTester.php
deleted file mode 100644
index f4e8a2f4f..000000000
--- a/tests/Acceptance/Checkout/Tester/CheckoutTester.php
+++ /dev/null
@@ -1,137 +0,0 @@
-see('Create account');
-
- $this->fillField('//*[@id="registerForm_customer_first_name"]', 'first-name-test' . rand(100, 999));
- $this->fillField('//*[@id="registerForm_customer_last_name"]', 'last-name-test' . rand(100, 999));
- $this->fillField('//*[@id="registerForm_customer_email"]', 'email-test@domain-' . rand(100, 999) . '.tld');
- $this->fillField('//*[@id="registerForm_customer_password_pass"]', 'as');
- $this->fillField('//*[@id="registerForm_customer_password_confirm"]', 'as');
- $this->click('//*[@id="registerForm_customer_accept_terms"]');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function clickRegisterButton()
- {
- $this->click('/html/body/div[2]/main/div/div[1]/div[3]/form/div/div/button');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function processAddressStep()
- {
- $this->see('Shipping Address');
-
- $this->fillField('//*[@id="addressesForm_shippingAddress_first_name"]', 'first-name-test' . rand(100, 999));
- $this->fillField('//*[@id="addressesForm_shippingAddress_last_name"]', 'last-name-test' . rand(100, 999));
- $this->fillField('//*[@id="addressesForm_shippingAddress_company"]', 'company-test' . rand(100, 999));
- $this->fillField('//*[@id="addressesForm_shippingAddress_phone"]', '123456789');
- $this->fillField('//*[@id="addressesForm_shippingAddress_address1"]', 'address1');
- $this->fillField('//*[@id="addressesForm_shippingAddress_address2"]', '15');
- $this->fillField('//*[@id="addressesForm_shippingAddress_address3"]', 'address3');
- $this->fillField('//*[@id="addressesForm_shippingAddress_zip_code"]', '10405');
- $this->fillField('//*[@id="addressesForm_shippingAddress_city"]', 'city');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function processShipmentStep()
- {
- $this->see('Shipment');
-
- $this->click('//*[@id="shipmentForm_idShipmentMethod_1"]');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function processOverviewStep()
- {
- $this->see('Overview');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function processSuccessStep()
- {
- $this->see('Your order has been placed successfully!');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function processPaymentStep()
- {
- $this->see('Payment');
-
- $this->click('//*[@id="paymentForm_paymentSelection_1"]');
- $this->fillField('//*[@id="paymentForm_dummyPaymentInvoice_date_of_birth"]', '01.07.1985');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function nextStep()
- {
- $this->click('//*[contains(@class, "success")]');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function processAllCheckoutSteps()
- {
- $this->processCustomerStep()
- ->clickRegisterButton()
- ->processAddressStep()
- ->nextStep()
- ->processShipmentStep()
- ->nextStep()
- ->processPaymentStep()
- ->nextStep()
- ->processOverviewStep()
- ->nextStep()
- ->processSuccessStep();
-
- return $this;
- }
-
-}
diff --git a/tests/Acceptance/CmsGui/CmsGuiCreatePageCest.php b/tests/Acceptance/CmsGui/CmsGuiCreatePageCest.php
deleted file mode 100644
index 9e25ce082..000000000
--- a/tests/Acceptance/CmsGui/CmsGuiCreatePageCest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-wantTo('Create cms page with multiple translations');
- $iPage->expect('Page is persisted in Zed, exported to Yves and is accesible.');
-
- $iPage->amLoggedInUser();
- $iPage->amOnPage(CmsCreatePage::URL);
- $iPage->selectOption('//*[@id="cms_page_fkTemplate"]', 'static full page');
-
- $iPage->setValidFrom('1985-07-01');
- $iPage->setValidTo('2050-07-01');
- $iPage->fillLocalizedUrlForm(0, CmsCreatePage::getLocalizedName('en'), CmsCreatePage::getLocalizedUrl('en'));
- $iPage->expandLocalizedUrlPane();
- $iPage->fillLocalizedUrlForm(1, CmsCreatePage::getLocalizedName('de'), CmsCreatePage::getLocalizedUrl('de'));
- $iPage->clickSubmit();
-
- $iPage->see(CmsCreatePage::PAGE_CREATED_SUCCESS_MESSAGE);
-
- $iGlossary->includeJquery();
-
- $iGlossary->fillPlaceholderContents(0, 0, CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'en'));
- $iGlossary->fillPlaceholderContents(0, 1, CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'de'));
-
- $iGlossary->fillPlaceholderContents(1, 0, CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'en'));
- $iGlossary->fillPlaceholderContents(1, 1, CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'de'));
-
- $iGlossary->clickSubmit();
-
- $idCmsPage = $iGlossary->grabCmsPageId();
-
- $iPage->amOnPage(sprintf(CmsEditPage::URL, $idCmsPage));
-
- $iPage->clickPublishButton();
-
- $iPage->see(CmsEditPage::PAGE_PUBLISH_SUCCESS_MESSAGE);
-
- $iPage->runCollectors();
-
- $yvesTester = $iPage->haveFriend('yvesTester', YvesAcceptanceTester::class);
-
- $yvesTester->does(function (YvesAcceptanceTester $i) {
-
- $i->amOnPage(CmsCreatePage::getLocalizedUrl('de'));
-
- $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'de'));
- $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'de'));
-
- $i->amOnPage(CmsCreatePage::getLocalizedUrl('en'));
-
- $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'en'));
- $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'en'));
-
- });
- }
-
-}
diff --git a/tests/Acceptance/CmsGui/PageObject/CmsListPage.php b/tests/Acceptance/CmsGui/PageObject/CmsListPage.php
deleted file mode 100644
index 07a06d6ec..000000000
--- a/tests/Acceptance/CmsGui/PageObject/CmsListPage.php
+++ /dev/null
@@ -1,15 +0,0 @@
-executeJS("$('#$translationElementId').text('$contents');");
- }
-
- /**
- * @return $this
- */
- public function includeJquery()
- {
- $this->executeJS(
- '
- var jq = document.createElement("script");
- jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
- document.getElementsByTagName("head")[0].appendChild(jq);
- '
- );
-
- $this->wait(1);
-
- return $this;
- }
-
- /**
- * @return int
- */
- public function grabCmsPageId()
- {
- return $this->grabFromCurrentUrl('/id-cms-page=(\d+)/');
- }
-
- /**
- * @return $this
- */
- public function clickSubmit()
- {
- $this->click('//*[@id="submit-cms"]');
-
- return $this;
- }
-
-}
diff --git a/tests/Acceptance/CmsGui/Tester/CmsCreatePageTester.php b/tests/Acceptance/CmsGui/Tester/CmsCreatePageTester.php
deleted file mode 100644
index 61097778d..000000000
--- a/tests/Acceptance/CmsGui/Tester/CmsCreatePageTester.php
+++ /dev/null
@@ -1,83 +0,0 @@
-fillField("//*[@id=\"cms_page_validFrom\"]", $date);
-
- return $this;
- }
-
- /**
- * @param string $date
- *
- * @return $this
- */
- public function setValidTo($date)
- {
- $this->fillField("//*[@id=\"cms_page_validTo\"]", $date);
-
- return $this;
- }
-
- /**
- * @param int $formIndex
- * @param string $name
- * @param string $url
- *
- * @return $this
- */
- public function fillLocalizedUrlForm($formIndex, $name, $url)
- {
- $this->fillField('//*[@id="cms_page_pageAttributes_' . $formIndex . '_name"]', $name);
- $this->fillField('//*[@id="cms_page_pageAttributes_' . $formIndex . '_url"]', $url);
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function expandLocalizedUrlPane()
- {
- $this->click('//*[@id="tab-content-general"]/div/div[5]/div[1]/a');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function clickSubmit()
- {
- $this->click('//*[@id="submit-cms"]');
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function clickPublishButton()
- {
- $this->click('//*[@id="page-wrapper"]/div[2]/div[2]/div/a[1]');
-
- return $this;
- }
-
-}
diff --git a/tests/Acceptance/CmsGui/Tester/CmsPageListTester.php b/tests/Acceptance/CmsGui/Tester/CmsPageListTester.php
deleted file mode 100644
index 20ca9021b..000000000
--- a/tests/Acceptance/CmsGui/Tester/CmsPageListTester.php
+++ /dev/null
@@ -1,13 +0,0 @@
-run();
- $output = $process->getOutput();
-
- return $output;
- }
-
-}
diff --git a/tests/Acceptance/Customer/Yves/CustomerLoginCest.php b/tests/Acceptance/Customer/Yves/CustomerLoginCest.php
deleted file mode 100644
index e2345e9e3..000000000
--- a/tests/Acceptance/Customer/Yves/CustomerLoginCest.php
+++ /dev/null
@@ -1,60 +0,0 @@
-amOnPage(CustomerLoginPage::URL);
- $i->see(CustomerLoginPage::TITLE_LOGIN, 'h4');
- }
-
- /**
- * @param \Acceptance\Customer\Yves\Tester\CustomerLoginTester $i
- *
- * @return void
- */
- public function testICanOpenForgotPasswordPage(CustomerLoginTester $i)
- {
- $i->amOnPage(CustomerLoginPage::URL);
- $i->click(CustomerLoginPage::FORGOT_PASSWORD_LINK);
- $i->seeCurrentUrlEquals(CustomerPasswordForgottenPage::URL);
- }
-
- /**
- * @param \Acceptance\Customer\Yves\Tester\CustomerLoginTester $i
- *
- * @return void
- */
- public function testICanLoginWithValidData(CustomerLoginTester $i)
- {
- $i->amOnPage(CustomerLoginPage::URL);
- $i->haveRegisteredCustomer(CustomerLoginPage::NEW_CUSTOMER_EMAIL);
- $i->submitLoginForm();
- $i->seeCurrentUrlEquals(CustomerOverviewPage::URL);
- }
-
-}
diff --git a/tests/Acceptance/Customer/Yves/CustomerLogoutCest.php b/tests/Acceptance/Customer/Yves/CustomerLogoutCest.php
deleted file mode 100644
index b8cf40f88..000000000
--- a/tests/Acceptance/Customer/Yves/CustomerLogoutCest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-amOnPage(CustomerLoginPage::URL);
- $i->haveRegisteredCustomer(CustomerLoginPage::NEW_CUSTOMER_EMAIL);
- $i->submitLoginForm();
- $i->seeCurrentUrlEquals(CustomerOverviewPage::URL);
-
- $i->amOnPage(CustomerLogoutPage::URL);
-
- $i->seeCurrentUrlEquals('/');
- }
-
-}
diff --git a/tests/Acceptance/Customer/Yves/Tester/CustomerAddressTester.php b/tests/Acceptance/Customer/Yves/Tester/CustomerAddressTester.php
deleted file mode 100644
index ec6941d7c..000000000
--- a/tests/Acceptance/Customer/Yves/Tester/CustomerAddressTester.php
+++ /dev/null
@@ -1,12 +0,0 @@
-submitForm(['name' => 'loginForm'], [
- CustomerLoginPage::FORM_FIELD_SELECTOR_EMAIL => $customerTransfer->getEmail(),
- CustomerLoginPage::FORM_FIELD_SELECTOR_PASSWORD => $customerTransfer->getPassword(),
- ]);
- }
-
-}
diff --git a/tests/Acceptance/Customer/Yves/Tester/CustomerNewsletterTester.php b/tests/Acceptance/Customer/Yves/Tester/CustomerNewsletterTester.php
deleted file mode 100644
index 686b39d19..000000000
--- a/tests/Acceptance/Customer/Yves/Tester/CustomerNewsletterTester.php
+++ /dev/null
@@ -1,12 +0,0 @@
-selectOption(CustomerRegistrationPage::FORM_FIELD_SELECTOR_SALUTATION, $customerTransfer->getSalutation());
- $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_FIRST_NAME, $customerTransfer->getFirstName());
- $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_LAST_NAME, $customerTransfer->getLastName());
- $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_EMAIL, $customerTransfer->getEmail());
- $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_PASSWORD, $customerTransfer->getPassword());
- $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_PASSWORD_CONFIRM, $customerTransfer->getPassword());
- $i->checkOption(CustomerRegistrationPage::FORM_FIELD_SELECTOR_ACCEPT_TERMS);
- }
-
-}
diff --git a/tests/Acceptance/Customer/Yves/Tester/CustomerTester.php b/tests/Acceptance/Customer/Yves/Tester/CustomerTester.php
deleted file mode 100644
index bdba6ce52..000000000
--- a/tests/Acceptance/Customer/Yves/Tester/CustomerTester.php
+++ /dev/null
@@ -1,14 +0,0 @@
-wantTo('See that i can open the homepage');
- $i->amOnPage(Homepage::URL);
- $i->canSeeElement(['class' => '__page']);
- }
-
-}
diff --git a/tests/Acceptance/Homepage/Yves/PageObject/Homepage.php b/tests/Acceptance/Homepage/Yves/PageObject/Homepage.php
deleted file mode 100644
index aaaadf970..000000000
--- a/tests/Acceptance/Homepage/Yves/PageObject/Homepage.php
+++ /dev/null
@@ -1,15 +0,0 @@
-fillField('//*[@id="navigation_name"]', $value);
- }
-
- /**
- * @param string $value
- *
- * @return void
- */
- public function setKeyField($value)
- {
- $this->fillField('//*[@id="navigation_key"]', $value);
- }
-
- /**
- * @param bool $checked
- *
- * @return void
- */
- public function checkIsActiveField($checked)
- {
- if ($checked) {
- $this->checkOption('//*[@id="navigation_is_active"]');
- } else {
- $this->uncheckOption('//*[@id="navigation_is_active"]');
- }
- }
-
- /**
- * @return void
- */
- public function submitNavigationForm()
- {
- $this->click('//*[@id="navigation-save-btn"]');
- }
-
- /**
- * @param string $pattern
- * @param string $value
- *
- * @return void
- */
- public function seeMatches($pattern, $value)
- {
- $this->assertRegExp($pattern, $value);
- }
-
- /**
- * @return void
- */
- public function clickEditFirstRowInList()
- {
- $this->click('//*[@id="navigation-table"]/tbody/tr[1]/td[5]/a');
- }
-
- /**
- * @param string $expectedMessagePattern
- *
- * @return int
- */
- public function seeSuccessMessage($expectedMessagePattern)
- {
- $successMessage = $this->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[1]/div');
- $this->seeMatches($expectedMessagePattern, $successMessage);
-
- preg_match($expectedMessagePattern, $successMessage, $matches);
-
- return $matches[1];
- }
-
- /**
- * @return void
- */
- public function activateFirstNavigationRow()
- {
- $this->click('//*[@id="navigation-table"]/tbody/tr[1]/td[5]/a[2]');
- }
-
- /**
- * @return void
- */
- public function deleteFirstNavigationRow()
- {
- $this->submitForm('//*[@id="navigation-table"]/tbody/tr/td[5]/form[1]', []);
- }
-
-}
diff --git a/tests/Acceptance/NavigationGui/Tester/NavigationTreeTester.php b/tests/Acceptance/NavigationGui/Tester/NavigationTreeTester.php
deleted file mode 100644
index c53ddbd15..000000000
--- a/tests/Acceptance/NavigationGui/Tester/NavigationTreeTester.php
+++ /dev/null
@@ -1,349 +0,0 @@
-navigationFacade = new NavigationFacade();
- $this->localeFacade = new LocaleFacade();
- }
-
- /**
- * @return int
- */
- public function prepareTestNavigationEntity()
- {
- $navigationEntity = new SpyNavigation();
- $navigationEntity
- ->setName('Acceptance navigation (2)')
- ->setKey('acceptance2')
- ->setIsActive(true)
- ->save();
-
- return $navigationEntity->getIdNavigation();
- }
-
- /**
- * @param string $pattern
- * @param string $value
- *
- * @return void
- */
- public function seeMatches($pattern, $value)
- {
- $this->assertRegExp($pattern, $value);
- }
-
- /**
- * @param string $expectedMessagePattern
- *
- * @return int
- */
- public function seeSuccessMessage($expectedMessagePattern)
- {
- $successMessage = $this->grabTextFrom(self::SUCCESS_MESSAGE_SELECTOR);
- $this->seeMatches($expectedMessagePattern, $successMessage);
-
- preg_match($expectedMessagePattern, $successMessage, $matches);
-
- return $matches[1];
- }
-
- /**
- * @param string $localeName
- *
- * @return void
- */
- public function expandLocalizedForm($localeName)
- {
- $this->click(sprintf(self::LOCALIZED_FORM_CONTAINER_SELECTOR, $localeName));
- }
-
- /**
- * @return void
- */
- public function clickRootNode()
- {
- $this->click(self::ROOT_NODE_ANCHOR_SELECTOR);
- }
-
- /**
- * @param int $idNavigationNode
- *
- * @return void
- */
- public function clickNode($idNavigationNode)
- {
- $this->click(sprintf(self::CHILD_NODE_ANCHOR_SELECTOR, $idNavigationNode));
- }
-
- /**
- * @return void
- */
- public function waitForNavigationTree()
- {
- $this->waitForElement(self::NAVIGATION_TREE_SELECTOR, 5);
- $this->wait(1);
- }
-
- /**
- * @param int $count
- *
- * @return void
- */
- public function seeNumberOfNavigationNodes($count)
- {
- $this->seeNumberOfElements(self::NAVIGATION_NODE_SELECTOR, $count);
- }
-
- /**
- * @param int $idParentNavigationNode
- * @param int $idChildNavigationNode
- *
- * @return void
- */
- public function seeNavigationNodeHierarchy($idParentNavigationNode, $idChildNavigationNode)
- {
- $this->seeElement(sprintf(
- self::NODE_CHILD_SELECTOR,
- $idParentNavigationNode,
- $idChildNavigationNode
- ));
- }
-
- /**
- * @param int $idNavigationNode
- * @param int $idTargetNavigationNode
- *
- * @return void
- */
- public function moveNavigationNode($idNavigationNode, $idTargetNavigationNode)
- {
- $this->dragAndDrop(
- sprintf(self::CHILD_NODE_ANCHOR_SELECTOR, $idNavigationNode),
- sprintf(self::CHILD_NODE_ANCHOR_SELECTOR, $idTargetNavigationNode)
- );
- }
-
- /**
- * @return void
- */
- public function saveNavigationTreeOrder()
- {
- $this->click(self::NAVIGATION_TREE_SAVE_BUTTON_SELECTOR);
- }
-
- /**
- * @param string $message
- *
- * @return void
- */
- public function seeSuccessfulOrderSaveMessage($message)
- {
- $this->waitForElement(self::SWEET_ALERT_SELECTOR, 5);
- $this->wait(1);
- $this->see($message);
- $this->click(self::SWEET_ALERT_CONFIRM_SELECTOR);
- }
-
- /**
- * @return void
- */
- public function switchToNodeForm()
- {
- $this->switchToIFrame(self::NODE_FORM_IFRAME_NAME);
- $this->waitForElement(self::NODE_FORM_SELECTOR, 5);
- }
-
- /**
- * @return void
- */
- public function switchToNavigationTree()
- {
- $this->switchToIFrame();
- $this->waitForNavigationTree();
- }
-
- /**
- * @return void
- */
- public function clickRemoveNodeButton()
- {
- $this->click(self::REMOVE_NODE_BUTTON_SELECTOR);
- }
-
- /**
- * @return void
- */
- public function clickAddChildNodeButton()
- {
- $this->click(self::ADD_CHILD_NODE_BUTTON_SELECTOR);
- }
-
- /**
- * @param string $title
- *
- * @return void
- */
- public function submitCreateNodeFormWithoutType($title)
- {
- $this->expandLocalizedForm('de_DE');
-
- $this->submitForm(self::NODE_FORM_SELECTOR, [
- 'navigation_node[navigation_node_localized_attributes][0][title]' => $title,
- 'navigation_node[navigation_node_localized_attributes][1][title]' => $title,
- 'navigation_node[is_active]' => true,
- ]);
- }
-
- /**
- * @param string $title
- * @param string $externalUrl
- *
- * @return void
- */
- public function submitCreateNodeFormWithExternalUrlType($title, $externalUrl)
- {
- $this->expandLocalizedForm('de_DE');
-
- $this->submitForm(self::NODE_FORM_SELECTOR, [
- 'navigation_node[node_type]' => 'external_url',
- 'navigation_node[navigation_node_localized_attributes][0][external_url]' => $externalUrl,
- 'navigation_node[navigation_node_localized_attributes][1][external_url]' => $externalUrl,
- 'navigation_node[navigation_node_localized_attributes][0][title]' => $title,
- 'navigation_node[navigation_node_localized_attributes][1][title]' => $title,
- 'navigation_node[is_active]' => true,
- ]);
- }
-
- /**
- * @param string $categoryUrl_en_US
- * @param string $categoryUrl_de_DE
- *
- * @return void
- */
- public function submitUpdateNodeToCategoryType($categoryUrl_en_US, $categoryUrl_de_DE)
- {
- $this->expandLocalizedForm('de_DE');
-
- $this->submitForm(self::NODE_FORM_SELECTOR, [
- 'navigation_node[node_type]' => 'category',
- 'navigation_node[navigation_node_localized_attributes][0][category_url]' => $categoryUrl_en_US,
- 'navigation_node[navigation_node_localized_attributes][1][category_url]' => $categoryUrl_de_DE,
- ]);
- }
-
- /**
- * @param string $title
- * @param string $cmsPageUrl_en_US
- * @param string $cmsPageUrl_de_DE
- *
- * @return void
- */
- public function submitCreateNodeFormWithCmsPageType($title, $cmsPageUrl_en_US, $cmsPageUrl_de_DE)
- {
- $this->expandLocalizedForm('de_DE');
-
- $this->submitForm(self::NODE_FORM_SELECTOR, [
- 'navigation_node[node_type]' => 'cms_page',
- 'navigation_node[navigation_node_localized_attributes][0][title]' => $title,
- 'navigation_node[navigation_node_localized_attributes][0][cms_page_url]' => $cmsPageUrl_en_US,
- 'navigation_node[navigation_node_localized_attributes][1][title]' => $title,
- 'navigation_node[navigation_node_localized_attributes][1][cms_page_url]' => $cmsPageUrl_de_DE,
- 'navigation_node[is_active]' => true,
- ]);
- }
-
- /**
- * @param \Generated\Shared\Transfer\NavigationTreeTransfer $navigationTreeTransfer
- *
- * @return \Generated\Shared\Transfer\NavigationTreeTransfer
- */
- public function prepareTestNavigationTreeEntities(NavigationTreeTransfer $navigationTreeTransfer)
- {
- $navigationTransfer = $this->navigationFacade->createNavigation($navigationTreeTransfer->getNavigation());
-
- foreach ($navigationTreeTransfer->getNodes() as $navigationTreeNodeTransfer) {
- $this->createNavigationNodesRecursively($navigationTreeNodeTransfer, $navigationTransfer->getIdNavigation());
- }
-
- return $navigationTreeTransfer;
- }
-
- /**
- * @param \Generated\Shared\Transfer\NavigationTreeNodeTransfer $navigationTreeNodeTransfer
- * @param int $idNavigation
- * @param int|null $idParentNavigationNode
- *
- * @return void
- */
- protected function createNavigationNodesRecursively(NavigationTreeNodeTransfer $navigationTreeNodeTransfer, $idNavigation, $idParentNavigationNode = null)
- {
- $navigationNodeTransfer = $navigationTreeNodeTransfer->getNavigationNode();
- $navigationNodeTransfer
- ->setFkNavigation($idNavigation)
- ->setFkParentNavigationNode($idParentNavigationNode);
-
- $navigationNodeTransfer = $this->navigationFacade->createNavigationNode($navigationNodeTransfer);
-
- foreach ($navigationTreeNodeTransfer->getChildren() as $childNavigationTreeNodeTransfer) {
- $this->createNavigationNodesRecursively($childNavigationTreeNodeTransfer, $idNavigation, $navigationNodeTransfer->getIdNavigationNode());
- }
- }
-
- /**
- * @param string $locale
- *
- * @return int
- */
- public function getIdLocale($locale)
- {
- return $this->localeFacade->getLocale($locale)->getIdLocale();
- }
-
-}
diff --git a/tests/Acceptance/Oms/Tester/OmsTester.php b/tests/Acceptance/Oms/Tester/OmsTester.php
deleted file mode 100644
index 978a61004..000000000
--- a/tests/Acceptance/Oms/Tester/OmsTester.php
+++ /dev/null
@@ -1,14 +0,0 @@
-bootstrap(SystemUnderTestBootstrap::APPLICATION_ZED);
diff --git a/tests/Console.suite.yml b/tests/Console.suite.yml
deleted file mode 100644
index 54d59c54f..000000000
--- a/tests/Console.suite.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-class_name: ConsoleTester
-modules:
- enabled:
- - Cli
- - Filesystem
- - \Helper\Console
diff --git a/tests/Console/GenerateBundleCest.php b/tests/Console/GenerateBundleCest.php
deleted file mode 100644
index cdfdc6459..000000000
--- a/tests/Console/GenerateBundleCest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-runSprykerCommand('code:generate:module:zed Acme -vvv');
- $i->seeInShellOutput('Generated: Pyz/Zed/Acme/AcmeConfig.php');
- $i->seeInShellOutput('Generated: ZedBundleCodeGenerator');
- $bundleDir = codecept_data_dir() . Console::SANDBOX_DIR . 'src/Pyz/Zed/Acme';
- $i->seeFileFound('AcmeConfig.php', $bundleDir);
- $i->seeFileFound('AcmeDependencyProvider.php', $bundleDir);
- $i->seeFileFound('AcmeFacade.php', $bundleDir . '/Business');
- }
-
-}
diff --git a/tests/Console/GenerateDataBuildersCest.php b/tests/Console/GenerateDataBuildersCest.php
deleted file mode 100644
index 63e1bafa0..000000000
--- a/tests/Console/GenerateDataBuildersCest.php
+++ /dev/null
@@ -1,22 +0,0 @@
-runSprykerCommand('transfer:databuilder:generate -vvv');
- $i->seeInShellOutput('CustomerBuilder.php was generated');
- $i->seeFileFound(codecept_data_dir() . 'cli_sandbox/src/Generated/Shared/DataBuilder/CustomerBuilder.php');
- }
-
-}
diff --git a/tests/Console/_bootstrap.php b/tests/Console/_bootstrap.php
deleted file mode 100644
index b3d9bbc7f..000000000
--- a/tests/Console/_bootstrap.php
+++ /dev/null
@@ -1 +0,0 @@
-bootstrap(SystemUnderTestBootstrap::APPLICATION_ZED);
diff --git a/tests/PyzTest/Shared/Testify/_support/Helper/Bootstrap/YvesBootstrap.php b/tests/PyzTest/Shared/Testify/_support/Helper/Bootstrap/YvesBootstrap.php
new file mode 100644
index 000000000..dfca5c0c0
--- /dev/null
+++ b/tests/PyzTest/Shared/Testify/_support/Helper/Bootstrap/YvesBootstrap.php
@@ -0,0 +1,96 @@
+application->register(new StorageCacheServiceProvider());
+ $this->application->register(new SprykerTwigServiceProvider());
+ $this->application->register(new TwigServiceProvider());
+ $this->application->register(new ApplicationServiceProvider());
+ $this->application->register(new SessionServiceProvider());
+ $this->application->register(new SprykerSessionServiceProvider());
+ $this->application->register(new SecurityServiceProvider());
+ $this->application->register(new CustomerSecurityServiceProvider());
+ $this->application->register(new YvesSecurityServiceProvider());
+ $this->application->register(new ExceptionServiceProvider());
+ $this->application->register(new NewRelicRequestTransactionServiceProvider());
+ $this->application->register(new CookieServiceProvider());
+ $this->application->register(new UrlGeneratorServiceProvider());
+ $this->application->register(new ServiceControllerServiceProvider());
+ $this->application->register(new RememberMeServiceProvider());
+ $this->application->register(new RoutingServiceProvider());
+ $this->application->register(new TranslationServiceProvider());
+ $this->application->register(new ValidatorServiceProvider());
+ $this->application->register(new FormServiceProvider());
+ $this->application->register(new HttpFragmentServiceProvider());
+ $this->application->register(new CategoryServiceProvider());
+ $this->application->register(new FlashMessengerServiceProvider());
+ $this->application->register(new HeadersSecurityServiceProvider());
+ $this->application->register(new WebProfilerServiceProvider());
+ $this->application->register(new AutoloaderCacheServiceProvider());
+ $this->application->register(new YvesHstsServiceProvider());
+ $this->application->register(new CartServiceProvider());
+ $this->application->register(new FormFactoryServiceProvider());
+ $this->application->register(new LanguageServiceProvider());
+ $this->application->register(new TwigMoneyServiceProvider());
+ $this->application->register(new ProductRelationTwigServiceProvider());
+ $this->application->register(new NavigationTwigServiceProvider());
+ $this->application->register(new ProductGroupTwigServiceProvider());
+ $this->application->register(new ProductLabelTwigServiceProvider());
+ $this->application->register(new CmsContentWidgetServiceProvider());
+ }
+
+}
diff --git a/tests/PyzTest/Shared/Testify/_support/Helper/Environment.php b/tests/PyzTest/Shared/Testify/_support/Helper/Environment.php
new file mode 100644
index 000000000..882b5384a
--- /dev/null
+++ b/tests/PyzTest/Shared/Testify/_support/Helper/Environment.php
@@ -0,0 +1,26 @@
+loadApplication();
+ }
+
+ /**
+ * @param \Codeception\TestInterface $test
+ *
+ * @return void
+ */
+ public function _before(TestInterface $test)
+ {
+ $this->client = new Client($this->application->boot());
+ }
+
+ /**
+ * @throws \Codeception\Exception\ModuleConfigException
+ *
+ * @return void
+ */
+ protected function loadApplication()
+ {
+ $this->application = new ApplicationYvesBootstrap();
+
+ if (!isset($this->application)) {
+ throw new ModuleConfigException(__CLASS__, 'Application instance was not received from bootstrap file');
+ }
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Application/Communication/Controller/HomepageCest.php b/tests/PyzTest/Yves/Application/Communication/Controller/HomepageCest.php
new file mode 100644
index 000000000..154b8f34b
--- /dev/null
+++ b/tests/PyzTest/Yves/Application/Communication/Controller/HomepageCest.php
@@ -0,0 +1,38 @@
+wantTo('See that i can open the homepage');
+ $i->amOnPage(Homepage::URL);
+ $i->canSeeElement(['class' => '__page']);
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Application/_support/ApplicationCommunicationTester.php b/tests/PyzTest/Yves/Application/_support/ApplicationCommunicationTester.php
new file mode 100644
index 000000000..5d64a7c88
--- /dev/null
+++ b/tests/PyzTest/Yves/Application/_support/ApplicationCommunicationTester.php
@@ -0,0 +1,30 @@
+wantTo('Open product page, and add item to cart with larger quantity than available');
+ $i->expectTo('Display error message');
+
+ $i->amOnPage(AvailabilityPresentationTester::FUJITSU2_PRODUCT_PAGE);
+
+ $i->click(ProductDetailPage::ADD_TO_CART_XPATH);
+
+ $i->see(CartListPage::CART_HEADER);
+
+ $i->fillField(CartListPage::FIRST_CART_ITEM_QUANTITY_INPUT_XPATH, 50);
+ $i->click(CartListPage::FIRST_CART_ITEM_CHANGE_QUANTITY_BUTTON_XPATH);
+
+ $i->see(AvailabilityPresentationTester::CART_PRE_CHECK_AVAILABILITY_ERROR_MESSAGE);
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Availability/Presentation/CheckoutAvailabilityCest.php b/tests/PyzTest/Yves/Availability/Presentation/CheckoutAvailabilityCest.php
new file mode 100644
index 000000000..1f210325a
--- /dev/null
+++ b/tests/PyzTest/Yves/Availability/Presentation/CheckoutAvailabilityCest.php
@@ -0,0 +1,82 @@
+wantTo('Checkout item with stock');
+ $i->expectTo('Availability changed during SM processing.');
+
+ $i->amOnPage(AvailabilityPresentationTester::FUJITSU_PRODUCT_PAGE);
+
+ $i->click(ProductDetailPage::ADD_TO_CART_XPATH);
+
+ $i->see(CartListPage::CART_HEADER);
+ $i->click(CartListPage::START_CHECKOUT_XPATH);
+
+ $i->processCheckout();
+
+ $i->amZed();
+ $i->amLoggedInUser();
+
+ $idProductFujitsu = 118;
+
+ $i->amOnPage(sprintf(AvailabilityViewPage::VIEW_PRODUCT_AVAILABILITY_URL, $idProductFujitsu));
+
+ $i->waitForElementVisible('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');
+
+ $reservedProductsBefore = $i->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');
+
+ codecept_debug('Reserved Products before: ' . $reservedProductsBefore);
+
+ $i->amOnPage(OrderListPage::ORDER_LIST_URL);
+ $i->wait(2);
+
+ $idSalesOrder = $i->grabTextFrom('//*[@class="dataTables_scrollBody"]/table/tbody/tr[1]/td[1]');
+
+ codecept_debug('ID Sales order: ' . $idSalesOrder);
+
+ $i->amOnPage(sprintf(OrderDetailPage::ORDER_DETAIL_PAGE_URL, $idSalesOrder));
+
+ $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'pay'));
+ $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'ship'));
+ $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'stock-update'));
+ $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'return'));
+ $i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'refund'));
+
+ $i->amOnPage(sprintf(AvailabilityViewPage::VIEW_PRODUCT_AVAILABILITY_URL, $idProductFujitsu));
+
+ $reservedProductsAfter = $i->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');
+
+ $i->assertEquals($reservedProductsAfter, $reservedProductsBefore - 1); //Reserved item returned back
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Availability/_support/AvailabilityPresentationTester.php b/tests/PyzTest/Yves/Availability/_support/AvailabilityPresentationTester.php
new file mode 100644
index 000000000..3530f1505
--- /dev/null
+++ b/tests/PyzTest/Yves/Availability/_support/AvailabilityPresentationTester.php
@@ -0,0 +1,51 @@
+amYves();
+ }
+
+ /**
+ * @return void
+ */
+ public function processCheckout()
+ {
+ $this->processAllCheckoutSteps();
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Availability/codeception.yml b/tests/PyzTest/Yves/Availability/codeception.yml
new file mode 100644
index 000000000..83fc403e5
--- /dev/null
+++ b/tests/PyzTest/Yves/Availability/codeception.yml
@@ -0,0 +1,33 @@
+namespace: PyzTest\Yves\Availability
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Presentation:
+ path: Presentation
+ class_name: AvailabilityPresentationTester
+ modules:
+ enabled:
+ - Asserts
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Config\Helper\ConfigInit
+ - \PyzTest\Yves\Checkout\Helper\CheckoutHelper
+ - \SprykerTest\Shared\Propel\Helper\PropelInstallHelper
+ - WebDriver:
+ url: ''
+ browser: chrome
+ window_size: 1920x1080
+ host: 0.0.0.0
+ restart: false
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
+ - \SprykerTest\Shared\Application\Helper\YvesHelper
+ - \SprykerTest\Shared\Application\Helper\ZedHelper
diff --git a/tests/Acceptance/Cart/PageObject/CartListPage.php b/tests/PyzTest/Yves/Cart/_support/PageObject/CartListPage.php
similarity index 78%
rename from tests/Acceptance/Cart/PageObject/CartListPage.php
rename to tests/PyzTest/Yves/Cart/_support/PageObject/CartListPage.php
index ffa1ca64f..ffcc73cfe 100644
--- a/tests/Acceptance/Cart/PageObject/CartListPage.php
+++ b/tests/PyzTest/Yves/Cart/_support/PageObject/CartListPage.php
@@ -2,10 +2,10 @@
/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
- * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
+ * Use of this software requires Presentation of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Cart\PageObject;
+namespace PyzTest\Yves\Cart\PageObject;
class CartListPage
{
diff --git a/tests/YvesFunctional/Pyz/Yves/Checkout/Controller/CheckoutControllerTest.php b/tests/PyzTest/Yves/Checkout/Controller/CheckoutControllerTest.php
similarity index 93%
rename from tests/YvesFunctional/Pyz/Yves/Checkout/Controller/CheckoutControllerTest.php
rename to tests/PyzTest/Yves/Checkout/Controller/CheckoutControllerTest.php
index a754bf30c..2ecca22b6 100644
--- a/tests/YvesFunctional/Pyz/Yves/Checkout/Controller/CheckoutControllerTest.php
+++ b/tests/PyzTest/Yves/Checkout/Controller/CheckoutControllerTest.php
@@ -5,8 +5,9 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesFunctional\Pyz\Yves\Checkout\Controller;
+namespace PyzTest\Yves\Checkout\Controller;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\AddressTransfer;
use Generated\Shared\Transfer\CustomerTransfer;
use Generated\Shared\Transfer\ExpenseTransfer;
@@ -15,7 +16,6 @@
use Generated\Shared\Transfer\QuoteTransfer;
use Generated\Shared\Transfer\ShipmentTransfer;
use Generated\Shared\Transfer\TotalsTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Yves\Checkout\Controller\CheckoutController;
use Pyz\Yves\Checkout\Form\Steps\PaymentForm;
use Pyz\Yves\Checkout\Plugin\Provider\CheckoutControllerProvider;
@@ -28,21 +28,22 @@
use Spryker\Shared\Price\PriceMode;
use Spryker\Shared\Shipment\ShipmentConstants;
use Spryker\Yves\DummyPayment\Form\AbstractSubForm;
-use Spryker\Yves\Kernel\Plugin\Pimple;
use Spryker\Zed\DummyPayment\DummyPaymentConfig;
use Symfony\Component\Form\FormView;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Session\Session;
/**
- * @group YvesFunctional
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Controller
* @group CheckoutControllerTest
+ * Add your own group annotations below this line
*/
-class CheckoutControllerTest extends PHPUnit_Framework_TestCase
+class CheckoutControllerTest extends Unit
{
const CUSTOMER_URL = '/checkout/customer';
@@ -91,9 +92,7 @@ protected function setUp()
$this->controller = new CheckoutController();
$sessionClient = new SessionClient();
- $pimple = new Pimple();
- $sessionContainer = $pimple->getApplication()['session'];
- $sessionClient->setContainer($sessionContainer);
+ $sessionClient->setContainer(new Session());
}
/**
@@ -111,6 +110,7 @@ protected function skipIfCi()
*/
public function testIndexAction()
{
+ $this->markTestSkipped('Move this to function controller tests');
$checkoutController = new CheckoutController();
$this->setQuoteForCustomer();
@@ -128,6 +128,7 @@ public function testIndexAction()
*/
public function testCustomerActionShouldRenderRegisterAndLoginForms()
{
+ $this->markTestSkipped('Move this to function controller tests');
$request = Request::createFromGlobals();
$request->attributes->set('_route', CheckoutControllerProvider::CHECKOUT_CUSTOMER);
@@ -143,6 +144,7 @@ public function testCustomerActionShouldRenderRegisterAndLoginForms()
*/
public function testCustomerAction()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->setQuoteForCustomer();
$customerData = $this->getFormData(self::CUSTOMER_URL, self::CUSTOMER_ACTION, self::CUSTOMER_ROUTE, self::GUEST_FORM);
@@ -170,6 +172,7 @@ public function testCustomerAction()
*/
public function testAddressActionShouldRenderAddressForms()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->setQuoteForAddress();
$request = Request::createFromGlobals();
@@ -186,6 +189,7 @@ public function testAddressActionShouldRenderAddressForms()
*/
public function testAddressAction()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->setQuoteForAddress();
$addressesData = $this->getFormData(self::ADDRESS_URL, self::ADDRESS_ACTION, self::ADDRESS_ROUTE, self::ADDRESS_FORM);
@@ -219,6 +223,7 @@ public function testAddressAction()
*/
public function testShipmentActionShouldRenderShipmentForms()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->setQuoteForShipment();
$request = Request::createFromGlobals();
@@ -235,6 +240,7 @@ public function testShipmentActionShouldRenderShipmentForms()
*/
public function testShipmentAction()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->setQuoteForShipment();
$shipmentData = $this->getFormData(self::SHIPMENT_URL, self::SHIPMENT_ACTION, self::SHIPMENT_ROUTE, self::SHIPMENT_FORM);
@@ -257,6 +263,7 @@ public function testShipmentAction()
*/
public function testPaymentActionShouldRenderPaymentForms()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->allowMoreThenOneRequestToZed();
$this->setQuoteForPayment();
@@ -277,6 +284,7 @@ public function testPaymentActionShouldRenderPaymentForms()
*/
public function testPaymentAction()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->allowMoreThenOneRequestToZed();
$this->setQuoteForPayment();
@@ -306,6 +314,7 @@ public function testPaymentAction()
*/
public function testSummaryActionShouldRenderSummaryPage()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->setQuoteForSummary();
$request = Request::createFromGlobals();
@@ -323,6 +332,7 @@ public function testSummaryActionShouldRenderSummaryPage()
*/
public function testSummaryAction()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->allowMoreThenOneRequestToZed();
$this->setQuoteForSummary();
@@ -346,6 +356,7 @@ public function testSummaryAction()
*/
public function testPlaceOrder()
{
+ $this->markTestSkipped('Move this to function controller tests');
$this->markTestIncomplete('Request data missing');
$this->setQuoteForSummary();
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/StepFactoryTest.php b/tests/PyzTest/Yves/Checkout/Process/StepFactoryTest.php
similarity index 85%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/StepFactoryTest.php
rename to tests/PyzTest/Yves/Checkout/Process/StepFactoryTest.php
index f021cd59c..64aecc731 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/StepFactoryTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/StepFactoryTest.php
@@ -5,22 +5,23 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process;
+namespace PyzTest\Yves\Checkout\Process;
-use PHPUnit_Framework_TestCase;
+use Codeception\Test\Unit;
use Pyz\Yves\Checkout\CheckoutDependencyProvider;
use Pyz\Yves\Checkout\Process\StepFactory;
use Spryker\Yves\Kernel\Container;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group StepFactoryTest
+ * Add your own group annotations below this line
*/
-class StepFactoryTest extends PHPUnit_Framework_TestCase
+class StepFactoryTest extends Unit
{
const EXPECTED_DEPENDENCY = 'expected dependency';
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/AddressStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/AddressStepTest.php
similarity index 97%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/AddressStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/AddressStepTest.php
index f51cc72cb..af098ce99 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/AddressStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/AddressStepTest.php
@@ -5,27 +5,28 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\AddressesTransfer;
use Generated\Shared\Transfer\AddressTransfer;
use Generated\Shared\Transfer\CustomerTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Client\Customer\CustomerClientInterface;
use Pyz\Yves\Checkout\Process\Steps\AddressStep;
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group AddressStepTest
+ * Add your own group annotations below this line
*/
-class AddressStepTest extends PHPUnit_Framework_TestCase
+class AddressStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/CustomerStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/CustomerStepTest.php
similarity index 95%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/CustomerStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/CustomerStepTest.php
index e46e57b33..230248600 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/CustomerStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/CustomerStepTest.php
@@ -5,26 +5,27 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\CustomerTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Client\Customer\CustomerClientInterface;
use Pyz\Yves\Checkout\Process\Steps\CustomerStep;
use Spryker\Yves\StepEngine\Dependency\Plugin\Handler\StepHandlerPluginInterface;
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group CustomerStepTest
+ * Add your own group annotations below this line
*/
-class CustomerStepTest extends PHPUnit_Framework_TestCase
+class CustomerStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/EntryStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/EntryStepTest.php
similarity index 88%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/EntryStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/EntryStepTest.php
index 7d8149467..95ab7b1c9 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/EntryStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/EntryStepTest.php
@@ -5,24 +5,25 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\QuoteTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Client\Customer\CustomerClient;
use Pyz\Yves\Checkout\Process\Steps\EntryStep;
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group EntryStepTest
+ * Add your own group annotations below this line
*/
-class EntryStepTest extends PHPUnit_Framework_TestCase
+class EntryStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/PaymentStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/PaymentStepTest.php
similarity index 94%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/PaymentStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/PaymentStepTest.php
index 87fee1d99..4b0f59831 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/PaymentStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/PaymentStepTest.php
@@ -5,11 +5,11 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\PaymentTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Yves\Checkout\Process\Steps\PaymentStep;
use Spryker\Yves\Messenger\FlashMessenger\FlashMessengerInterface;
use Spryker\Yves\StepEngine\Dependency\Plugin\Handler\StepHandlerPluginCollection;
@@ -17,15 +17,16 @@
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group PaymentStepTest
+ * Add your own group annotations below this line
*/
-class PaymentStepTest extends PHPUnit_Framework_TestCase
+class PaymentStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/PlaceOrderStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/PlaceOrderStepTest.php
similarity index 96%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/PlaceOrderStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/PlaceOrderStepTest.php
index adb39112d..9749ddb69 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/PlaceOrderStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/PlaceOrderStepTest.php
@@ -5,13 +5,13 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\CheckoutErrorTransfer;
use Generated\Shared\Transfer\CheckoutResponseTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
use Generated\Shared\Transfer\SaveOrderTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Yves\Checkout\Process\Steps\PlaceOrderStep;
use Spryker\Client\Checkout\CheckoutClientInterface;
use Spryker\Yves\Messenger\FlashMessenger\FlashMessengerInterface;
@@ -19,15 +19,16 @@
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group PlaceOrderStepTest
+ * Add your own group annotations below this line
*/
-class PlaceOrderStepTest extends PHPUnit_Framework_TestCase
+class PlaceOrderStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/ShipmentStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/ShipmentStepTest.php
similarity index 94%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/ShipmentStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/ShipmentStepTest.php
index 46b2813fc..ba5119cf7 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/ShipmentStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/ShipmentStepTest.php
@@ -5,12 +5,12 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\ExpenseTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
use Generated\Shared\Transfer\ShipmentTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Yves\Checkout\CheckoutDependencyProvider;
use Pyz\Yves\Checkout\Process\Steps\ShipmentStep;
use Spryker\Client\Calculation\CalculationClientInterface;
@@ -20,15 +20,16 @@
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group ShipmentStepTest
+ * Add your own group annotations below this line
*/
-class ShipmentStepTest extends PHPUnit_Framework_TestCase
+class ShipmentStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/SuccessStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/SuccessStepTest.php
similarity index 93%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/SuccessStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/SuccessStepTest.php
index 2340d9ec9..85fc1afe9 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/SuccessStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/SuccessStepTest.php
@@ -5,26 +5,27 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\ItemTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Client\Customer\CustomerClientInterface;
use Pyz\Yves\Checkout\Process\Steps\SuccessStep;
use Spryker\Client\Cart\CartClientInterface;
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group SuccessStepTest
+ * Add your own group annotations below this line
*/
-class SuccessStepTest extends PHPUnit_Framework_TestCase
+class SuccessStepTest extends Unit
{
/**
diff --git a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/SummaryStepTest.php b/tests/PyzTest/Yves/Checkout/Process/Steps/SummaryStepTest.php
similarity index 93%
rename from tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/SummaryStepTest.php
rename to tests/PyzTest/Yves/Checkout/Process/Steps/SummaryStepTest.php
index 45982c6a9..76c80a1d8 100644
--- a/tests/YvesUnit/Pyz/Yves/Checkout/Process/Steps/SummaryStepTest.php
+++ b/tests/PyzTest/Yves/Checkout/Process/Steps/SummaryStepTest.php
@@ -5,13 +5,13 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Checkout\Process\Steps;
+namespace PyzTest\Yves\Checkout\Process\Steps;
+use Codeception\Test\Unit;
use Generated\Shared\Transfer\AddressTransfer;
use Generated\Shared\Transfer\PaymentTransfer;
use Generated\Shared\Transfer\QuoteTransfer;
use Generated\Shared\Transfer\ShipmentTransfer;
-use PHPUnit_Framework_TestCase;
use Pyz\Yves\Checkout\Process\Steps\SummaryStep;
use Spryker\Client\Cart\CartClientInterface;
use Spryker\Yves\ProductBundle\Grouper\ProductBundleGrouperInterface;
@@ -19,15 +19,16 @@
use Symfony\Component\HttpFoundation\Request;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Checkout
* @group Process
* @group Steps
* @group SummaryStepTest
+ * Add your own group annotations below this line
*/
-class SummaryStepTest extends PHPUnit_Framework_TestCase
+class SummaryStepTest extends Unit
{
/**
diff --git a/tests/_support/AcceptanceTester.php b/tests/PyzTest/Yves/Checkout/_support/CheckoutBusinessTester.php
similarity index 70%
rename from tests/_support/AcceptanceTester.php
rename to tests/PyzTest/Yves/Checkout/_support/CheckoutBusinessTester.php
index 1502945ca..32a7b682b 100644
--- a/tests/_support/AcceptanceTester.php
+++ b/tests/PyzTest/Yves/Checkout/_support/CheckoutBusinessTester.php
@@ -1,4 +1,7 @@
getModule('WebDriver');
+ }
+
+ /**
+ * @return $this
+ */
+ public function processCustomerStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->see('Create account');
+
+ $tester->fillField('//*[@id="registerForm_customer_first_name"]', 'first-name-test' . rand(100, 999));
+ $tester->fillField('//*[@id="registerForm_customer_last_name"]', 'last-name-test' . rand(100, 999));
+ $tester->fillField('//*[@id="registerForm_customer_email"]', 'email-test@domain-' . rand(100, 999) . '.tld');
+ $tester->fillField('//*[@id="registerForm_customer_password_pass"]', 'as');
+ $tester->fillField('//*[@id="registerForm_customer_password_confirm"]', 'as');
+ $tester->click('//*[@id="registerForm_customer_accept_terms"]');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function clickRegisterButton()
+ {
+ $tester = $this->getWebDriver();
+ $tester->click('/html/body/div[2]/main/div/div[1]/div[3]/form/div/div/button');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function processAddressStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->see('Shipping Address');
+
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_first_name"]', 'first-name-test' . rand(100, 999));
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_last_name"]', 'last-name-test' . rand(100, 999));
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_company"]', 'company-test' . rand(100, 999));
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_phone"]', '123456789');
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_address1"]', 'address1');
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_address2"]', '15');
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_address3"]', 'address3');
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_zip_code"]', '10405');
+ $tester->fillField('//*[@id="addressesForm_shippingAddress_city"]', 'city');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function processShipmentStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->see('Shipment');
+
+ $tester->click('//*[@id="shipmentForm_idShipmentMethod_1"]');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function processOverviewStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->see('Overview');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function processSuccessStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->see('Your order has been placed successfully!');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function processPaymentStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->see('Payment');
+
+ $tester->click('//*[@id="paymentForm_paymentSelection_1"]');
+ $tester->fillField('//*[@id="paymentForm_dummyPaymentInvoice_date_of_birth"]', '01.07.1985');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function nextStep()
+ {
+ $tester = $this->getWebDriver();
+ $tester->click('//*[contains(@class, "success")]');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function processAllCheckoutSteps()
+ {
+ $this->processCustomerStep()
+ ->clickRegisterButton()
+ ->processAddressStep()
+ ->nextStep()
+ ->processShipmentStep()
+ ->nextStep()
+ ->processPaymentStep()
+ ->nextStep()
+ ->processOverviewStep()
+ ->nextStep()
+ ->processSuccessStep();
+
+ return $this;
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Checkout/codeception.yml b/tests/PyzTest/Yves/Checkout/codeception.yml
new file mode 100644
index 000000000..17d367c17
--- /dev/null
+++ b/tests/PyzTest/Yves/Checkout/codeception.yml
@@ -0,0 +1,23 @@
+namespace: PyzTest\Yves\Checkout
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Business:
+ path: .
+ class_name: CheckoutBusinessTester
+ modules:
+ enabled:
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Config\Helper\ConfigInit
+ - \SprykerTest\Shared\Propel\Helper\ConnectionHelper
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
diff --git a/tests/YvesUnit/Pyz/Yves/Customer/CustomerDependencyProviderTest.php b/tests/PyzTest/Yves/Customer/Customer/CustomerDependencyProviderTest.php
similarity index 83%
rename from tests/YvesUnit/Pyz/Yves/Customer/CustomerDependencyProviderTest.php
rename to tests/PyzTest/Yves/Customer/Customer/CustomerDependencyProviderTest.php
index 006e5b25e..04ac5c642 100644
--- a/tests/YvesUnit/Pyz/Yves/Customer/CustomerDependencyProviderTest.php
+++ b/tests/PyzTest/Yves/Customer/Customer/CustomerDependencyProviderTest.php
@@ -5,9 +5,9 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Customer;
+namespace PyzTest\Yves\Customer\Customer;
-use PHPUnit_Framework_TestCase;
+use Codeception\Test\Unit;
use Pyz\Client\Customer\CustomerClientInterface;
use Pyz\Client\Newsletter\NewsletterClientInterface;
use Pyz\Yves\Customer\CustomerDependencyProvider;
@@ -16,16 +16,18 @@
use Spryker\Client\Sales\SalesClientInterface;
use Spryker\Yves\Kernel\Application;
use Spryker\Yves\Kernel\Container;
-use Spryker\Yves\Messenger\FlashMessenger\FlashMessengerInterface;
+use Spryker\Yves\Kernel\Plugin\Pimple;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Customer
+ * @group Customer
* @group CustomerDependencyProviderTest
+ * Add your own group annotations below this line
*/
-class CustomerDependencyProviderTest extends PHPUnit_Framework_TestCase
+class CustomerDependencyProviderTest extends Unit
{
/**
@@ -33,6 +35,9 @@ class CustomerDependencyProviderTest extends PHPUnit_Framework_TestCase
*/
public function testProvideDependencies()
{
+ $pimple = new Pimple();
+ $pimple->setApplication(new Application());
+
$customerDependencyProvider = new CustomerDependencyProvider();
$container = new Container();
@@ -46,7 +51,6 @@ public function testProvideDependencies()
$this->assertInstanceOf(AuthenticationHandler::class, $container[CustomerDependencyProvider::PLUGIN_AUTHENTICATION_HANDLER]);
$this->assertInstanceOf(CheckoutAuthenticationHandlerPluginInterface::class, $container[CustomerDependencyProvider::PLUGIN_LOGIN_AUTHENTICATION_HANDLER]);
$this->assertInstanceOf(CheckoutAuthenticationHandlerPluginInterface::class, $container[CustomerDependencyProvider::PLUGIN_GUEST_AUTHENTICATION_HANDLER]);
- $this->assertInstanceOf(FlashMessengerInterface::class, $container[CustomerDependencyProvider::FLASH_MESSENGER]);
}
}
diff --git a/tests/YvesUnit/Pyz/Yves/Customer/CustomerFactoryTest.php b/tests/PyzTest/Yves/Customer/Customer/CustomerFactoryTest.php
similarity index 71%
rename from tests/YvesUnit/Pyz/Yves/Customer/CustomerFactoryTest.php
rename to tests/PyzTest/Yves/Customer/Customer/CustomerFactoryTest.php
index f9b218e81..ef5b316fa 100644
--- a/tests/YvesUnit/Pyz/Yves/Customer/CustomerFactoryTest.php
+++ b/tests/PyzTest/Yves/Customer/Customer/CustomerFactoryTest.php
@@ -5,20 +5,22 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace YvesUnit\Pyz\Yves\Customer;
+namespace PyzTest\Yves\Customer\Customer;
-use PHPUnit_Framework_TestCase;
+use Codeception\Test\Unit;
use Pyz\Client\Newsletter\NewsletterClientInterface;
use Pyz\Yves\Customer\CustomerFactory;
/**
- * @group YvesUnit
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
* @group Customer
+ * @group Customer
* @group CustomerFactoryTest
+ * Add your own group annotations below this line
*/
-class CustomerFactoryTest extends PHPUnit_Framework_TestCase
+class CustomerFactoryTest extends Unit
{
/**
diff --git a/tests/Acceptance/Customer/Yves/CustomerAddressCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerAddressCest.php
similarity index 78%
rename from tests/Acceptance/Customer/Yves/CustomerAddressCest.php
rename to tests/PyzTest/Yves/Customer/Presentation/CustomerAddressCest.php
index 7dae8e6d4..d7dc478e4 100644
--- a/tests/Acceptance/Customer/Yves/CustomerAddressCest.php
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerAddressCest.php
@@ -5,27 +5,30 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves;
+namespace PyzTest\Yves\Customer\Presentation;
-use Acceptance\Customer\Yves\PageObject\CustomerAddressesPage;
-use Acceptance\Customer\Yves\PageObject\CustomerAddressPage;
-use Acceptance\Customer\Yves\Tester\CustomerAddressTester;
+use PyzTest\Yves\Customer\CustomerPresentationTester;
+use PyzTest\Yves\Customer\PageObject\CustomerAddressesPage;
+use PyzTest\Yves\Customer\PageObject\CustomerAddressPage;
/**
- * @group Acceptance
- * @group Customer
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Customer
+ * @group Presentation
* @group CustomerAddressCest
+ * Add your own group annotations below this line
*/
class CustomerAddressCest
{
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerAddressTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanAddNewAddress(CustomerAddressTester $i)
+ public function testICanAddNewAddress(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerAddressPage::URL);
diff --git a/tests/Acceptance/Customer/Yves/CustomerAddressesCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerAddressesCest.php
similarity index 52%
rename from tests/Acceptance/Customer/Yves/CustomerAddressesCest.php
rename to tests/PyzTest/Yves/Customer/Presentation/CustomerAddressesCest.php
index 4586bf7cf..8df969632 100644
--- a/tests/Acceptance/Customer/Yves/CustomerAddressesCest.php
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerAddressesCest.php
@@ -5,27 +5,30 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves;
+namespace PyzTest\Yves\Customer\Presentation;
-use Acceptance\Customer\Yves\PageObject\CustomerAddressesPage;
-use Acceptance\Customer\Yves\PageObject\CustomerAddressPage;
-use Acceptance\Customer\Yves\Tester\CustomerAddressesTester;
+use PyzTest\Yves\Customer\CustomerPresentationTester;
+use PyzTest\Yves\Customer\PageObject\CustomerAddressesPage;
+use PyzTest\Yves\Customer\PageObject\CustomerAddressPage;
/**
- * @group Acceptance
- * @group Customer
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Customer
+ * @group Presentation
* @group CustomerAddressesCest
+ * Add your own group annotations below this line
*/
class CustomerAddressesCest
{
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerAddressesTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanOpenAddAddressPage(CustomerAddressesTester $i)
+ public function testICanOpenAddAddressPage(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerAddressesPage::URL);
diff --git a/tests/PyzTest/Yves/Customer/Presentation/CustomerLoginCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerLoginCest.php
new file mode 100644
index 000000000..682371f55
--- /dev/null
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerLoginCest.php
@@ -0,0 +1,63 @@
+amOnPage(CustomerLoginPage::URL);
+ $i->see(CustomerLoginPage::TITLE_LOGIN, 'h4');
+ }
+
+ /**
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
+ *
+ * @return void
+ */
+ public function testICanOpenForgotPasswordPage(CustomerPresentationTester $i)
+ {
+ $i->amOnPage(CustomerLoginPage::URL);
+ $i->click(CustomerLoginPage::FORGOT_PASSWORD_LINK);
+ $i->seeCurrentUrlEquals(CustomerPasswordForgottenPage::URL);
+ }
+
+ /**
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
+ *
+ * @return void
+ */
+ public function testICanLoginWithValidData(CustomerPresentationTester $i)
+ {
+ $i->amOnPage(CustomerLoginPage::URL);
+ $customerTransfer = $i->haveRegisteredCustomer();
+ $i->submitLoginForm($customerTransfer->getEmail(), $customerTransfer->getPassword());
+ $i->seeCurrentUrlEquals(CustomerOverviewPage::URL);
+ }
+
+}
diff --git a/tests/PyzTest/Yves/Customer/Presentation/CustomerLogoutCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerLogoutCest.php
new file mode 100644
index 000000000..224449997
--- /dev/null
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerLogoutCest.php
@@ -0,0 +1,44 @@
+amOnPage(CustomerLoginPage::URL);
+ $customerTransfer = $i->haveRegisteredCustomer();
+ $i->submitLoginForm($customerTransfer->getEmail(), $customerTransfer->getPassword());
+ $i->seeCurrentUrlEquals(CustomerOverviewPage::URL);
+
+ $i->amOnPage(CustomerLogoutPage::URL);
+
+ $i->seeCurrentUrlEquals('/');
+ }
+
+}
diff --git a/tests/Acceptance/Customer/Yves/CustomerNewsletterCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerNewsletterCest.php
similarity index 66%
rename from tests/Acceptance/Customer/Yves/CustomerNewsletterCest.php
rename to tests/PyzTest/Yves/Customer/Presentation/CustomerNewsletterCest.php
index 87ae703d3..2912fbcf5 100644
--- a/tests/Acceptance/Customer/Yves/CustomerNewsletterCest.php
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerNewsletterCest.php
@@ -5,29 +5,32 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves;
+namespace PyzTest\Yves\Customer\Presentation;
-use Acceptance\Customer\Yves\PageObject\CustomerNewsletterPage;
-use Acceptance\Customer\Yves\Tester\CustomerLoginTester;
use Codeception\Util\Stub;
+use PyzTest\Yves\Customer\CustomerPresentationTester;
+use PyzTest\Yves\Customer\PageObject\CustomerNewsletterPage;
use Spryker\Zed\Newsletter\Dependency\Facade\NewsletterToMailInterface;
use Spryker\Zed\Newsletter\NewsletterDependencyProvider;
/**
- * @group Acceptance
- * @group Customer
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Customer
+ * @group Presentation
* @group CustomerNewsletterCest
+ * Add your own group annotations below this line
*/
class CustomerNewsletterCest
{
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerLoginTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanSubscribeNewsletter(CustomerLoginTester $i)
+ public function testICanSubscribeNewsletter(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerNewsletterPage::URL);
@@ -40,17 +43,17 @@ public function testICanSubscribeNewsletter(CustomerLoginTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerLoginTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanUnSubscribeNewsletter(CustomerLoginTester $i)
+ public function testICanUnSubscribeNewsletter(CustomerPresentationTester $i)
{
- $i->amLoggedInCustomer();
+ $customerTransfer = $i->amLoggedInCustomer();
$i->setDependency(NewsletterDependencyProvider::FACADE_MAIL, Stub::makeEmpty(NewsletterToMailInterface::class));
- $i->addNewsletterSubscription(CustomerNewsletterPage::NEW_CUSTOMER_EMAIL);
+ $i->addNewsletterSubscription($customerTransfer->getEmail());
$i->amOnPage(CustomerNewsletterPage::URL);
$i->click(['name' => CustomerNewsletterPage::FORM_FIELD_SELECTOR_NEWSLETTER_SUBSCRIPTION]);
$i->click(CustomerNewsletterPage::BUTTON_SUBMIT);
diff --git a/tests/Acceptance/Customer/Yves/CustomerOverviewCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerOverviewCest.php
similarity index 56%
rename from tests/Acceptance/Customer/Yves/CustomerOverviewCest.php
rename to tests/PyzTest/Yves/Customer/Presentation/CustomerOverviewCest.php
index 7caccbe5f..8d824d8f4 100644
--- a/tests/Acceptance/Customer/Yves/CustomerOverviewCest.php
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerOverviewCest.php
@@ -5,30 +5,33 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves;
+namespace PyzTest\Yves\Customer\Presentation;
-use Acceptance\Customer\Yves\PageObject\CustomerAddressesPage;
-use Acceptance\Customer\Yves\PageObject\CustomerNewsletterPage;
-use Acceptance\Customer\Yves\PageObject\CustomerOrdersPage;
-use Acceptance\Customer\Yves\PageObject\CustomerOverviewPage;
-use Acceptance\Customer\Yves\PageObject\CustomerProfilePage;
-use Acceptance\Customer\Yves\Tester\CustomerOverviewTester;
+use PyzTest\Yves\Customer\CustomerPresentationTester;
+use PyzTest\Yves\Customer\PageObject\CustomerAddressesPage;
+use PyzTest\Yves\Customer\PageObject\CustomerNewsletterPage;
+use PyzTest\Yves\Customer\PageObject\CustomerOrdersPage;
+use PyzTest\Yves\Customer\PageObject\CustomerOverviewPage;
+use PyzTest\Yves\Customer\PageObject\CustomerProfilePage;
/**
- * @group Acceptance
- * @group Customer
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Customer
+ * @group Presentation
* @group CustomerOverviewCest
+ * Add your own group annotations below this line
*/
class CustomerOverviewCest
{
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanOpenOverviewPage(CustomerOverviewTester $i)
+ public function testICanOpenOverviewPage(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerOverviewPage::URL);
@@ -41,11 +44,11 @@ public function testICanOpenOverviewPage(CustomerOverviewTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testCustomerWithoutAddressShouldSeeAddAddressInfoText(CustomerOverviewTester $i)
+ public function testCustomerWithoutAddressShouldSeeAddAddressInfoText(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerOverviewPage::URL);
@@ -55,29 +58,11 @@ public function testCustomerWithoutAddressShouldSeeAddAddressInfoText(CustomerOv
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
- *
- * @return void
- */
- public function testCustomerWithAddressShouldNotSeeAddressInfoText(CustomerOverviewTester $i)
- {
- $i->haveRegisteredCustomer(CustomerOverviewPage::NEW_CUSTOMER_EMAIL);
- $i->addAddressToCustomer(CustomerOverviewPage::NEW_CUSTOMER_EMAIL, CustomerAddressesPage::ADDRESS_A);
-
- $i->amLoggedInCustomer();
-
- $i->amOnPage(CustomerOverviewPage::URL);
-
- $i->dontSee(CustomerOverviewPage::INFO_TEXT_ADD_SHIPPING_ADDRESS);
- $i->dontSee(CustomerOverviewPage::INFO_TEXT_ADD_BILLING_ADDRESS);
- }
-
- /**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanGoFromOverviewToProfilePage(CustomerOverviewTester $i)
+ public function testICanGoFromOverviewToProfilePage(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerOverviewPage::URL);
@@ -86,11 +71,11 @@ public function testICanGoFromOverviewToProfilePage(CustomerOverviewTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanGoFromOverviewToAddressesPage(CustomerOverviewTester $i)
+ public function testICanGoFromOverviewToAddressesPage(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerOverviewPage::URL);
@@ -99,11 +84,11 @@ public function testICanGoFromOverviewToAddressesPage(CustomerOverviewTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanGoFromOverviewToOrdersPage(CustomerOverviewTester $i)
+ public function testICanGoFromOverviewToOrdersPage(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerOverviewPage::URL);
@@ -112,11 +97,11 @@ public function testICanGoFromOverviewToOrdersPage(CustomerOverviewTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerOverviewTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanGoFromOverviewToNewsletterPage(CustomerOverviewTester $i)
+ public function testICanGoFromOverviewToNewsletterPage(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerOverviewPage::URL);
diff --git a/tests/Acceptance/Customer/Yves/CustomerProfileCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerProfileCest.php
similarity index 78%
rename from tests/Acceptance/Customer/Yves/CustomerProfileCest.php
rename to tests/PyzTest/Yves/Customer/Presentation/CustomerProfileCest.php
index 45fcb2c26..cccc47134 100644
--- a/tests/Acceptance/Customer/Yves/CustomerProfileCest.php
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerProfileCest.php
@@ -5,26 +5,29 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves;
+namespace PyzTest\Yves\Customer\Presentation;
-use Acceptance\Customer\Yves\PageObject\CustomerProfilePage;
-use Acceptance\Customer\Yves\Tester\CustomerProfileTester;
+use PyzTest\Yves\Customer\CustomerPresentationTester;
+use PyzTest\Yves\Customer\PageObject\CustomerProfilePage;
/**
- * @group Acceptance
- * @group Customer
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Customer
+ * @group Presentation
* @group CustomerProfileCest
+ * Add your own group annotations below this line
*/
class CustomerProfileCest
{
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerProfileTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanUpdateProfileData(CustomerProfileTester $i)
+ public function testICanUpdateProfileData(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerProfilePage::URL);
@@ -40,11 +43,11 @@ public function testICanUpdateProfileData(CustomerProfileTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerProfileTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanUpdateEmail(CustomerProfileTester $i)
+ public function testICanUpdateEmail(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerProfilePage::URL);
@@ -56,14 +59,14 @@ public function testICanUpdateEmail(CustomerProfileTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerProfileTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanNotUpdateEmailToAnAlreadyUsedOne(CustomerProfileTester $i)
+ public function testICanNotUpdateEmailToAnAlreadyUsedOne(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
- $i->haveRegisteredCustomer(CustomerProfilePage::REGISTERED_CUSTOMER_EMAIL);
+ $i->haveRegisteredCustomer(['email' => CustomerProfilePage::REGISTERED_CUSTOMER_EMAIL]);
$i->amOnPage(CustomerProfilePage::URL);
$i->fillField(CustomerProfilePage::FORM_FIELD_SELECTOR_EMAIL, CustomerProfilePage::REGISTERED_CUSTOMER_EMAIL);
@@ -73,16 +76,15 @@ public function testICanNotUpdateEmailToAnAlreadyUsedOne(CustomerProfileTester $
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerProfileTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanChangePassword(CustomerProfileTester $i)
+ public function testICanChangePassword(CustomerPresentationTester $i)
{
- $i->amLoggedInCustomer();
+ $customerTransfer = $i->amLoggedInCustomer();
$i->amOnPage(CustomerProfilePage::URL);
- $customerTransfer = CustomerProfilePage::getCustomerData(CustomerProfilePage::REGISTERED_CUSTOMER_EMAIL);
$oldPassword = $customerTransfer->getPassword();
$newPassword = strrev($oldPassword);
@@ -98,11 +100,11 @@ public function testICanChangePassword(CustomerProfileTester $i)
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerProfileTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanNotChangePasswordWhenNewPasswordsNotMatch(CustomerProfileTester $i)
+ public function testICanNotChangePasswordWhenNewPasswordsNotMatch(CustomerPresentationTester $i)
{
$i->amLoggedInCustomer();
$i->amOnPage(CustomerProfilePage::URL);
diff --git a/tests/Acceptance/Customer/Yves/CustomerRegistrationCest.php b/tests/PyzTest/Yves/Customer/Presentation/CustomerRegistrationCest.php
similarity index 56%
rename from tests/Acceptance/Customer/Yves/CustomerRegistrationCest.php
rename to tests/PyzTest/Yves/Customer/Presentation/CustomerRegistrationCest.php
index f84a2d393..afc6d2861 100644
--- a/tests/Acceptance/Customer/Yves/CustomerRegistrationCest.php
+++ b/tests/PyzTest/Yves/Customer/Presentation/CustomerRegistrationCest.php
@@ -5,38 +5,41 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves;
+namespace PyzTest\Yves\Customer\Presentation;
-use Acceptance\Customer\Yves\PageObject\CustomerOverviewPage;
-use Acceptance\Customer\Yves\PageObject\CustomerRegistrationPage;
-use Acceptance\Customer\Yves\Tester\CustomerRegistrationTester;
+use PyzTest\Yves\Customer\CustomerPresentationTester;
+use PyzTest\Yves\Customer\PageObject\CustomerOverviewPage;
+use PyzTest\Yves\Customer\PageObject\CustomerRegistrationPage;
/**
- * @group Acceptance
- * @group Customer
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Customer
+ * @group Presentation
* @group CustomerRegistrationCest
+ * Add your own group annotations below this line
*/
class CustomerRegistrationCest
{
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerRegistrationTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanOpenRegistrationPage(CustomerRegistrationTester $i)
+ public function testICanOpenRegistrationPage(CustomerPresentationTester $i)
{
$i->amOnPage(CustomerRegistrationPage::URL);
$i->see(CustomerRegistrationPage::TITLE_CREATE_ACCOUNT, 'h4');
}
/**
- * @param \Acceptance\Customer\Yves\Tester\CustomerRegistrationTester $i
+ * @param \PyzTest\Yves\Customer\CustomerPresentationTester $i
*
* @return void
*/
- public function testICanRegisterWithValidData(CustomerRegistrationTester $i)
+ public function testICanRegisterWithValidData(CustomerPresentationTester $i)
{
$i->amOnPage(CustomerRegistrationPage::URL);
$i->fillOutRegistrationForm();
diff --git a/tests/_support/ConsoleTester.php b/tests/PyzTest/Yves/Customer/_support/CustomerCustomerTester.php
similarity index 70%
rename from tests/_support/ConsoleTester.php
rename to tests/PyzTest/Yves/Customer/_support/CustomerCustomerTester.php
index e900db555..e0f80d3ae 100644
--- a/tests/_support/ConsoleTester.php
+++ b/tests/PyzTest/Yves/Customer/_support/CustomerCustomerTester.php
@@ -1,4 +1,7 @@
amYves();
+ }
+
+ /**
+ * @param string $email
+ * @param string $password
+ *
+ * @return void
+ */
+ public function submitLoginForm($email, $password)
+ {
+ $i = $this;
+ $i->submitForm(['name' => 'loginForm'], [
+ CustomerLoginPage::FORM_FIELD_SELECTOR_EMAIL => $email,
+ CustomerLoginPage::FORM_FIELD_SELECTOR_PASSWORD => $password,
+ ]);
+ }
+
+ /**
+ * @return void
+ */
+ public function fillOutRegistrationForm()
+ {
+ $i = $this;
+ $customerTransfer = CustomerRegistrationPage::getCustomerData(CustomerRegistrationPage::NEW_CUSTOMER_EMAIL);
+
+ $i->selectOption(CustomerRegistrationPage::FORM_FIELD_SELECTOR_SALUTATION, $customerTransfer->getSalutation());
+ $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_FIRST_NAME, $customerTransfer->getFirstName());
+ $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_LAST_NAME, $customerTransfer->getLastName());
+ $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_EMAIL, $customerTransfer->getEmail());
+ $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_PASSWORD, $customerTransfer->getPassword());
+ $i->fillField(CustomerRegistrationPage::FORM_FIELD_SELECTOR_PASSWORD_CONFIRM, $customerTransfer->getPassword());
+ $i->checkOption(CustomerRegistrationPage::FORM_FIELD_SELECTOR_ACCEPT_TERMS);
+ }
+
+}
diff --git a/tests/_support/Module/Customer.php b/tests/PyzTest/Yves/Customer/_support/Helper/CustomerHelper.php
similarity index 85%
rename from tests/_support/Module/Customer.php
rename to tests/PyzTest/Yves/Customer/_support/Helper/CustomerHelper.php
index c2b8aad5c..7eaa9aaf9 100644
--- a/tests/_support/Module/Customer.php
+++ b/tests/PyzTest/Yves/Customer/_support/Helper/CustomerHelper.php
@@ -5,14 +5,12 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Module;
+namespace PyzTest\Yves\Customer\Helper;
-use Acceptance\Customer\Yves\PageObject\CustomerAddressesPage;
-use Acceptance\Customer\Yves\PageObject\Customer as PageObjectCustomer;
-use Acceptance\Customer\Yves\PageObject\CustomerLoginPage;
use Codeception\Module;
use Codeception\TestInterface;
use Codeception\Util\Stub;
+use Generated\Shared\DataBuilder\CustomerBuilder;
use Generated\Shared\Transfer\NewsletterSubscriberTransfer;
use Generated\Shared\Transfer\NewsletterSubscriptionRequestTransfer;
use Generated\Shared\Transfer\NewsletterTypeTransfer;
@@ -21,6 +19,8 @@
use Orm\Zed\Customer\Persistence\SpyCustomerAddress;
use Orm\Zed\Customer\Persistence\SpyCustomerQuery;
use Pyz\Shared\Newsletter\NewsletterConstants;
+use PyzTest\Yves\Customer\PageObject\Customer;
+use PyzTest\Yves\Customer\PageObject\CustomerLoginPage;
use Spryker\Client\Session\SessionClient;
use Spryker\Zed\Customer\CustomerDependencyProvider;
use Spryker\Zed\Customer\Dependency\Facade\CustomerToMailBridge;
@@ -30,7 +30,7 @@
use SprykerTest\Shared\Testify\Helper\LocatorHelperTrait;
use Symfony\Component\HttpFoundation\Session\Session;
-class Customer extends Module
+class CustomerHelper extends Module
{
use DependencyHelperTrait;
@@ -52,8 +52,8 @@ public function _before(TestInterface $step)
protected function cleanUpDatabase()
{
$customer = [
- PageObjectCustomer::NEW_CUSTOMER_EMAIL,
- PageObjectCustomer::REGISTERED_CUSTOMER_EMAIL,
+ Customer::NEW_CUSTOMER_EMAIL,
+ Customer::REGISTERED_CUSTOMER_EMAIL,
];
foreach ($customer as $customerEmail) {
@@ -122,24 +122,25 @@ public function loadCustomerByEmail($email)
}
/**
- * @param string $email
+ * @param array $seed
*
- * @return void
+ * @return \Generated\Shared\Transfer\CustomerTransfer
*/
- public function haveRegisteredCustomer($email)
+ public function haveRegisteredCustomer(array $seed = [])
{
- $customerEntity = $this->loadCustomerByEmail($email);
- if ($customerEntity) {
- return;
- }
-
$this->setupSession();
- $customerTransfer = PageObjectCustomer::getCustomerData($email);
+ $customerBuilder = new CustomerBuilder($seed);
+ $customerTransfer = $customerBuilder->build();
+ $password = $customerTransfer->getPassword();
$mailMock = new CustomerToMailBridge($this->getMailMock());
$this->setDependency(CustomerDependencyProvider::FACADE_MAIL, $mailMock);
$this->getFacade()->registerCustomer($customerTransfer);
+
+ $customerTransfer->setPassword($password);
+
+ return $customerTransfer;
}
/**
@@ -214,23 +215,24 @@ public function addNewsletterSubscription($email, $type = NewsletterConstants::E
}
/**
- * @param string $email
+ * @param array $seed
*
- * @return void
+ * @return \Generated\Shared\Transfer\CustomerTransfer
*/
- public function amLoggedInCustomer($email = PageObjectCustomer::NEW_CUSTOMER_EMAIL)
+ public function amLoggedInCustomer(array $seed = [])
{
- $this->haveRegisteredCustomer($email);
- $customerTransfer = PageObjectCustomer::getCustomerData($email);
+ $customerTransfer = $this->haveRegisteredCustomer($seed);
- $i = $this->getWebDriver();
- $i->amOnPage(CustomerLoginPage::URL);
- $i->submitForm(['name' => 'loginForm'], [
+ $tester = $this->getWebDriver();
+ $tester->amOnPage(CustomerLoginPage::URL);
+ $tester->submitForm(['name' => 'loginForm'], [
CustomerLoginPage::FORM_FIELD_SELECTOR_EMAIL => $customerTransfer->getEmail(),
CustomerLoginPage::FORM_FIELD_SELECTOR_PASSWORD => $customerTransfer->getPassword(),
]);
- $i->wait(2);
+ $tester->wait(2);
+
+ return $customerTransfer;
}
/**
diff --git a/tests/Acceptance/Customer/Yves/PageObject/Customer.php b/tests/PyzTest/Yves/Customer/_support/PageObject/Customer.php
similarity index 89%
rename from tests/Acceptance/Customer/Yves/PageObject/Customer.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/Customer.php
index f5e82daae..f904df222 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/Customer.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/Customer.php
@@ -2,10 +2,10 @@
/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
- * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
+ * Use of this software requires Presentation of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
use Generated\Shared\Transfer\CustomerTransfer;
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerAddressPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerAddressPage.php
similarity index 96%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerAddressPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerAddressPage.php
index 89ae107f6..d9df5ed0e 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerAddressPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerAddressPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerAddressPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerAddressesPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerAddressesPage.php
similarity index 97%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerAddressesPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerAddressesPage.php
index df87de6e8..fd9318872 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerAddressesPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerAddressesPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
use Generated\Shared\Transfer\AddressTransfer;
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerLoginPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerLoginPage.php
similarity index 93%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerLoginPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerLoginPage.php
index 9516f5583..3231b8e93 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerLoginPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerLoginPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerLoginPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerLogoutPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerLogoutPage.php
similarity index 83%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerLogoutPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerLogoutPage.php
index c9901f75d..4748f28f3 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerLogoutPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerLogoutPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerLogoutPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerNewsletterPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerNewsletterPage.php
similarity index 93%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerNewsletterPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerNewsletterPage.php
index 15ede6975..649a78e4c 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerNewsletterPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerNewsletterPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerNewsletterPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerOrdersPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerOrdersPage.php
similarity index 84%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerOrdersPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerOrdersPage.php
index ad8531f87..ab55e56fc 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerOrdersPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerOrdersPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerOrdersPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerOverviewPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerOverviewPage.php
similarity index 95%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerOverviewPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerOverviewPage.php
index f7a38e5c0..9c73956f8 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerOverviewPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerOverviewPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerOverviewPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerPasswordForgottenPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerPasswordForgottenPage.php
similarity index 90%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerPasswordForgottenPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerPasswordForgottenPage.php
index 8988a97c2..24709aadb 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerPasswordForgottenPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerPasswordForgottenPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerPasswordForgottenPage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerProfilePage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerProfilePage.php
similarity index 97%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerProfilePage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerProfilePage.php
index 2d6353a11..28e47f0ab 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerProfilePage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerProfilePage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerProfilePage extends Customer
{
diff --git a/tests/Acceptance/Customer/Yves/PageObject/CustomerRegistrationPage.php b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerRegistrationPage.php
similarity index 95%
rename from tests/Acceptance/Customer/Yves/PageObject/CustomerRegistrationPage.php
rename to tests/PyzTest/Yves/Customer/_support/PageObject/CustomerRegistrationPage.php
index b2d3a2498..75e9e13b0 100644
--- a/tests/Acceptance/Customer/Yves/PageObject/CustomerRegistrationPage.php
+++ b/tests/PyzTest/Yves/Customer/_support/PageObject/CustomerRegistrationPage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Customer\Yves\PageObject;
+namespace PyzTest\Yves\Customer\PageObject;
class CustomerRegistrationPage extends Customer
{
diff --git a/tests/PyzTest/Yves/Customer/codeception.yml b/tests/PyzTest/Yves/Customer/codeception.yml
new file mode 100644
index 000000000..61f2fb496
--- /dev/null
+++ b/tests/PyzTest/Yves/Customer/codeception.yml
@@ -0,0 +1,48 @@
+namespace: PyzTest\Yves\Customer
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Presentation:
+ path: Presentation
+ class_name: CustomerPresentationTester
+ modules:
+ enabled:
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Propel\Helper\ConnectionHelper
+ - \SprykerTest\Shared\Testify\Helper\LocatorHelper:
+ projectNamespaces: ['Pyz']
+ - \SprykerTest\Shared\Testify\Helper\DependencyHelper
+ - \PyzTest\Yves\Customer\Helper\CustomerHelper
+ - \SprykerTest\Shared\Config\Helper\ConfigInit
+ - \SprykerTest\Shared\Propel\Helper\PropelInstallHelper
+ - WebDriver:
+ url: ''
+ browser: chrome
+ window_size: 1920x1080
+ host: 0.0.0.0
+ restart: false
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
+ - \SprykerTest\Shared\Application\Helper\YvesHelper
+
+
+ Customer:
+ path: Customer
+ class_name: CustomerCustomerTester
+ modules:
+ enabled:
+ - Asserts
+ - \SprykerTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Testify\Helper\LocatorHelper:
+ projectNamespaces: ['Pyz']
+
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
diff --git a/tests/Acceptance/Newsletter/Yves/NewsletterSubscriptionCest.php b/tests/PyzTest/Yves/Newsletter/Presentation/NewsletterSubscriptionCest.php
similarity index 59%
rename from tests/Acceptance/Newsletter/Yves/NewsletterSubscriptionCest.php
rename to tests/PyzTest/Yves/Newsletter/Presentation/NewsletterSubscriptionCest.php
index afea5985c..717bb5b68 100644
--- a/tests/Acceptance/Newsletter/Yves/NewsletterSubscriptionCest.php
+++ b/tests/PyzTest/Yves/Newsletter/Presentation/NewsletterSubscriptionCest.php
@@ -2,102 +2,113 @@
/**
* Copyright © 2017-present Spryker Systems GmbH. All rights reserved.
- * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
+ * Use of this software requires Presentation of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Newsletter\Yves;
+namespace PyzTest\Yves\Newsletter\Presentation;
-use Acceptance\Customer\Yves\PageObject\Customer;
-use Acceptance\Customer\Yves\PageObject\CustomerNewsletterPage;
-use Acceptance\Customer\Yves\PageObject\CustomerOverviewPage;
-use Acceptance\Homepage\Yves\PageObject\Homepage;
-use Acceptance\Newsletter\Yves\PageObject\NewsletterSubscriptionHomePage;
-use Acceptance\Newsletter\Yves\Tester\NewsletterSubscriptionTester;
+use Generated\Shared\DataBuilder\CustomerBuilder;
+use PyzTest\Yves\Application\PageObject\Homepage;
+use PyzTest\Yves\Customer\PageObject\CustomerNewsletterPage;
+use PyzTest\Yves\Customer\PageObject\CustomerOverviewPage;
+use PyzTest\Yves\Newsletter\NewsletterPresentationTester;
+use PyzTest\Yves\Newsletter\PageObject\NewsletterSubscriptionHomePage;
/**
- * @group Acceptance
- * @group Newsletter
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Yves
+ * @group Newsletter
+ * @group Presentation
* @group NewsletterSubscriptionCest
+ * Add your own group annotations below this line
*/
class NewsletterSubscriptionCest
{
/**
- * @param \Acceptance\Newsletter\Yves\Tester\NewsletterSubscriptionTester $i
+ * @param \PyzTest\Yves\Newsletter\NewsletterPresentationTester $i
*
* @return void
*/
- public function iCanSubscribeWithAnUnsubscribedEmail(NewsletterSubscriptionTester $i)
+ public function iCanSubscribeWithAnUnsubscribedEmail(NewsletterPresentationTester $i)
{
$i->wantTo('Subscribe to the newsletter with an unsubscribed new email.');
$i->expect('Success message is displayed.');
$i->amOnPage(Homepage::URL);
- $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, NewsletterSubscriptionHomePage::NEW_EMAIL);
+ $customerTransfer = $this->buildCustomerTransfer();
+
+ $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, $customerTransfer->getEmail());
$i->click(NewsletterSubscriptionHomePage::FORM_SUBMIT);
$i->see(NewsletterSubscriptionHomePage::SUCCESS_MESSAGE);
}
/**
- * @param \Acceptance\Newsletter\Yves\Tester\NewsletterSubscriptionTester $i
+ * @param \PyzTest\Yves\Newsletter\NewsletterPresentationTester $i
*
* @return void
*/
- public function iCanNotSubscribeWithAnAlreadySubscribedEmail(NewsletterSubscriptionTester $i)
+ public function iCanNotSubscribeWithAnAlreadySubscribedEmail(NewsletterPresentationTester $i)
{
$i->wantTo('Subscribe to the newsletter with an already subscribed email.');
$i->expect('Error message is displayed.');
$i->amOnPage(Homepage::URL);
- $i->haveAnAlreadySubscribedEmail(NewsletterSubscriptionHomePage::EXISTING_EMAIL);
+ $customerTransfer = $this->buildCustomerTransfer();
- $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, NewsletterSubscriptionHomePage::EXISTING_EMAIL);
+ $i->haveAnAlreadySubscribedEmail($customerTransfer->getEmail());
+
+ $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, $customerTransfer->getEmail());
$i->click(NewsletterSubscriptionHomePage::FORM_SUBMIT);
$i->see(NewsletterSubscriptionHomePage::ERROR_MESSAGE);
}
/**
- * @param \Acceptance\Newsletter\Yves\Tester\NewsletterSubscriptionTester $i
+ * @param \PyzTest\Yves\Newsletter\NewsletterPresentationTester $i
*
* @return void
*/
- public function subscribedEmailIsLinkedWithCustomerAfterRegistration(NewsletterSubscriptionTester $i)
+ public function subscribedEmailIsLinkedWithCustomerAfterRegistration(NewsletterPresentationTester $i)
{
$i->wantTo('Subscribe to the newsletter with an unsubscribed email and later on register with that address.');
$i->expect('Subscriber email should be linked with registered customer.');
$i->amOnPage(Homepage::URL);
- $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, Customer::NEW_CUSTOMER_EMAIL);
+ $customerTransfer = $this->buildCustomerTransfer();
+
+ $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, $customerTransfer->getEmail());
$i->click(NewsletterSubscriptionHomePage::FORM_SUBMIT);
- $i->amLoggedInCustomer(Customer::NEW_CUSTOMER_EMAIL);
+ $i->amLoggedInCustomer($customerTransfer->toArray());
$i->amOnPage(CustomerOverviewPage::URL);
$i->see(CustomerOverviewPage::NEWSLETTER_SUBSCRIBED);
}
/**
- * @param \Acceptance\Newsletter\Yves\Tester\NewsletterSubscriptionTester $i
+ * @param \PyzTest\Yves\Newsletter\NewsletterPresentationTester $i
*
* @return void
*/
- public function subscribedEmailCanBeUnsubscribedByCustomerAfterRegistration(NewsletterSubscriptionTester $i)
+ public function subscribedEmailCanBeUnsubscribedByCustomerAfterRegistration(NewsletterPresentationTester $i)
{
$i->wantTo('Subscribe to the newsletter with an unsubscribed email should be able to unsubscribe after registration.');
$i->expect('Subscribed email should be unsubscribed after customer unsubscribe.');
$i->amOnPage(Homepage::URL);
- $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, Customer::NEW_CUSTOMER_EMAIL);
+ $customerTransfer = $this->buildCustomerTransfer();
+
+ $i->fillField(NewsletterSubscriptionHomePage::FORM_SELECTOR, $customerTransfer->getEmail());
$i->click(NewsletterSubscriptionHomePage::FORM_SUBMIT);
- $i->amLoggedInCustomer(Customer::NEW_CUSTOMER_EMAIL);
+ $i->amLoggedInCustomer($customerTransfer->toArray());
$i->amOnPage(CustomerOverviewPage::URL);
$i->see(CustomerOverviewPage::NEWSLETTER_SUBSCRIBED);
@@ -111,4 +122,14 @@ public function subscribedEmailCanBeUnsubscribedByCustomerAfterRegistration(News
$i->dontSeeCheckboxIsChecked(['name' => CustomerNewsletterPage::FORM_FIELD_SELECTOR_NEWSLETTER_SUBSCRIPTION]);
}
+ /**
+ * @return \Generated\Shared\Transfer\CustomerTransfer|\Spryker\Shared\Kernel\Transfer\AbstractTransfer
+ */
+ protected function buildCustomerTransfer()
+ {
+ $customerTransfer = (new CustomerBuilder())->build();
+
+ return $customerTransfer;
+ }
+
}
diff --git a/tests/Acceptance/Newsletter/Yves/Tester/NewsletterSubscriptionTester.php b/tests/PyzTest/Yves/Newsletter/_support/NewsletterPresentationTester.php
similarity index 51%
rename from tests/Acceptance/Newsletter/Yves/Tester/NewsletterSubscriptionTester.php
rename to tests/PyzTest/Yves/Newsletter/_support/NewsletterPresentationTester.php
index 98a27b187..8e72a8d06 100644
--- a/tests/Acceptance/Newsletter/Yves/Tester/NewsletterSubscriptionTester.php
+++ b/tests/PyzTest/Yves/Newsletter/_support/NewsletterPresentationTester.php
@@ -1,19 +1,42 @@
amYves();
+ }
+
/**
* @param string $email
*
diff --git a/tests/Acceptance/Newsletter/Yves/PageObject/NewsletterSubscriptionHomePage.php b/tests/PyzTest/Yves/Newsletter/_support/PageObject/NewsletterSubscriptionHomePage.php
similarity index 76%
rename from tests/Acceptance/Newsletter/Yves/PageObject/NewsletterSubscriptionHomePage.php
rename to tests/PyzTest/Yves/Newsletter/_support/PageObject/NewsletterSubscriptionHomePage.php
index 0277af205..7420c725d 100644
--- a/tests/Acceptance/Newsletter/Yves/PageObject/NewsletterSubscriptionHomePage.php
+++ b/tests/PyzTest/Yves/Newsletter/_support/PageObject/NewsletterSubscriptionHomePage.php
@@ -2,10 +2,10 @@
/**
* Copyright © 2017-present Spryker Systems GmbH. All rights reserved.
- * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
+ * Use of this software requires Presentation of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Newsletter\Yves\PageObject;
+namespace PyzTest\Yves\Newsletter\PageObject;
class NewsletterSubscriptionHomePage
{
diff --git a/tests/PyzTest/Yves/Newsletter/codeception.yml b/tests/PyzTest/Yves/Newsletter/codeception.yml
new file mode 100644
index 000000000..d247407fa
--- /dev/null
+++ b/tests/PyzTest/Yves/Newsletter/codeception.yml
@@ -0,0 +1,33 @@
+namespace: PyzTest\Yves\Newsletter
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Presentation:
+ path: Presentation
+ class_name: NewsletterPresentationTester
+ modules:
+ enabled:
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Config\Helper\ConfigInit
+ - \SprykerTest\Shared\Testify\Helper\LocatorHelper
+ - \SprykerTest\Shared\Propel\Helper\ConnectionHelper
+ - \SprykerTest\Shared\Application\Helper\YvesHelper
+ - \PyzTest\Yves\Customer\Helper\CustomerHelper
+ - WebDriver:
+ url: ''
+ browser: chrome
+ window_size: 1920x1080
+ host: 0.0.0.0
+ restart: false
+ - \SprykerTest\Shared\Testify\Helper\DependencyHelper
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
diff --git a/tests/Acceptance/Product/PageObject/ProductDetailPage.php b/tests/PyzTest/Yves/Product/_support/PageObject/ProductDetailPage.php
similarity index 58%
rename from tests/Acceptance/Product/PageObject/ProductDetailPage.php
rename to tests/PyzTest/Yves/Product/_support/PageObject/ProductDetailPage.php
index d14c558b7..cf80bf1f6 100644
--- a/tests/Acceptance/Product/PageObject/ProductDetailPage.php
+++ b/tests/PyzTest/Yves/Product/_support/PageObject/ProductDetailPage.php
@@ -2,10 +2,10 @@
/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
- * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
+ * Use of this software requires Presentation of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Product\PageObject;
+namespace PyzTest\Yves\Product\PageObject;
class ProductDetailPage
{
diff --git a/tests/PyzTest/Zed/Availability/_support/PageObject/AvailabilityViewPage.php b/tests/PyzTest/Zed/Availability/_support/PageObject/AvailabilityViewPage.php
new file mode 100644
index 000000000..5eef2db07
--- /dev/null
+++ b/tests/PyzTest/Zed/Availability/_support/PageObject/AvailabilityViewPage.php
@@ -0,0 +1,10 @@
+wantTo('Create cms page with multiple translations');
+ $i->expect('Page is persisted in Zed, exported to Yves and is accesible.');
+
+ $i->amLoggedInUser();
+ $i->amOnPage(CmsCreatePage::URL);
+ $i->selectOption('//*[@id="cms_page_fkTemplate"]', 'static full page');
+
+ $i->setValidFrom('1985-07-01');
+ $i->setValidTo('2050-07-01');
+ $i->fillLocalizedUrlForm(0, CmsCreatePage::getLocalizedName('en'), CmsCreatePage::getLocalizedUrl('en'));
+ $i->expandLocalizedUrlPane();
+ $i->fillLocalizedUrlForm(1, CmsCreatePage::getLocalizedName('de'), CmsCreatePage::getLocalizedUrl('de'));
+ $i->clickSubmit();
+
+ $i->see(CmsCreatePage::PAGE_CREATED_SUCCESS_MESSAGE);
+
+ $i->includeJquery();
+
+ $i->fillPlaceholderContents(0, 0, CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'en'));
+ $i->fillPlaceholderContents(0, 1, CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'de'));
+
+ $i->fillPlaceholderContents(1, 0, CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'en'));
+ $i->fillPlaceholderContents(1, 1, CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'de'));
+
+ $i->clickSubmit();
+
+ $idCmsPage = $i->grabCmsPageId();
+
+ $i->amOnPage(sprintf(CmsEditPage::URL, $idCmsPage));
+
+ $i->clickPublishButton();
+
+ $i->see(CmsEditPage::PAGE_PUBLISH_SUCCESS_MESSAGE);
+
+ $i->runCollectors();
+
+ // TODO re-enable
+// $yvesTester = $i->haveFriend('yvesTester', YvesAcceptanceTester::class);
+//
+// $yvesTester->does(function (YvesAcceptanceTester $i) {
+//
+// $i->amOnPage(CmsCreatePage::getLocalizedUrl('de'));
+//
+// $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'de'));
+// $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'de'));
+//
+// $i->amOnPage(CmsCreatePage::getLocalizedUrl('en'));
+//
+// $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('title', 'en'));
+// $i->see(CmsCreateGlossaryPage::getLocalizedPlaceholderData('contents', 'en'));
+//
+// });
+ }
+
+}
diff --git a/tests/Acceptance/CmsGui/CmsGuiPageListCest.php b/tests/PyzTest/Zed/CmsGui/Presentation/CmsGuiPageListCest.php
similarity index 53%
rename from tests/Acceptance/CmsGui/CmsGuiPageListCest.php
rename to tests/PyzTest/Zed/CmsGui/Presentation/CmsGuiPageListCest.php
index aa60e2df1..0fce83614 100644
--- a/tests/Acceptance/CmsGui/CmsGuiPageListCest.php
+++ b/tests/PyzTest/Zed/CmsGui/Presentation/CmsGuiPageListCest.php
@@ -4,25 +4,31 @@
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\CmsGui;
+namespace PyzTest\Zed\CmsGui\Presentation;
-use Acceptance\CmsGui\PageObject\CmsListPage;
-use Acceptance\CmsGui\Tester\CmsPageListTester;
+;
+
+use PyzTest\Zed\CmsGui\CmsGuiPresentationTester;
+use PyzTest\Zed\CmsGui\PageObject\CmsListPage;
/**
- * @group Acceptance
+ * Auto-generated group annotations
+ * @group PyzTest
+ * @group Zed
* @group CmsGui
+ * @group Presentation
* @group CmsGuiPageListCest
+ * Add your own group annotations below this line
*/
class CmsGuiPageListCest
{
/**
- * @param \Acceptance\CmsGui\Tester\CmsPageListTester $i
+ * @param \PyzTest\Zed\CmsGui\CmsGuiPresentationTester $i
*
* @return void
*/
- public function testICanOpenCmsPageList(CmsPageListTester $i)
+ public function testICanOpenCmsPageList(CmsGuiPresentationTester $i)
{
$i->amLoggedInUser();
$i->amOnPage(CmsListPage::URL);
diff --git a/tests/PyzTest/Zed/CmsGui/_support/CmsGuiPresentationTester.php b/tests/PyzTest/Zed/CmsGui/_support/CmsGuiPresentationTester.php
new file mode 100644
index 000000000..849c7ae37
--- /dev/null
+++ b/tests/PyzTest/Zed/CmsGui/_support/CmsGuiPresentationTester.php
@@ -0,0 +1,147 @@
+amZed();
+ $this->amLoggedInUser();
+ }
+
+ /**
+ * @param string $date
+ *
+ * @return $this
+ */
+ public function setValidFrom($date)
+ {
+ $this->fillField("//*[@id=\"cms_page_validFrom\"]", $date);
+
+ return $this;
+ }
+
+ /**
+ * @param string $date
+ *
+ * @return $this
+ */
+ public function setValidTo($date)
+ {
+ $this->fillField("//*[@id=\"cms_page_validTo\"]", $date);
+
+ return $this;
+ }
+
+ /**
+ * @param int $formIndex
+ * @param string $name
+ * @param string $url
+ *
+ * @return $this
+ */
+ public function fillLocalizedUrlForm($formIndex, $name, $url)
+ {
+ $this->fillField('//*[@id="cms_page_pageAttributes_' . $formIndex . '_name"]', $name);
+ $this->fillField('//*[@id="cms_page_pageAttributes_' . $formIndex . '_url"]', $url);
+
+ return $this;
+ }
+
+ /**
+ * @param int $placeHolderIndex
+ * @param int $localeIndex
+ * @param string $contents
+ *
+ * @return void
+ */
+ public function fillPlaceholderContents($placeHolderIndex, $localeIndex, $contents)
+ {
+ $translationElementId = 'cms_glossary_glossaryAttributes_' . $placeHolderIndex . '_translations_' . $localeIndex . '_translation';
+
+ $this->executeJS("$('#$translationElementId').text('$contents');");
+ }
+
+ /**
+ * @return $this
+ */
+ public function expandLocalizedUrlPane()
+ {
+ $this->click('//*[@id="tab-content-general"]/div/div[5]/div[1]/a');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function clickSubmit()
+ {
+ $this->click('//*[@id="submit-cms"]');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function clickPublishButton()
+ {
+ $this->click('//*[@id="page-wrapper"]/div[2]/div[2]/div/a[1]');
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function includeJquery()
+ {
+ $this->executeJS(
+ '
+ var jq = document.createElement("script");
+ jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
+ document.getElementsByTagName("head")[0].appendChild(jq);
+ '
+ );
+
+ $this->wait(1);
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function grabCmsPageId()
+ {
+ return $this->grabFromCurrentUrl('/id-cms-page=(\d+)/');
+ }
+
+}
diff --git a/tests/Acceptance/CmsGui/PageObject/CmsCreateGlossaryPage.php b/tests/PyzTest/Zed/CmsGui/_support/PageObject/CmsCreateGlossaryPage.php
similarity index 75%
rename from tests/Acceptance/CmsGui/PageObject/CmsCreateGlossaryPage.php
rename to tests/PyzTest/Zed/CmsGui/_support/PageObject/CmsCreateGlossaryPage.php
index 5992e30b6..56611037b 100644
--- a/tests/Acceptance/CmsGui/PageObject/CmsCreateGlossaryPage.php
+++ b/tests/PyzTest/Zed/CmsGui/_support/PageObject/CmsCreateGlossaryPage.php
@@ -1,10 +1,6 @@
wantTo('See that console is running');
diff --git a/tests/PyzTest/Zed/Console/Console/GenerateBundleCest.php b/tests/PyzTest/Zed/Console/Console/GenerateBundleCest.php
new file mode 100644
index 000000000..17f23d90f
--- /dev/null
+++ b/tests/PyzTest/Zed/Console/Console/GenerateBundleCest.php
@@ -0,0 +1,36 @@
+runSprykerCommand('code:generate:module:zed Acme -vvv');
+ $i->seeInShellOutput('Generated: Pyz/Zed/Acme/AcmeConfig.php');
+ $i->seeInShellOutput('Generated: ZedBundleCodeGenerator');
+ $bundleDir = codecept_data_dir() . ConsoleHelper::SANDBOX_DIR . 'src/Pyz/Zed/Acme';
+ $i->seeFileFound('AcmeConfig.php', $bundleDir);
+ $i->seeFileFound('AcmeDependencyProvider.php', $bundleDir);
+ $i->seeFileFound('AcmeFacade.php', $bundleDir . '/Business');
+ }
+
+}
diff --git a/tests/PyzTest/Zed/Console/Console/GenerateDataBuildersCest.php b/tests/PyzTest/Zed/Console/Console/GenerateDataBuildersCest.php
new file mode 100644
index 000000000..27c25d229
--- /dev/null
+++ b/tests/PyzTest/Zed/Console/Console/GenerateDataBuildersCest.php
@@ -0,0 +1,31 @@
+runSprykerCommand('transfer:databuilder:generate -vvv');
+ $i->seeInShellOutput('CustomerBuilder.php was generated');
+ $i->seeFileFound(codecept_data_dir() . 'cli_sandbox/src/Generated/Shared/DataBuilder/CustomerBuilder.php');
+ }
+
+}
diff --git a/tests/_data/cli_sandbox/config/Shared/config_default-development.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default-development.php
similarity index 82%
rename from tests/_data/cli_sandbox/config/Shared/config_default-development.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default-development.php
index 52464682c..b669a0705 100644
--- a/tests/_data/cli_sandbox/config/Shared/config_default-development.php
+++ b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default-development.php
@@ -12,7 +12,6 @@
use Spryker\Shared\Kernel\KernelConstants;
use Spryker\Shared\Kernel\Store;
use Spryker\Shared\Log\LogConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\Session\SessionConstants;
use Spryker\Shared\Setup\SetupConstants;
@@ -46,19 +45,6 @@
$config[SetupConstants::JENKINS_DIRECTORY] = '/data/shop/development/shared/data/common/jenkins';
$config[ZedRequestConstants::TRANSFER_DEBUG_SESSION_FORWARD_ENABLED] = true;
-$config[PayoneConstants::PAYONE] = [
- PayoneConstants::PAYONE_CREDENTIALS_ENCODING => 'UTF-8',
- PayoneConstants::PAYONE_CREDENTIALS_KEY => '',
- PayoneConstants::PAYONE_CREDENTIALS_MID => '',
- PayoneConstants::PAYONE_CREDENTIALS_AID => '',
- PayoneConstants::PAYONE_CREDENTIALS_PORTAL_ID => '',
- PayoneConstants::PAYONE_PAYMENT_GATEWAY_URL => 'https://api.pay1.de/post-gateway/',
- PayoneConstants::PAYONE_REDIRECT_SUCCESS_URL => $config[ApplicationConstants::HOST_YVES] . '/checkout/success/',
- PayoneConstants::PAYONE_REDIRECT_ERROR_URL => $config[ApplicationConstants::HOST_YVES] . '/checkout/index/',
- PayoneConstants::PAYONE_REDIRECT_BACK_URL => $config[ApplicationConstants::HOST_YVES] . '/checkout/regular-redirect-payment-cancellation/',
- PayoneConstants::PAYONE_MODE => '',
-];
-
$config[TwigConstants::ZED_TWIG_OPTIONS] = [
'cache' => APPLICATION_ROOT_DIR . '/data/' . Store::getInstance()->getStoreName() . '/cache/Yves/twig',
];
diff --git a/tests/_data/cli_sandbox/config/Shared/config_default-development_DE.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default-development_DE.php
similarity index 97%
rename from tests/_data/cli_sandbox/config/Shared/config_default-development_DE.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default-development_DE.php
index 95e2dc998..4db4795be 100644
--- a/tests/_data/cli_sandbox/config/Shared/config_default-development_DE.php
+++ b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default-development_DE.php
@@ -7,7 +7,6 @@
use Spryker\Shared\EventJournal\EventJournalConstants;
use Spryker\Shared\Mail\MailConstants;
use Spryker\Shared\Payolution\PayolutionConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\PropelQueryBuilder\PropelQueryBuilderConstants;
@@ -30,7 +29,6 @@
$yvesHost = 'www.de.project.local';
$config[ApplicationConstants::HOST_YVES]
= $config[ProductManagementConstants::HOST_YVES]
- = $config[PayoneConstants::HOST_YVES]
= $config[PayolutionConstants::HOST_YVES]
= $config[NewsletterConstants::HOST_YVES]
= $config[CustomerConstants::HOST_YVES] = 'http://' . $yvesHost;
diff --git a/tests/_data/cli_sandbox/config/Shared/config_default.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default.php
similarity index 99%
rename from tests/_data/cli_sandbox/config/Shared/config_default.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default.php
index 5cc39ad21..8a267f870 100644
--- a/tests/_data/cli_sandbox/config/Shared/config_default.php
+++ b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_default.php
@@ -17,7 +17,6 @@
use Spryker\Shared\NewRelic\NewRelicConstants;
use Spryker\Shared\Oms\OmsConstants;
use Spryker\Shared\Payolution\PayolutionConstants;
-use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Price\PriceConstants;
use Spryker\Shared\PriceCartConnector\PriceCartConnectorConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
@@ -103,7 +102,6 @@
*/
$config[ApplicationConstants::HOST_YVES]
= $config[ProductManagementConstants::HOST_YVES]
- = $config[PayoneConstants::HOST_YVES]
= $config[PayolutionConstants::HOST_YVES]
= $config[NewsletterConstants::HOST_YVES]
= $config[CustomerConstants::HOST_YVES]
diff --git a/tests/_data/cli_sandbox/config/Shared/config_local.dist.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_local.dist.php
similarity index 100%
rename from tests/_data/cli_sandbox/config/Shared/config_local.dist.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_local.dist.php
diff --git a/tests/_data/cli_sandbox/config/Shared/config_propel.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_propel.php
similarity index 100%
rename from tests/_data/cli_sandbox/config/Shared/config_propel.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/config_propel.php
diff --git a/tests/_data/cli_sandbox/config/Shared/console_env_local.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/console_env_local.php
similarity index 100%
rename from tests/_data/cli_sandbox/config/Shared/console_env_local.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/console_env_local.php
diff --git a/tests/_data/cli_sandbox/config/Shared/default_store.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/default_store.php
similarity index 100%
rename from tests/_data/cli_sandbox/config/Shared/default_store.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/default_store.php
diff --git a/tests/_data/cli_sandbox/config/Shared/stores.php b/tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/stores.php
similarity index 100%
rename from tests/_data/cli_sandbox/config/Shared/stores.php
rename to tests/PyzTest/Zed/Console/_data/cli_sandbox/config/Shared/stores.php
diff --git a/tests/_data/console_runner.php b/tests/PyzTest/Zed/Console/_data/console_runner.php
similarity index 75%
rename from tests/_data/console_runner.php
rename to tests/PyzTest/Zed/Console/_data/console_runner.php
index b83078813..caa609e39 100644
--- a/tests/_data/console_runner.php
+++ b/tests/PyzTest/Zed/Console/_data/console_runner.php
@@ -1,9 +1,9 @@
run();
+ $output = $process->getOutput();
+
+ return $output;
+ }
}
diff --git a/tests/_support/Helper/Console.php b/tests/PyzTest/Zed/Console/_support/Helper/ConsoleHelper.php
similarity index 93%
rename from tests/_support/Helper/Console.php
rename to tests/PyzTest/Zed/Console/_support/Helper/ConsoleHelper.php
index af3211b09..767d6affe 100644
--- a/tests/_support/Helper/Console.php
+++ b/tests/PyzTest/Zed/Console/_support/Helper/ConsoleHelper.php
@@ -1,12 +1,12 @@
amLoggedInUser();
$i->amOnPage(NavigationCreatePage::URL);
@@ -44,11 +48,11 @@ public function testICanCreateReadUpdateAndDeleteNavigation(NavigationCRUDTester
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationCRUDTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return int
*/
- protected function create(NavigationCRUDTester $i)
+ protected function create(NavigationGuiPresentationTester $i)
{
$i->wantTo('Create navigation.');
$i->expect('Navigation is persisted in Zed.');
@@ -64,11 +68,11 @@ protected function create(NavigationCRUDTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationCRUDTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- protected function read(NavigationCRUDTester $i)
+ protected function read(NavigationGuiPresentationTester $i)
{
$i->wantTo('See navigation list.');
$i->expect('Navigation table is shown and not empty');
@@ -77,12 +81,12 @@ protected function read(NavigationCRUDTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationCRUDTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
* @param int $idNavigation
*
* @return void
*/
- protected function update(NavigationCRUDTester $i, $idNavigation)
+ protected function update(NavigationGuiPresentationTester $i, $idNavigation)
{
$i->wantTo('Update existing navigation.');
$i->expect('Navigation is persisted in Zed');
@@ -96,11 +100,11 @@ protected function update(NavigationCRUDTester $i, $idNavigation)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationCRUDTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- protected function activate(NavigationCRUDTester $i)
+ protected function activate(NavigationGuiPresentationTester $i)
{
$i->wantTo('Activate navigation.');
$i->expect('New navigation status persisted in Zed.');
@@ -113,11 +117,11 @@ protected function activate(NavigationCRUDTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationCRUDTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- protected function delete(NavigationCRUDTester $i)
+ protected function delete(NavigationGuiPresentationTester $i)
{
$i->wantTo('Delete navigation.');
$i->expect('Navigation is removed from Zed.');
diff --git a/tests/Acceptance/NavigationGui/NavigationTreeCest.php b/tests/PyzTest/Zed/NavigationGui/Presentation/NavigationTreeCest.php
similarity index 89%
rename from tests/Acceptance/NavigationGui/NavigationTreeCest.php
rename to tests/PyzTest/Zed/NavigationGui/Presentation/NavigationTreeCest.php
index fb5893185..cb8074171 100644
--- a/tests/Acceptance/NavigationGui/NavigationTreeCest.php
+++ b/tests/PyzTest/Zed/NavigationGui/Presentation/NavigationTreeCest.php
@@ -5,32 +5,36 @@
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\NavigationGui;
+namespace PyzTest\Zed\NavigationGui\Presentation;
-use Acceptance\NavigationGui\PageObject\NavigationNodeCreatePage;
-use Acceptance\NavigationGui\PageObject\NavigationNodeUpdatePage;
-use Acceptance\NavigationGui\PageObject\NavigationPage;
-use Acceptance\NavigationGui\Tester\NavigationTreeTester;
use Generated\Shared\Transfer\NavigationNodeLocalizedAttributesTransfer;
use Generated\Shared\Transfer\NavigationNodeTransfer;
use Generated\Shared\Transfer\NavigationTransfer;
use Generated\Shared\Transfer\NavigationTreeNodeTransfer;
use Generated\Shared\Transfer\NavigationTreeTransfer;
+use PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester;
+use PyzTest\Zed\NavigationGui\PageObject\NavigationNodeCreatePage;
+use PyzTest\Zed\NavigationGui\PageObject\NavigationNodeUpdatePage;
+use PyzTest\Zed\NavigationGui\PageObject\NavigationPage;
/**
- * @group Acceptance
+ * Auto-generated group annotations
+ * @group PyzTest
+ * @group Zed
* @group NavigationGui
+ * @group Presentation
* @group NavigationTreeCest
+ * Add your own group annotations below this line
*/
class NavigationTreeCest
{
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testSeeEmptyNavigationTree(NavigationTreeTester $i)
+ public function testSeeEmptyNavigationTree(NavigationGuiPresentationTester $i)
{
$i->wantTo('See navigation tree.');
$i->expect('Empty navigation tree displayed.');
@@ -48,11 +52,11 @@ public function testSeeEmptyNavigationTree(NavigationTreeTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testCreateChildNodeWithoutType(NavigationTreeTester $i)
+ public function testCreateChildNodeWithoutType(NavigationGuiPresentationTester $i)
{
$i->wantTo('Create child node without type.');
$i->expect('Navigation should have a root node persisted.');
@@ -77,11 +81,11 @@ public function testCreateChildNodeWithoutType(NavigationTreeTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testCreateChildNodeWithExternalUrlType(NavigationTreeTester $i)
+ public function testCreateChildNodeWithExternalUrlType(NavigationGuiPresentationTester $i)
{
$i->wantTo('Create external URL child node.');
$i->expect('Navigation should have a root node persisted.');
@@ -111,11 +115,11 @@ public function testCreateChildNodeWithExternalUrlType(NavigationTreeTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testUpdateNodeToCategoryType(NavigationTreeTester $i)
+ public function testUpdateNodeToCategoryType(NavigationGuiPresentationTester $i)
{
$i->wantTo('Update child node to category type.');
$i->expect('Node changes should persist in Zed.');
@@ -150,11 +154,11 @@ public function testUpdateNodeToCategoryType(NavigationTreeTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testCreateChildNodeWithCmsPageType(NavigationTreeTester $i)
+ public function testCreateChildNodeWithCmsPageType(NavigationGuiPresentationTester $i)
{
$i->wantTo('Create CMS page child node.');
$i->expect('Navigation should have a new child node persisted.');
@@ -191,11 +195,11 @@ public function testCreateChildNodeWithCmsPageType(NavigationTreeTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testChangeNavigationTreeStructure(NavigationTreeTester $i)
+ public function testChangeNavigationTreeStructure(NavigationGuiPresentationTester $i)
{
$i->wantTo('Change tree structure and save.');
$i->expect('Updated navigation tree structure should have persisted.');
@@ -248,11 +252,11 @@ public function testChangeNavigationTreeStructure(NavigationTreeTester $i)
}
/**
- * @param \Acceptance\NavigationGui\Tester\NavigationTreeTester $i
+ * @param \PyzTest\Zed\NavigationGui\NavigationGuiPresentationTester $i
*
* @return void
*/
- public function testDeleteNavigationNode(NavigationTreeTester $i)
+ public function testDeleteNavigationNode(NavigationGuiPresentationTester $i)
{
/**
* Test skipped because popup confirmation is not working as expected under phantomjs.
diff --git a/tests/PyzTest/Zed/NavigationGui/_support/NavigationGuiPresentationTester.php b/tests/PyzTest/Zed/NavigationGui/_support/NavigationGuiPresentationTester.php
new file mode 100644
index 000000000..9413071d3
--- /dev/null
+++ b/tests/PyzTest/Zed/NavigationGui/_support/NavigationGuiPresentationTester.php
@@ -0,0 +1,683 @@
+amZed();
+ $this->amLoggedInUser();
+ }
+
+ /**
+ * @param string $value
+ *
+ * @return void
+ */
+ public function setNameField($value)
+ {
+ $this->fillField('//*[@id="navigation_name"]', $value);
+ }
+
+ /**
+ * @param string $value
+ *
+ * @return void
+ */
+ public function setKeyField($value)
+ {
+ $this->fillField('//*[@id="navigation_key"]', $value);
+ }
+
+ /**
+ * @param bool $checked
+ *
+ * @return void
+ */
+ public function checkIsActiveField($checked)
+ {
+ if ($checked) {
+ $this->checkOption('//*[@id="navigation_is_active"]');
+ } else {
+ $this->uncheckOption('//*[@id="navigation_is_active"]');
+ }
+ }
+
+ /**
+ * @return void
+ */
+ public function submitNavigationForm()
+ {
+ $this->click('//*[@id="navigation-save-btn"]');
+ }
+
+ /**
+ * @param string $pattern
+ * @param string $value
+ *
+ * @return void
+ */
+ public function seeMatches($pattern, $value)
+ {
+ $this->assertRegExp($pattern, $value);
+ }
+
+ /**
+ * @return void
+ */
+ public function clickEditFirstRowInList()
+ {
+ $this->click('//*[@id="navigation-table"]/tbody/tr[1]/td[5]/a');
+ }
+
+ /**
+ * @param string $expectedMessagePattern
+ *
+ * @return int
+ */
+ public function seeSuccessMessage($expectedMessagePattern)
+ {
+ $successMessage = $this->grabTextFrom('//div[@class="flash-messages"]/div');
+ $this->seeMatches($expectedMessagePattern, $successMessage);
+
+ preg_match($expectedMessagePattern, $successMessage, $matches);
+
+ return $matches[1];
+ }
+
+ /**
+ * @return void
+ */
+ public function activateFirstNavigationRow()
+ {
+ $this->click('//*[@id="navigation-table"]/tbody/tr[1]/td[5]/a[2]');
+ }
+
+ /**
+ * @return void
+ */
+ public function deleteFirstNavigationRow()
+ {
+ $this->submitForm('//*[@id="navigation-table"]/tbody/tr/td[5]/form[1]', []);
+ }
+
+ /**
+ * @return void
+ */
+ public function testSeeEmptyNavigationTree()
+ {
+ $i = $this;
+ $i->wantTo('See navigation tree.');
+ $i->expect('Empty navigation tree displayed.');
+
+ $i->amLoggedInUser();
+ $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+ ->setNavigation((new NavigationTransfer())
+ ->setName('Create child node without type test')
+ ->setKey('Create child node without type test')
+ ->setIsActive(true)));
+ $i->amOnPage(NavigationPage::URL);
+
+ $i->waitForNavigationTree();
+ $i->seeNumberOfNavigationNodes(1);
+ }
+
+ /**
+ * @return void
+ */
+ public function testCreateChildNodeWithoutType()
+ {
+ $i = $this;
+ $i->wantTo('Create child node without type.');
+ $i->expect('Navigation should have a root node persisted.');
+
+ $i->amLoggedInUser();
+ $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+ ->setNavigation((new NavigationTransfer())
+ ->setName('Create child node without type test')
+ ->setKey('Create child node without type test')
+ ->setIsActive(true)));
+ $i->amOnPage(NavigationPage::URL);
+
+ $i->waitForNavigationTree();
+ $i->switchToNodeForm();
+ $i->see('Create child node');
+ $i->submitCreateNodeFormWithoutType('Child 1');
+
+ $i->seeSuccessMessage(NavigationNodeCreatePage::MESSAGE_SUCCESS);
+
+ $i->switchToNavigationTree();
+ $i->seeNumberOfNavigationNodes(2);
+ }
+
+ /**
+ * @return void
+ */
+ public function testCreateChildNodeWithExternalUrlType()
+ {
+ $i = $this;
+ $i->wantTo('Create external URL child node.');
+ $i->expect('Navigation should have a root node persisted.');
+
+ $i->amLoggedInUser();
+ $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+ ->setNavigation((new NavigationTransfer())
+ ->setName('Create child node with external URL type test')
+ ->setKey('Create child node with external URL type test')
+ ->setIsActive(true))
+ ->addNode((new NavigationTreeNodeTransfer())
+ ->setNavigationNode((new NavigationNodeTransfer())
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('en_US'))
+ ->setTitle('foo')))));
+ $i->amOnPage(NavigationPage::URL);
+
+ $i->waitForNavigationTree();
+ $i->switchToNodeForm();
+ $i->see('Create child node');
+ $i->submitCreateNodeFormWithExternalUrlType('Child 2', 'http://google.com');
+
+ $i->seeSuccessMessage(NavigationNodeCreatePage::MESSAGE_SUCCESS);
+
+ $i->switchToNavigationTree();
+ $i->seeNumberOfNavigationNodes(3);
+ }
+
+ /**
+ * @return void
+ */
+ public function testUpdateNodeToCategoryType()
+ {
+ $i = $this;
+ $i->wantTo('Update child node to category type.');
+ $i->expect('Node changes should persist in Zed.');
+
+ $i->amLoggedInUser();
+ $navigationTreeTransfer = $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+ ->setNavigation((new NavigationTransfer())
+ ->setName('Update child node to category type test')
+ ->setKey('Update child node to category type test')
+ ->setIsActive(true))
+ ->addNode((new NavigationTreeNodeTransfer())
+ ->setNavigationNode((new NavigationNodeTransfer())
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('en_US'))
+ ->setTitle('foo'))
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('de_DE'))
+ ->setTitle('foo')))));
+ $i->amOnPage(NavigationPage::URL);
+
+ $idNavigationNode = $navigationTreeTransfer->getNodes()[0]->getNavigationNode()->getIdNavigationNode();
+
+ $i->waitForNavigationTree();
+ $i->clickNode($idNavigationNode);
+ $i->switchToNodeForm();
+ $i->see('Update node');
+ $i->submitUpdateNodeToCategoryType('/en/computer', '/de/computer');
+
+ $i->seeSuccessMessage(NavigationNodeUpdatePage::MESSAGE_SUCCESS);
+ $i->switchToNavigationTree();
+ $i->seeNumberOfNavigationNodes(2);
+ }
+
+ /**
+ * @return void
+ */
+ public function testCreateChildNodeWithCmsPageType()
+ {
+ $i = $this;
+ $i->wantTo('Create CMS page child node.');
+ $i->expect('Navigation should have a new child node persisted.');
+
+ $i->amLoggedInUser();
+ $navigationTreeTransfer = $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+ ->setNavigation((new NavigationTransfer())
+ ->setName('Create child node with CMS page type test')
+ ->setKey('Create child node with CMS page type test')
+ ->setIsActive(true))
+ ->addNode((new NavigationTreeNodeTransfer())
+ ->setNavigationNode((new NavigationNodeTransfer())
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('en_US'))
+ ->setTitle('foo'))
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('de_DE'))
+ ->setTitle('foo')))));
+ $i->amOnPage(NavigationPage::URL);
+
+ $idNavigationNode = $navigationTreeTransfer->getNodes()[0]->getNavigationNode()->getIdNavigationNode();
+
+ $i->waitForNavigationTree();
+ $i->clickNode($idNavigationNode);
+ $i->switchToNodeForm();
+ $i->clickAddChildNodeButton();
+ $i->see('Create child node');
+ $i->submitCreateNodeFormWithCmsPageType('Child 1.1', '/en/imprint', '/de/impressum');
+
+ $idChildNavigationNode = $i->seeSuccessMessage(NavigationNodeCreatePage::MESSAGE_SUCCESS);
+ $i->switchToNavigationTree();
+ $i->seeNumberOfNavigationNodes(3);
+ $i->seeNavigationNodeHierarchy($idNavigationNode, $idChildNavigationNode);
+ }
+
+ /**
+ * @return void
+ */
+ public function testChangeNavigationTreeStructure()
+ {
+ $i = $this;
+ $i->wantTo('Change tree structure and save.');
+ $i->expect('Updated navigation tree structure should have persisted.');
+
+ $i->amLoggedInUser();
+ $navigationTreeTransfer = $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+ ->setNavigation((new NavigationTransfer())
+ ->setName('Create child node with CMS page type test')
+ ->setKey('Create child node with CMS page type test')
+ ->setIsActive(true))
+ ->addNode((new NavigationTreeNodeTransfer())
+ ->setNavigationNode((new NavigationNodeTransfer())
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('en_US'))
+ ->setTitle('node_1'))
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('de_DE'))
+ ->setTitle('node_1')))
+ ->addChild((new NavigationTreeNodeTransfer())
+ ->setNavigationNode((new NavigationNodeTransfer())
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('en_US'))
+ ->setTitle('node_1.1'))
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('de_DE'))
+ ->setTitle('node_1.1')))))
+ ->addNode((new NavigationTreeNodeTransfer())
+ ->setNavigationNode((new NavigationNodeTransfer())
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('en_US'))
+ ->setTitle('node_2'))
+ ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+ ->setFkLocale($i->getIdLocale('de_DE'))
+ ->setTitle('node_2')))));
+ $i->amOnPage(NavigationPage::URL);
+
+ $idNavigationNode = $navigationTreeTransfer->getNodes()[0]
+ ->getChildren()[0]
+ ->getNavigationNode()
+ ->getIdNavigationNode();
+ $idTargetNavigationNode = $navigationTreeTransfer->getNodes()[1]
+ ->getNavigationNode()
+ ->getIdNavigationNode();
+
+ $i->waitForNavigationTree();
+ $i->moveNavigationNode($idNavigationNode, $idTargetNavigationNode);
+ $i->seeNavigationNodeHierarchy($idTargetNavigationNode, $idNavigationNode);
+ $i->saveNavigationTreeOrder();
+ $i->seeSuccessfulOrderSaveMessage(NavigationPage::MESSAGE_TREE_UPDATE_SUCCESS);
+ }
+
+ /**
+ * @return void
+ */
+ public function testDeleteNavigationNode()
+ {
+ $i = $this;
+ /**
+ * Test skipped because popup confirmation is not working as expected under phantomjs.
+ * TODO: once we have Selenium, enable this test case.
+ */
+ return;
+//
+// $i->wantTo('Remove child node.');
+// $i->expect('Node should be removed from Zed.');
+//
+// $i->amLoggedInUser();
+// $navigationTreeTransfer = $i->prepareTestNavigationTreeEntities((new NavigationTreeTransfer())
+// ->setNavigation((new NavigationTransfer())
+// ->setName('Delete navigation node')
+// ->setKey('Delete navigation node')
+// ->setIsActive(true))
+// ->addNode((new NavigationTreeNodeTransfer())
+// ->setNavigationNode((new NavigationNodeTransfer())
+// ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+// ->setFkLocale($i->getIdLocale('en_US'))
+// ->setTitle('foo'))
+// ->addNavigationNodeLocalizedAttribute((new NavigationNodeLocalizedAttributesTransfer())
+// ->setFkLocale($i->getIdLocale('de_DE'))
+// ->setTitle('foo')))));
+// $i->amOnPage(NavigationPage::URL);
+//
+// $idNavigationNode = $navigationTreeTransfer->getNodes()[0]->getNavigationNode()->getIdNavigationNode();
+//
+// $i->waitForNavigationTree();
+// $i->clickNode($idNavigationNode);
+// $i->switchToNodeForm();
+// $i->clickRemoveNodeButton();
+// $i->canSeeInPopup('Are you sure you remove the selected node and all its children?');
+// $i->acceptPopup();
+//
+// $i->seeSuccessMessage(NavigationNodeDeletePage::MESSAGE_SUCCESS);
+// $i->switchToNavigationTree();
+// $i->seeNumberOfNavigationNodes(1);
+ }
+
+ /**
+ * @return int
+ */
+ public function prepareTestNavigationEntity()
+ {
+ $navigationEntity = new SpyNavigation();
+ $navigationEntity
+ ->setName('Acceptance navigation (2)')
+ ->setKey('acceptance2')
+ ->setIsActive(true)
+ ->save();
+
+ return $navigationEntity->getIdNavigation();
+ }
+
+ /**
+ * @param string $localeName
+ *
+ * @return void
+ */
+ public function expandLocalizedForm($localeName)
+ {
+ $this->click(sprintf(self::LOCALIZED_FORM_CONTAINER_SELECTOR, $localeName));
+ }
+
+ /**
+ * @return void
+ */
+ public function clickRootNode()
+ {
+ $this->click(self::ROOT_NODE_ANCHOR_SELECTOR);
+ }
+
+ /**
+ * @param int $idNavigationNode
+ *
+ * @return void
+ */
+ public function clickNode($idNavigationNode)
+ {
+ $this->click(sprintf(self::CHILD_NODE_ANCHOR_SELECTOR, $idNavigationNode));
+ }
+
+ /**
+ * @return void
+ */
+ public function waitForNavigationTree()
+ {
+ $this->waitForElement(self::NAVIGATION_TREE_SELECTOR, 5);
+ $this->wait(1);
+ }
+
+ /**
+ * @param int $count
+ *
+ * @return void
+ */
+ public function seeNumberOfNavigationNodes($count)
+ {
+ $this->seeNumberOfElements(self::NAVIGATION_NODE_SELECTOR, $count);
+ }
+
+ /**
+ * @param int $idParentNavigationNode
+ * @param int $idChildNavigationNode
+ *
+ * @return void
+ */
+ public function seeNavigationNodeHierarchy($idParentNavigationNode, $idChildNavigationNode)
+ {
+ $this->seeElement(sprintf(
+ self::NODE_CHILD_SELECTOR,
+ $idParentNavigationNode,
+ $idChildNavigationNode
+ ));
+ }
+
+ /**
+ * @param int $idNavigationNode
+ * @param int $idTargetNavigationNode
+ *
+ * @return void
+ */
+ public function moveNavigationNode($idNavigationNode, $idTargetNavigationNode)
+ {
+ $this->dragAndDrop(
+ sprintf(self::CHILD_NODE_ANCHOR_SELECTOR, $idNavigationNode),
+ sprintf(self::CHILD_NODE_ANCHOR_SELECTOR, $idTargetNavigationNode)
+ );
+ }
+
+ /**
+ * @return void
+ */
+ public function saveNavigationTreeOrder()
+ {
+ $this->click(self::NAVIGATION_TREE_SAVE_BUTTON_SELECTOR);
+ }
+
+ /**
+ * @param string $message
+ *
+ * @return void
+ */
+ public function seeSuccessfulOrderSaveMessage($message)
+ {
+ $this->waitForElement(self::SWEET_ALERT_SELECTOR, 5);
+ $this->wait(1);
+ $this->see($message);
+ $this->click(self::SWEET_ALERT_CONFIRM_SELECTOR);
+ }
+
+ /**
+ * @return void
+ */
+ public function switchToNodeForm()
+ {
+ $this->switchToIFrame(self::NODE_FORM_IFRAME_NAME);
+ $this->waitForElement(self::NODE_FORM_SELECTOR, 5);
+ }
+
+ /**
+ * @return void
+ */
+ public function switchToNavigationTree()
+ {
+ $this->switchToIFrame();
+ $this->waitForNavigationTree();
+ }
+
+ /**
+ * @return void
+ */
+ public function clickRemoveNodeButton()
+ {
+ $this->click(self::REMOVE_NODE_BUTTON_SELECTOR);
+ }
+
+ /**
+ * @return void
+ */
+ public function clickAddChildNodeButton()
+ {
+ $this->click(self::ADD_CHILD_NODE_BUTTON_SELECTOR);
+ }
+
+ /**
+ * @param string $title
+ *
+ * @return void
+ */
+ public function submitCreateNodeFormWithoutType($title)
+ {
+ $this->expandLocalizedForm('de_DE');
+
+ $this->submitForm(self::NODE_FORM_SELECTOR, [
+ 'navigation_node[navigation_node_localized_attributes][0][title]' => $title,
+ 'navigation_node[navigation_node_localized_attributes][1][title]' => $title,
+ 'navigation_node[is_active]' => true,
+ ]);
+ }
+
+ /**
+ * @param string $title
+ * @param string $externalUrl
+ *
+ * @return void
+ */
+ public function submitCreateNodeFormWithExternalUrlType($title, $externalUrl)
+ {
+ $this->expandLocalizedForm('de_DE');
+
+ $this->submitForm(self::NODE_FORM_SELECTOR, [
+ 'navigation_node[node_type]' => 'external_url',
+ 'navigation_node[navigation_node_localized_attributes][0][external_url]' => $externalUrl,
+ 'navigation_node[navigation_node_localized_attributes][1][external_url]' => $externalUrl,
+ 'navigation_node[navigation_node_localized_attributes][0][title]' => $title,
+ 'navigation_node[navigation_node_localized_attributes][1][title]' => $title,
+ 'navigation_node[is_active]' => true,
+ ]);
+ }
+
+ /**
+ * @param string $categoryUrl_en_US
+ * @param string $categoryUrl_de_DE
+ *
+ * @return void
+ */
+ public function submitUpdateNodeToCategoryType($categoryUrl_en_US, $categoryUrl_de_DE)
+ {
+ $this->expandLocalizedForm('de_DE');
+
+ $this->submitForm(self::NODE_FORM_SELECTOR, [
+ 'navigation_node[node_type]' => 'category',
+ 'navigation_node[navigation_node_localized_attributes][0][category_url]' => $categoryUrl_en_US,
+ 'navigation_node[navigation_node_localized_attributes][1][category_url]' => $categoryUrl_de_DE,
+ ]);
+ }
+
+ /**
+ * @param string $title
+ * @param string $cmsPageUrl_en_US
+ * @param string $cmsPageUrl_de_DE
+ *
+ * @return void
+ */
+ public function submitCreateNodeFormWithCmsPageType($title, $cmsPageUrl_en_US, $cmsPageUrl_de_DE)
+ {
+ $this->expandLocalizedForm('de_DE');
+
+ $this->submitForm(self::NODE_FORM_SELECTOR, [
+ 'navigation_node[node_type]' => 'cms_page',
+ 'navigation_node[navigation_node_localized_attributes][0][title]' => $title,
+ 'navigation_node[navigation_node_localized_attributes][0][cms_page_url]' => $cmsPageUrl_en_US,
+ 'navigation_node[navigation_node_localized_attributes][1][title]' => $title,
+ 'navigation_node[navigation_node_localized_attributes][1][cms_page_url]' => $cmsPageUrl_de_DE,
+ 'navigation_node[is_active]' => true,
+ ]);
+ }
+
+ /**
+ * @param \Generated\Shared\Transfer\NavigationTreeTransfer $navigationTreeTransfer
+ *
+ * @return \Generated\Shared\Transfer\NavigationTreeTransfer
+ */
+ public function prepareTestNavigationTreeEntities(NavigationTreeTransfer $navigationTreeTransfer)
+ {
+ $navigationTransfer = $this->getLocator()->navigation()->facade()->createNavigation($navigationTreeTransfer->getNavigation());
+
+ foreach ($navigationTreeTransfer->getNodes() as $navigationTreeNodeTransfer) {
+ $this->createNavigationNodesRecursively($navigationTreeNodeTransfer, $navigationTransfer->getIdNavigation());
+ }
+
+ return $navigationTreeTransfer;
+ }
+
+ /**
+ * @param \Generated\Shared\Transfer\NavigationTreeNodeTransfer $navigationTreeNodeTransfer
+ * @param int $idNavigation
+ * @param int|null $idParentNavigationNode
+ *
+ * @return void
+ */
+ protected function createNavigationNodesRecursively(NavigationTreeNodeTransfer $navigationTreeNodeTransfer, $idNavigation, $idParentNavigationNode = null)
+ {
+ $navigationNodeTransfer = $navigationTreeNodeTransfer->getNavigationNode();
+ $navigationNodeTransfer
+ ->setFkNavigation($idNavigation)
+ ->setFkParentNavigationNode($idParentNavigationNode);
+
+ $navigationNodeTransfer = $this->getLocator()->navigation()->facade()->createNavigationNode($navigationNodeTransfer);
+
+ foreach ($navigationTreeNodeTransfer->getChildren() as $childNavigationTreeNodeTransfer) {
+ $this->createNavigationNodesRecursively($childNavigationTreeNodeTransfer, $idNavigation, $navigationNodeTransfer->getIdNavigationNode());
+ }
+ }
+
+ /**
+ * @param string $locale
+ *
+ * @return int
+ */
+ public function getIdLocale($locale)
+ {
+ return $this->getLocator()->locale()->facade()->getLocale($locale)->getIdLocale();
+ }
+
+}
diff --git a/tests/PyzTest/Zed/NavigationGui/_support/PageObject/NavigationCreatePage.php b/tests/PyzTest/Zed/NavigationGui/_support/PageObject/NavigationCreatePage.php
new file mode 100644
index 000000000..116e7d478
--- /dev/null
+++ b/tests/PyzTest/Zed/NavigationGui/_support/PageObject/NavigationCreatePage.php
@@ -0,0 +1,11 @@
+wantTo('I want to create up selling relation');
$i->expect('relation is persisted, exported to yves and carousel component is visible');
@@ -49,16 +52,10 @@ public function testICanCreateProductRelationAndSeeInYves(ProductRelationCreateR
$i->runCollectors();
- $yvesTester = $i->haveFriend('yvesTester', YvesAcceptanceTester::class);
-
- $yvesTester->does(function (YvesAcceptanceTester $i) {
-
- $i->amOnPage('/en/samsung-bundle-214');
-
- $i->canSee('Similar products');
- $i->canSee('HP EliteDesk 800 G2');
-
- });
+ $i->amYves();
+ $i->amOnPage('/en/samsung-bundle-214');
+ $i->canSee('Similar products');
+ $i->canSee('HP EliteDesk 800 G2');
}
}
diff --git a/tests/Acceptance/ProductRelation/PageObject/ProductRelationCreatePage.php b/tests/PyzTest/Zed/ProductRelation/_support/PageObject/ProductRelationCreatePage.php
similarity index 87%
rename from tests/Acceptance/ProductRelation/PageObject/ProductRelationCreatePage.php
rename to tests/PyzTest/Zed/ProductRelation/_support/PageObject/ProductRelationCreatePage.php
index 9eec37ec5..cc19a66ae 100644
--- a/tests/Acceptance/ProductRelation/PageObject/ProductRelationCreatePage.php
+++ b/tests/PyzTest/Zed/ProductRelation/_support/PageObject/ProductRelationCreatePage.php
@@ -4,7 +4,7 @@
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\ProductRelation\PageObject;
+namespace PyzTest\Zed\ProductRelation\PageObject;
class ProductRelationCreatePage
{
diff --git a/tests/Acceptance/ProductRelation/Tester/ProductRelationCreateRelationTester.php b/tests/PyzTest/Zed/ProductRelation/_support/ProductRelationPresentationTester.php
similarity index 70%
rename from tests/Acceptance/ProductRelation/Tester/ProductRelationCreateRelationTester.php
rename to tests/PyzTest/Zed/ProductRelation/_support/ProductRelationPresentationTester.php
index 33080b0d1..978d3a988 100644
--- a/tests/Acceptance/ProductRelation/Tester/ProductRelationCreateRelationTester.php
+++ b/tests/PyzTest/Zed/ProductRelation/_support/ProductRelationPresentationTester.php
@@ -1,21 +1,45 @@
amZed();
+ $this->amLoggedInUser();
+ }
+
/**
* @param string $type
*
diff --git a/tests/PyzTest/Zed/ProductRelation/codeception.yml b/tests/PyzTest/Zed/ProductRelation/codeception.yml
new file mode 100644
index 000000000..cbbaab01b
--- /dev/null
+++ b/tests/PyzTest/Zed/ProductRelation/codeception.yml
@@ -0,0 +1,37 @@
+namespace: PyzTest\Zed\ProductRelation
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Presentation:
+ path: Presentation
+ class_name: ProductRelationPresentationTester
+ modules:
+ enabled:
+ - Asserts
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Config\Helper\ConfigInit
+ - \SprykerTest\Shared\Testify\Helper\LocatorHelper:
+ projectNamespaces: ['Pyz']
+
+ - \SprykerTest\Shared\Propel\Helper\PropelInstallHelper
+ - WebDriver:
+ url: ''
+ browser: chrome
+ window_size: 1920x1080
+ host: 0.0.0.0
+ restart: false
+ - \SprykerTest\Shared\Discount\Helper\DiscountDataHelper
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
+ - \SprykerTest\Shared\Application\Helper\ZedHelper
+ - \SprykerTest\Shared\Application\Helper\YvesHelper
+ - \SprykerTest\Shared\Application\Helper\SetupHelper
diff --git a/tests/Functional/Pyz/Zed/PropelOrm/PropelOrmTransactionHandlerTest.php b/tests/PyzTest/Zed/PropelOrm/Business/PropelOrmTransactionHandlerTest.php
similarity index 95%
rename from tests/Functional/Pyz/Zed/PropelOrm/PropelOrmTransactionHandlerTest.php
rename to tests/PyzTest/Zed/PropelOrm/Business/PropelOrmTransactionHandlerTest.php
index d29f9dbdf..44429c306 100644
--- a/tests/Functional/Pyz/Zed/PropelOrm/PropelOrmTransactionHandlerTest.php
+++ b/tests/PyzTest/Zed/PropelOrm/Business/PropelOrmTransactionHandlerTest.php
@@ -5,20 +5,22 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Functional\Pyz\Zed\PropelOrm;
+namespace PyzTest\Zed\PropelOrm\Business;
use Codeception\TestCase\Test;
use Exception;
+use PyzTest\Zed\PropelOrm\Stub\ProductManagerStub;
use Spryker\Zed\Product\Business\ProductFacade;
use Spryker\Zed\Product\Persistence\ProductQueryContainer;
-use Stub\ProductManagerStub;
/**
- * @group Functional
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Zed
- * @group Propel
+ * @group PropelOrm
+ * @group Business
* @group PropelOrmTransactionHandlerTest
+ * Add your own group annotations below this line
*/
class PropelOrmTransactionHandlerTest extends Test
{
@@ -60,6 +62,7 @@ protected function setUp()
*/
public function testAddProductWithoutTransactionHandling()
{
+ self::markTestSkipped();
$productManager = new ProductManagerStub(
$this->productQueryContainer
);
diff --git a/tests/PyzTest/Zed/PropelOrm/_support/PropelOrmBusinessTester.php b/tests/PyzTest/Zed/PropelOrm/_support/PropelOrmBusinessTester.php
new file mode 100644
index 000000000..42f925a63
--- /dev/null
+++ b/tests/PyzTest/Zed/PropelOrm/_support/PropelOrmBusinessTester.php
@@ -0,0 +1,30 @@
+productQueryContainer->getConnection()->beginTransaction();
$productAbstractEntity = $this->createProductAbstractEntity($sku);
- $attributeEntity = $this->createLocalizedAttributeEntity($name, $productAbstractEntity->getIdProductAbstract());
+ $this->createLocalizedAttributeEntity($name, $productAbstractEntity->getIdProductAbstract());
$this->productQueryContainer->getConnection()->commit();
diff --git a/tests/PyzTest/Zed/PropelOrm/codeception.yml b/tests/PyzTest/Zed/PropelOrm/codeception.yml
new file mode 100644
index 000000000..e4ec8fcb6
--- /dev/null
+++ b/tests/PyzTest/Zed/PropelOrm/codeception.yml
@@ -0,0 +1,23 @@
+namespace: PyzTest\Zed\PropelOrm
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Business:
+ path: Business
+ class_name: PropelOrmBusinessTester
+ modules:
+ enabled:
+ - Asserts
+ - \SprykerTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Testify\Helper\ConfigHelper
+ - \SprykerTest\Shared\Propel\Helper\ConnectionHelper
diff --git a/tests/Acceptance/Sales/PageObject/OrderDetailPage.php b/tests/PyzTest/Zed/Sales/_support/PageObject/OrderDetailPage.php
similarity index 89%
rename from tests/Acceptance/Sales/PageObject/OrderDetailPage.php
rename to tests/PyzTest/Zed/Sales/_support/PageObject/OrderDetailPage.php
index b3fa7d50a..6c2d09c2d 100644
--- a/tests/Acceptance/Sales/PageObject/OrderDetailPage.php
+++ b/tests/PyzTest/Zed/Sales/_support/PageObject/OrderDetailPage.php
@@ -5,7 +5,7 @@
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Sales\PageObject;
+namespace PyzTest\Zed\Sales\PageObject;
class OrderDetailPage
{
diff --git a/tests/Acceptance/Sales/PageObject/OrderListPage.php b/tests/PyzTest/Zed/Sales/_support/PageObject/OrderListPage.php
similarity index 86%
rename from tests/Acceptance/Sales/PageObject/OrderListPage.php
rename to tests/PyzTest/Zed/Sales/_support/PageObject/OrderListPage.php
index 02c7be49b..cf406c6c8 100644
--- a/tests/Acceptance/Sales/PageObject/OrderListPage.php
+++ b/tests/PyzTest/Zed/Sales/_support/PageObject/OrderListPage.php
@@ -4,7 +4,7 @@
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
-namespace Acceptance\Sales\PageObject;
+namespace PyzTest\Zed\Sales\PageObject;
class OrderListPage
{
diff --git a/tests/Acceptance/Tax/Zed/TaxRateCreateCest.php b/tests/PyzTest/Zed/Tax/Presentation/TaxRateCreateCest.php
similarity index 76%
rename from tests/Acceptance/Tax/Zed/TaxRateCreateCest.php
rename to tests/PyzTest/Zed/Tax/Presentation/TaxRateCreateCest.php
index 556dbc288..c41fcea39 100644
--- a/tests/Acceptance/Tax/Zed/TaxRateCreateCest.php
+++ b/tests/PyzTest/Zed/Tax/Presentation/TaxRateCreateCest.php
@@ -5,30 +5,30 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Tax\Zed;
+namespace PyzTest\Zed\Tax\Presentation;
-use Acceptance\Tax\Zed\PageObject\TaxRateCreatePage;
-use Acceptance\Tax\Zed\PageObject\TaxRateListPage;
-use Acceptance\Tax\Zed\Tester\TaxRateTester;
+use PyzTest\Zed\Tax\PageObject\TaxRateCreatePage;
+use PyzTest\Zed\Tax\PageObject\TaxRateListPage;
+use PyzTest\Zed\Tax\TaxPresentationTester;
/**
- * @group Acceptance
- * @group Tax
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Zed
+ * @group Tax
+ * @group Presentation
* @group TaxRateCreateCest
+ * Add your own group annotations below this line
*/
class TaxRateCreateCest
{
/**
- * @group Overview
- * @group Smoke
- *
- * @param \Acceptance\Tax\Zed\Tester\TaxRateTester $i
+ * @param \PyzTest\Zed\Tax\TaxPresentationTester $i
*
* @return void
*/
- public function testCreateValidTaxRateShouldShowSuccessMessage(TaxRateTester $i)
+ public function testCreateValidTaxRateShouldShowSuccessMessage(TaxPresentationTester $i)
{
$i->wantTo('Create valid tax rate.');
$i->expect('Tax rate is successfully created');
@@ -40,13 +40,11 @@ public function testCreateValidTaxRateShouldShowSuccessMessage(TaxRateTester $i)
}
/**
- * @group Overview
- *
- * @param \Acceptance\Tax\Zed\Tester\TaxRateTester $i
+ * @param \PyzTest\Zed\Tax\TaxPresentationTester $i
*
* @return void
*/
- public function testCreateInvalidTaxRateShouldShowErrorMessages(TaxRateTester $i)
+ public function testCreateInvalidTaxRateShouldShowErrorMessages(TaxPresentationTester $i)
{
$i->wantTo('Create invalid tax rate');
$i->expect('Error messages are displayed. Tax rate is not created');
@@ -56,13 +54,11 @@ public function testCreateInvalidTaxRateShouldShowErrorMessages(TaxRateTester $i
}
/**
- * @group Overview
- *
- * @param \Acceptance\Tax\Zed\Tester\TaxRateTester $i
+ * @param \PyzTest\Zed\Tax\TaxPresentationTester $i
*
* @return void
*/
- public function testBackToListOfTaxRatesShouldOpenTaxRateListPageWithoutSaving(TaxRateTester $i)
+ public function testBackToListOfTaxRatesShouldOpenTaxRateListPageWithoutSaving(TaxPresentationTester $i)
{
$i->wantTo('Create valid tax rate and back to list of tax rates');
$i->expect('List of tax rates is opened, tax rate is not created');
@@ -78,13 +74,11 @@ public function testBackToListOfTaxRatesShouldOpenTaxRateListPageWithoutSaving(T
}
/**
- * @group Overview
- *
- * @param \Acceptance\Tax\Zed\Tester\TaxRateTester $i
+ * @param \PyzTest\Zed\Tax\TaxPresentationTester $i
*
* @return void
*/
- public function testCreateTaxRateWhichAlreadyExistsShouldShowErrorMessage(TaxRateTester $i)
+ public function testCreateTaxRateWhichAlreadyExistsShouldShowErrorMessage(TaxPresentationTester $i)
{
$i->wantTo('Create tax rate which already exists');
$i->expect('Error message is displayed on attempt to create one and the same Tax Rate');
@@ -98,13 +92,11 @@ public function testCreateTaxRateWhichAlreadyExistsShouldShowErrorMessage(TaxRat
}
/**
- * @group Overview
- *
- * @param \Acceptance\Tax\Zed\Tester\TaxRateTester $i
+ * @param \PyzTest\Zed\Tax\TaxPresentationTester $i
*
* @return void
*/
- public function testCreateAlreadyExistedTaxRateShouldShowErrorMessage(TaxRateTester $i)
+ public function testCreateAlreadyExistedTaxRateShouldShowErrorMessage(TaxPresentationTester $i)
{
$i->wantTo('Create tax rate which already exists');
$i->expect('Error message is displayed on attempt to create one and the same Tax Rate');
diff --git a/tests/Acceptance/Tax/Zed/PageObject/TaxRateCreatePage.php b/tests/PyzTest/Zed/Tax/_support/PageObject/TaxRateCreatePage.php
similarity index 98%
rename from tests/Acceptance/Tax/Zed/PageObject/TaxRateCreatePage.php
rename to tests/PyzTest/Zed/Tax/_support/PageObject/TaxRateCreatePage.php
index 5d5dd3b47..e736fef13 100644
--- a/tests/Acceptance/Tax/Zed/PageObject/TaxRateCreatePage.php
+++ b/tests/PyzTest/Zed/Tax/_support/PageObject/TaxRateCreatePage.php
@@ -5,7 +5,7 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Tax\Zed\PageObject;
+namespace PyzTest\Zed\Tax\PageObject;
class TaxRateCreatePage
{
diff --git a/tests/Acceptance/Tax/Zed/PageObject/TaxRateListPage.php b/tests/PyzTest/Zed/Tax/_support/PageObject/TaxRateListPage.php
similarity index 86%
rename from tests/Acceptance/Tax/Zed/PageObject/TaxRateListPage.php
rename to tests/PyzTest/Zed/Tax/_support/PageObject/TaxRateListPage.php
index 3ad8b73b2..fbccf9b6c 100644
--- a/tests/Acceptance/Tax/Zed/PageObject/TaxRateListPage.php
+++ b/tests/PyzTest/Zed/Tax/_support/PageObject/TaxRateListPage.php
@@ -5,12 +5,12 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Acceptance\Tax\Zed\PageObject;
+namespace PyzTest\Zed\Tax\PageObject;
class TaxRateListPage
{
- const URL = 'tax/rate/list';
+ const URL = '/tax/rate/list';
const SELECTOR_DATA_TABLE = '.dataTables_wrapper';
diff --git a/tests/Acceptance/Tax/Zed/Tester/TaxRateTester.php b/tests/PyzTest/Zed/Tax/_support/TaxPresentationTester.php
similarity index 82%
rename from tests/Acceptance/Tax/Zed/Tester/TaxRateTester.php
rename to tests/PyzTest/Zed/Tax/_support/TaxPresentationTester.php
index 9e0408a53..5bbe2ad44 100644
--- a/tests/Acceptance/Tax/Zed/Tester/TaxRateTester.php
+++ b/tests/PyzTest/Zed/Tax/_support/TaxPresentationTester.php
@@ -1,19 +1,42 @@
amZed();
+ $this->amLoggedInUser();
+ }
/**
* @param string $taxRateName
@@ -78,8 +101,6 @@ public function searchForTaxRate($taxRateName)
public function deleteTaxRate($taxRateName)
{
$i = $this;
-
- $i->amLoggedInUser();
$i->amOnPage(TaxRateListPage::URL);
$i->fillField(TaxRateListPage::SELECTOR_SEARCH, TaxRateCreatePage::$taxRateData[$taxRateName]['name']);
diff --git a/tests/PyzTest/Zed/Tax/codeception.yml b/tests/PyzTest/Zed/Tax/codeception.yml
new file mode 100644
index 000000000..f5abf25a0
--- /dev/null
+++ b/tests/PyzTest/Zed/Tax/codeception.yml
@@ -0,0 +1,38 @@
+namespace: PyzTest\Zed\Tax
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Presentation:
+ path: Presentation
+ class_name: TaxPresentationTester
+ modules:
+ enabled:
+ - Asserts
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Config\Helper\ConfigInit
+ - \SprykerTest\Shared\Testify\Helper\LocatorHelper:
+ projectNamespaces: ['Pyz']
+
+ - \SprykerTest\Shared\Propel\Helper\PropelInstallHelper
+ - WebDriver:
+ url: ''
+ browser: chrome
+ window_size: 1920x1080
+ host: 0.0.0.0
+ restart: false
+ - SprykerTest\Shared\Propel\Helper\ConnectionHelper
+ - \SprykerTest\Shared\Discount\Helper\DiscountDataHelper
+ - \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
+ - \SprykerTest\Shared\Application\Helper\ZedHelper
+ - \SprykerTest\Shared\Application\Helper\YvesHelper
+ - \SprykerTest\Shared\Application\Helper\SetupHelper
diff --git a/tests/Functional/Pyz/Zed/Touch/TouchTest.php b/tests/PyzTest/Zed/Touch/Business/TouchTest.php
similarity index 75%
rename from tests/Functional/Pyz/Zed/Touch/TouchTest.php
rename to tests/PyzTest/Zed/Touch/Business/TouchTest.php
index 506e0694f..ac9f6b9c4 100644
--- a/tests/Functional/Pyz/Zed/Touch/TouchTest.php
+++ b/tests/PyzTest/Zed/Touch/Business/TouchTest.php
@@ -5,16 +5,19 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
-namespace Functional\Pyz\Zed\Touch;
+namespace PyzTest\Zed\Touch\Business;
use Codeception\TestCase\Test;
use Orm\Zed\Touch\Persistence\SpyTouchQuery;
/**
- * @group Pyz
+ * Auto-generated group annotations
+ * @group PyzTest
* @group Zed
* @group Touch
+ * @group Business
* @group TouchTest
+ * Add your own group annotations below this line
*/
class TouchTest extends Test
{
diff --git a/tests/_support/UnitTester.php b/tests/PyzTest/Zed/Touch/_support/TouchBusinessTester.php
similarity index 77%
rename from tests/_support/UnitTester.php
rename to tests/PyzTest/Zed/Touch/_support/TouchBusinessTester.php
index f04ace39e..6d491c9d7 100644
--- a/tests/_support/UnitTester.php
+++ b/tests/PyzTest/Zed/Touch/_support/TouchBusinessTester.php
@@ -1,4 +1,7 @@
assertEquals($element->getChildrenCount(), 5);
+ * ```
+ *
+ * Floating-point example:
+ * ```php
+ * assertEquals($calculator->add(0.1, 0.2), 0.3, 'Calculator should add the two numbers correctly.', 0.01);
+ * ```
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @param float $delta
+ * @see \Codeception\Module\Asserts::assertEquals()
+ */
+ public function assertEquals($expected, $actual, $message = null, $delta = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that two variables are not equal. If you're comparing floating-point values,
+ * you can specify the optional "delta" parameter which dictates how great of a precision
+ * error are you willing to tolerate in order to consider the two values not equal.
+ *
+ * Regular example:
+ * ```php
+ * assertNotEquals($element->getChildrenCount(), 0);
+ * ```
+ *
+ * Floating-point example:
+ * ```php
+ * assertNotEquals($calculator->add(0.1, 0.2), 0.4, 'Calculator should add the two numbers correctly.', 0.01);
+ * ```
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @param float $delta
+ * @see \Codeception\Module\Asserts::assertNotEquals()
+ */
+ public function assertNotEquals($expected, $actual, $message = null, $delta = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that two variables are same
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertSame()
+ */
+ public function assertSame($expected, $actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that two variables are not same
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertNotSame()
+ */
+ public function assertNotSame($expected, $actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that actual is greater than expected
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertGreaterThan()
+ */
+ public function assertGreaterThan($expected, $actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that actual is greater or equal than expected
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
+ */
+ public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that actual is less than expected
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertLessThan()
+ */
+ public function assertLessThan($expected, $actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that actual is less or equal than expected
+ *
+ * @param $expected
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
+ */
+ public function assertLessThanOrEqual($expected, $actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that haystack contains needle
+ *
+ * @param $needle
+ * @param $haystack
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertContains()
+ */
+ public function assertContains($needle, $haystack, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that haystack doesn't contain needle.
+ *
+ * @param $needle
+ * @param $haystack
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertNotContains()
+ */
+ public function assertNotContains($needle, $haystack, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that string match with pattern
+ *
+ * @param string $pattern
+ * @param string $string
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertRegExp()
+ */
+ public function assertRegExp($pattern, $string, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that string not match with pattern
+ *
+ * @param string $pattern
+ * @param string $string
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertNotRegExp()
+ */
+ public function assertNotRegExp($pattern, $string, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that a string starts with the given prefix.
+ *
+ * @param string $prefix
+ * @param string $string
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertStringStartsWith()
+ */
+ public function assertStringStartsWith($prefix, $string, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that a string doesn't start with the given prefix.
+ *
+ * @param string $prefix
+ * @param string $string
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertStringStartsNotWith()
+ */
+ public function assertStringStartsNotWith($prefix, $string, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that variable is empty.
+ *
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertEmpty()
+ */
+ public function assertEmpty($actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that variable is not empty.
+ *
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertNotEmpty()
+ */
+ public function assertNotEmpty($actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that variable is NULL
+ *
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertNull()
+ */
+ public function assertNull($actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that variable is not NULL
+ *
+ * @param $actual
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertNotNull()
+ */
+ public function assertNotNull($actual, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that condition is positive.
+ *
+ * @param $condition
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertTrue()
+ */
+ public function assertTrue($condition, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that condition is negative.
+ *
+ * @param $condition
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertFalse()
+ */
+ public function assertFalse($condition, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks if file exists
+ *
+ * @param string $filename
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertFileExists()
+ */
+ public function assertFileExists($filename, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks if file doesn't exist
+ *
+ * @param string $filename
+ * @param string $message
+ * @see \Codeception\Module\Asserts::assertFileNotExists()
+ */
+ public function assertFileNotExists($filename, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $expected
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertGreaterOrEquals()
+ */
+ public function assertGreaterOrEquals($expected, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $expected
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertLessOrEquals()
+ */
+ public function assertLessOrEquals($expected, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertIsEmpty()
+ */
+ public function assertIsEmpty($actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $key
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertArrayHasKey()
+ */
+ public function assertArrayHasKey($key, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $key
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertArrayNotHasKey()
+ */
+ public function assertArrayNotHasKey($key, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that array contains subset.
+ *
+ * @param array $subset
+ * @param array $array
+ * @param bool $strict
+ * @param string $message
+ * @see \Codeception\Module::assertArraySubset()
+ */
+ public function assertArraySubset($subset, $array, $strict = null, $message = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArraySubset', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $expectedCount
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertCount()
+ */
+ public function assertCount($expectedCount, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $class
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertInstanceOf()
+ */
+ public function assertInstanceOf($class, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $class
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertNotInstanceOf()
+ */
+ public function assertNotInstanceOf($class, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param $type
+ * @param $actual
+ * @param $description
+ * @see \Codeception\Module\Asserts::assertInternalType()
+ */
+ public function assertInternalType($type, $actual, $description = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInternalType', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Fails the test with message.
+ *
+ * @param $message
+ * @see \Codeception\Module\Asserts::fail()
+ */
+ public function fail($message) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Handles and checks exception called inside callback function.
+ * Either exception class name or exception instance should be provided.
+ *
+ * ```php
+ * expectException(MyException::class, function() {
+ * $this->doSomethingBad();
+ * });
+ *
+ * $I->expectException(new MyException(), function() {
+ * $this->doSomethingBad();
+ * });
+ * ```
+ * If you want to check message or exception code, you can pass them with exception instance:
+ * ```php
+ * expectException(new MyException("Don't do bad things"), function() {
+ * $this->doSomethingBad();
+ * });
+ * ```
+ *
+ * @param $exception string or \Exception
+ * @param $callback
+ * @see \Codeception\Module\Asserts::expectException()
+ */
+ public function expectException($exception, $callback) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param string $key
+ * @param array|bool|float|int|string $value
+ *
+ * @return void
+ * @see \SprykerTest\Shared\Testify\Helper\ConfigHelper::setConfig()
+ */
+ public function setConfig($key, $value) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('setConfig', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param string $key
+ *
+ * @return void
+ * @see \SprykerTest\Shared\Testify\Helper\ConfigHelper::removeConfig()
+ */
+ public function removeConfig($key) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('removeConfig', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @param null|string $onlyFor
+ *
+ * @return void
+ * @see \SprykerTest\Shared\Testify\Helper\DependencyHelper::setDependency()
+ */
+ public function setDependency($key, $value, $onlyFor = null) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('setDependency', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @return \Spryker\Shared\Kernel\LocatorLocatorInterface|\Generated\Zed\Ide\AutoCompletion|\Generated\Service\Ide\AutoCompletion
+ * @see \SprykerTest\Shared\Testify\Helper\LocatorHelper::getLocator()
+ */
+ public function getLocator() {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('getLocator', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @return \Spryker\Zed\Kernel\Business\AbstractFacade
+ * @see \SprykerTest\Shared\Testify\Helper\LocatorHelper::getFacade()
+ */
+ public function getFacade() {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('getFacade', func_get_args()));
+ }
+
+
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * @return \Orm\Zed\Sales\Persistence\SpySalesOrder
+ * @see \SprykerTest\Zed\Sales\Business\Helper\BusinessHelper::create()
+ */
+ public function create() {
+ return $this->getScenario()->runStep(new \Codeception\Step\Action('create', func_get_args()));
+ }
+}
diff --git a/tests/PyzTest/Zed/Touch/codeception.yml b/tests/PyzTest/Zed/Touch/codeception.yml
new file mode 100644
index 000000000..63b61e04e
--- /dev/null
+++ b/tests/PyzTest/Zed/Touch/codeception.yml
@@ -0,0 +1,26 @@
+namespace: PyzTest\Zed\Touch
+
+paths:
+ tests: .
+ data: _data
+ support: _support
+ log: _output
+
+coverage:
+ enabled: true
+ remote: false
+ whitelist: { include: ['../../../../src/*'] }
+
+suites:
+ Business:
+ path: Business
+ class_name: TouchBusinessTester
+ modules:
+ enabled:
+ - Asserts
+ - \PyzTest\Shared\Testify\Helper\Environment
+ - \SprykerTest\Shared\Testify\Helper\ConfigHelper
+ - \SprykerTest\Shared\Testify\Helper\DependencyHelper
+ - \SprykerTest\Shared\Testify\Helper\LocatorHelper
+ - \SprykerTest\Shared\Propel\Helper\TransactionHelper
+ - \SprykerTest\Zed\Sales\Business\Helper\BusinessHelper
diff --git a/tests/Unit.suite.yml b/tests/Unit.suite.yml
deleted file mode 100644
index 1be8e0be9..000000000
--- a/tests/Unit.suite.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-# Codeception Test Suite Configuration
-
-# suite for unit (internal) tests.
-# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
-
-modules:
- enabled:
- - Asserts
- - \Module\Unit
diff --git a/tests/Unit/YourNamespace/YourApplication/YourBundle/YourTest.php b/tests/Unit/YourNamespace/YourApplication/YourBundle/YourTest.php
deleted file mode 100644
index 6fa9079ae..000000000
--- a/tests/Unit/YourNamespace/YourApplication/YourBundle/YourTest.php
+++ /dev/null
@@ -1,18 +0,0 @@
-assertTrue(true);
- }
-
-}
diff --git a/tests/Unit/_bootstrap.php b/tests/Unit/_bootstrap.php
deleted file mode 100644
index b3d9bbc7f..000000000
--- a/tests/Unit/_bootstrap.php
+++ /dev/null
@@ -1 +0,0 @@
-bootstrap(SystemUnderTestBootstrap::APPLICATION_YVES);
diff --git a/tests/YvesUnit.suite.yml b/tests/YvesUnit.suite.yml
deleted file mode 100644
index 1be8e0be9..000000000
--- a/tests/YvesUnit.suite.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-# Codeception Test Suite Configuration
-
-# suite for unit (internal) tests.
-# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
-
-modules:
- enabled:
- - Asserts
- - \Module\Unit
diff --git a/tests/YvesUnit/_bootstrap.php b/tests/YvesUnit/_bootstrap.php
deleted file mode 100644
index 27918eb61..000000000
--- a/tests/YvesUnit/_bootstrap.php
+++ /dev/null
@@ -1,6 +0,0 @@
-bootstrap(SystemUnderTestBootstrap::APPLICATION_YVES);
diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php
deleted file mode 100644
index d20b8a43e..000000000
--- a/tests/_bootstrap.php
+++ /dev/null
@@ -1,12 +0,0 @@
-setEnvironmentConfig($this->config);
- }
-
-}
diff --git a/tests/_helpers/EnvironmentalTestCaseInterface.php b/tests/_helpers/EnvironmentalTestCaseInterface.php
deleted file mode 100644
index 22eda3f88..000000000
--- a/tests/_helpers/EnvironmentalTestCaseInterface.php
+++ /dev/null
@@ -1,14 +0,0 @@
-boot(new Application());
-
- Propel::getWriteConnection('zed')->beginTransaction();
- }
-
- /**
- * @param \Codeception\TestCase $test
- *
- * @return void
- */
- public function _after(TestCase $test)
- {
- parent::_after($test);
-
- Propel::getWriteConnection('zed')->rollBack();
-
- if (session_status() === PHP_SESSION_ACTIVE) {
- session_destroy();
- }
- }
-
- /**
- * @param \Codeception\TestCase $test
- * @param bool $fail
- *
- * @return void
- */
- public function _failed(TestCase $test, $fail)
- {
- parent::_failed($test, $fail);
-
- Propel::getWriteConnection('zed')->rollBack();
-
- if (session_status() === PHP_SESSION_ACTIVE) {
- session_destroy();
- }
- }
-
-}
diff --git a/tests/_support/Module/Unit.php b/tests/_support/Module/Unit.php
deleted file mode 100644
index 9d7d06f2f..000000000
--- a/tests/_support/Module/Unit.php
+++ /dev/null
@@ -1,12 +0,0 @@
-amOnPage('/foo/bar/baz');` will use yves host
- *
- * @param \Codeception\Scenario $scenario
- */
- public function __construct(Scenario $scenario)
- {
- parent::__construct($scenario);
-
- $i = $this;
- $i->amYves();
- }
-
-}
diff --git a/tests/_support/ZedAcceptanceTester.php b/tests/_support/ZedAcceptanceTester.php
deleted file mode 100644
index bcb9e915e..000000000
--- a/tests/_support/ZedAcceptanceTester.php
+++ /dev/null
@@ -1,19 +0,0 @@
-amZed();
- }
-
-}
diff --git a/tests/_support/_generated/.gitkeep b/tests/_support/_generated/.gitkeep
deleted file mode 100644
index e69de29bb..000000000