for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Behat\Page\Admin\Customer;
use Sylius\Behat\Page\ElementNotFoundException;
use Sylius\Behat\Page\SymfonyPage;
/**
* @author Magdalena Banasiak <[email protected]>
class ShowPage extends SymfonyPage implements ShowPageInterface
{
* {@inheritdoc}
public function isRegistered()
$username = $this->getDocument()->find('css', '#username')->getText();
return '' != $username;
}
public function deleteAccount()
$deleteButton = $this->getDocument()->find('css', '.delete-action-form');
if (null === $deleteButton) {
throw new ElementNotFoundException('Element not found.');
$deleteButton->press();
$confirmationModal = $this->getDocument()->find('css', '#confirmation-modal-confirm');
$this->waitForModalToAppear($confirmationModal);
$confirmationModal->find('css', 'a:contains("Delete")')->press();
protected function getRouteName()
return 'sylius_backend_customer_show';