Skip to content

Commit

Permalink
core-1652 fixed Customer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stereomon committed Aug 4, 2017
1 parent a459206 commit 45bb3a6
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 69 deletions.
16 changes: 11 additions & 5 deletions codeception.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
namespace: SprykerTest
namespace: Customer
actor: Tester

include:
- tests/SprykerTest/Shared/Customer
- tests/SprykerTest/Zed/Customer
- tests/SprykerTest/Zed/Customer

paths:
tests: tests
support: .
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs

settings:
Expand All @@ -21,4 +20,11 @@ settings:

coverage:
enabled: true
whitelist: { include: ['src/*'] }
whitelist: { include: ['src/*.php'] }

extensions:
enabled:
- Codeception\Extension\Phantoman
config:
Codeception\Extension\Phantoman:
suites: ['Presentation']
10 changes: 0 additions & 10 deletions tests/SprykerTest/Zed/Customer/Business.suite.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SprykerTest\Zed\Customer\Communication\Controller;

use SprykerTest\Zed\Customer\CommunicationTester;
use SprykerTest\Zed\Customer\CustomerCommunicationTester;

/**
* Auto-generated group annotations
Expand All @@ -30,21 +30,21 @@ class EditControllerCest
private $customer;

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function _before(CommunicationTester $i)
public function _before(CustomerCommunicationTester $i)
{
$this->customer = $i->haveCustomer();
}

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function testIndexAction(CommunicationTester $i)
public function testIndexAction(CustomerCommunicationTester $i)
{
$url = '/customer/edit?id-customer=' . (int)$this->customer->getIdCustomer();
$i->amOnPage($url);
Expand All @@ -53,11 +53,11 @@ public function testIndexAction(CommunicationTester $i)
}

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function testEditUser(CommunicationTester $i)
public function testEditUser(CustomerCommunicationTester $i)
{
$email = $this->customer->getEmail();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Generated\Shared\DataBuilder\CustomerBuilder;
use Spryker\Zed\Customer\CustomerDependencyProvider;
use Spryker\Zed\Customer\Dependency\Facade\CustomerToMailInterface;
use SprykerTest\Zed\Customer\CommunicationTester;
use SprykerTest\Zed\Customer\CustomerCommunicationTester;

/**
* Auto-generated group annotations
Expand All @@ -28,11 +28,11 @@ class IndexControllerCest
{

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function _before(CommunicationTester $i)
public function _before(CustomerCommunicationTester $i)
{
$i->setDependency(CustomerDependencyProvider::FACADE_MAIL, $this->getMailFacadeMock());
}
Expand All @@ -46,23 +46,23 @@ private function getMailFacadeMock()
}

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function listCustomers(CommunicationTester $i)
public function listCustomers(CustomerCommunicationTester $i)
{
$i->amOnPage('/customer');
$i->seeResponseCodeIs(200);
$i->see('Customers', 'h5');
}

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function addCustomer(CommunicationTester $i)
public function addCustomer(CustomerCommunicationTester $i)
{
$customerTransfer = $this->getCustomerTransfer();

Expand All @@ -85,11 +85,11 @@ public function addCustomer(CommunicationTester $i)
}

/**
* @param \SprykerTest\Zed\Customer\CommunicationTester $i
* @param \SprykerTest\Zed\Customer\CustomerCommunicationTester $i
*
* @return void
*/
public function addCustomerWithoutNameAndFail(CommunicationTester $i)
public function addCustomerWithoutNameAndFail(CustomerCommunicationTester $i)
{
$customerTransfer = $this->getCustomerTransfer();
$email = $customerTransfer->getEmail();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace SprykerTest\Zed\Customer\Presentation;

use SprykerTest\Zed\Customer\CustomerPresentationTester;
use SprykerTest\Zed\Customer\PageObject\CustomerIndexPage;
use SprykerTest\Zed\Customer\PresentationTester;

/**
* Auto-generated group annotations
Expand All @@ -23,11 +23,11 @@ class CustomerIndexCest
{

/**
* @param \SprykerTest\Zed\Customer\PresentationTester $i
* @param \SprykerTest\Zed\Customer\CustomerPresentationTester $i
*
* @return void
*/
public function breadCrumbIsVisible(PresentationTester $i)
public function breadCrumbIsVisible(CustomerPresentationTester $i)
{
$i->amLoggedInUser();
$i->amOnPage(CustomerIndexPage::URL);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace SprykerTest\Zed\Customer;

use Codeception\Actor;
Expand All @@ -24,10 +18,10 @@
*
* @SuppressWarnings(PHPMD)
*/
class BusinessTester extends Actor
class CustomerBusinessTester extends Actor
{

use _generated\BusinessTesterActions;
use _generated\CustomerBusinessTesterActions;

/**
* Define custom actions here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace SprykerTest\Zed\Customer;

use Codeception\Actor;
Expand All @@ -24,19 +18,13 @@
*
* @SuppressWarnings(PHPMD)
*/
class CommunicationTester extends Actor
class CustomerCommunicationTester extends Actor
{

use _generated\CommunicationTesterActions;
use _generated\CustomerCommunicationTesterActions;

// /**
// * @param \Codeception\Scenario $scenario
// */
// public function __construct(Scenario $scenario)
// {
// parent::__construct($scenario);
//
// $this->amZed();
// }
/**
* Define custom actions here
*/

}
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace SprykerTest\Zed\Customer;

use Codeception\Actor;
Expand All @@ -25,10 +19,10 @@
*
* @SuppressWarnings(PHPMD)
*/
class PresentationTester extends Actor
class CustomerPresentationTester extends Actor
{

use _generated\PresentationTesterActions;
use _generated\CustomerPresentationTesterActions;

/**
* @param \Codeception\Scenario $scenario
Expand Down
58 changes: 57 additions & 1 deletion tests/SprykerTest/Zed/Customer/codeception.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,63 @@
namespace: SprykerTest\Zed\Customer
actor: Tester

paths:
tests: .
data: ../../../_data
support: _support
log: ../../../_output

coverage:
enabled: true
remote: false
whitelist: { include: ['../../../../src/*'] }

suites:
Business:
path: Business
class_name: CustomerBusinessTester
modules:
enabled:
- Asserts
- \SprykerTest\Shared\Testify\Helper\Environment
- \SprykerTest\Shared\Testify\Helper\ConfigHelper
- \SprykerTest\Shared\Testify\Helper\LocatorHelper
- \SprykerTest\Shared\Testify\Helper\DependencyHelper
- \SprykerTest\Shared\Propel\Helper\TransactionHelper

Communication:
path: Communication
class_name: CustomerCommunicationTester
modules:
enabled:
- Asserts
- \SprykerTest\Shared\Testify\Helper\Environment
- \SprykerTest\Shared\Testify\Helper\ConfigHelper
- \SprykerTest\Shared\Testify\Helper\LocatorHelper
- \SprykerTest\Shared\Testify\Helper\DependencyHelper
- \SprykerTest\Shared\Propel\Helper\TransactionHelper
- \SprykerTest\Shared\Application\Helper\ZedHelper:
- \SprykerTest\Shared\Testify\Helper\ZedControllerTable:
depends: \SprykerTest\Shared\Testify\Helper\ZedBootstrap
- \SprykerTest\Shared\Testify\Helper\ZedBootstrap:
depends: \SprykerTest\Shared\Testify\Helper\BundleConfig
- \SprykerTest\Shared\Customer\Helper\CustomerDataHelper

Presentation:
path: Presentation
class_name: CustomerPresentationTester
modules:
enabled:
- Asserts
- \SprykerTest\Shared\Testify\Helper\Environment
- \SprykerTest\Shared\Config\Helper\ConfigInit
- \SprykerTest\Shared\Testify\Helper\LocatorHelper
- WebDriver:
url: ''
browser: chrome
window_size: 1920x1080
host: 0.0.0.0
restart: false
- \SprykerTest\Shared\Testify\Helper\DataCleanupHelper
- \SprykerTest\Shared\Application\Helper\ZedHelper
- \SprykerTest\Zed\ZedNavigation\Helper\BreadcrumbHelper
- \SprykerTest\Zed\Gui\Helper\DataTableActionHelper

0 comments on commit 45bb3a6

Please sign in to comment.