0
0
Fork 0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2025-02-06 23:10:03 +00:00
salesagility_SuiteCRM/tests/_support/Step/Acceptance/Maps.php
Connor Shea 154c5a43a0 Add a new visitPage helper for tests.
The goal of this helper is to make it easier to navigate through the
site without needing to interact with as much of the site.

If this is used across the entire acceptance test suite, it could save a decent amount of time.

Remove gotoMaps() and replace uses of it with the visitPage helper.
2019-06-26 11:52:51 -06:00

39 lines
1.1 KiB
PHP

<?php
namespace Step\Acceptance;
class Maps extends \AcceptanceTester
{
/**
* Create map
*
* @param $name
*/
public function createMap($name, $account)
{
$I = new EditView($this->getScenario());
$ListView = new ListView($this->getScenario());
$Sidebar = new SideBar($this->getScenario());
$faker = $this->getFaker();
$I->see('Add New Map', '.actionmenulink');
$Sidebar->clickSideBarAction('Add New Map');
$I->waitForEditViewVisible();
$I->fillField('#name', $name);
$I->fillField('#distance', $faker->randomDigit());
$I->fillField('#description', $faker->text());
$I->selectOption('#unit_type', 'Kilometers');
$I->selectOption('#module_type', 'Contacts');
$I->selectOption('#parent_type', 'Account');
$I->fillField('#parent_name', $account);
$I->seeElement('#assigned_user_name');
$I->seeElement('#assigned_user_name');
$I->wait(10);
$I->clickSaveButton();
$ListView->waitForListViewVisible();
}
}