mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-02-07 07:19:11 +00:00
![Dillon-Brown](/assets/img/avatar_default.png)
# Conflicts: # .travis.yml # README.md # data/SugarBean.php # include/MVC/View/SugarView.php # include/Smarty/plugins/function.fetch.php # include/SugarFields/Fields/File/SugarFieldFile.php # include/SugarObjects/templates/person/Person.php # include/SugarXHprof/SugarXHprof.php # include/SugarXHprof/xhprof_lib/utils/xhprof_runs.php # include/nusoap/class.nusoap_base.php # include/nusoap/class.soap_transport_http.php # include/nusoap/class.soapclient.php # include/nusoap/class.wsdl.php # include/nusoap/class.wsdlcache.php # include/parsecsv.lib.php # include/social/get_feed_data.php # include/tcpdf/barcodes.php # lib/Robo/Plugin/Commands/CodeCoverageCommands.php # modules/AOD_Index/Lib/Zend/Search/Lucene/Storage/File.php # modules/AOR_Charts/lib/pChart/class/pBarcode128.class.php # modules/AOR_Charts/lib/pChart/class/pBarcode39.class.php # modules/AOR_Charts/lib/pChart/class/pCache.class.php # modules/AOR_Charts/lib/pChart/class/pData.class.php # modules/AOR_Charts/lib/pChart/class/pDraw.class.php # modules/AOR_Charts/lib/pChart/class/pImage.class.php # modules/AOR_Charts/lib/pChart/class/pSpring.class.php # modules/AOS_PDF_Templates/templateParser.php # modules/AOS_Products/AOS_Products.php # modules/AOW_Actions/FormulaCalculator.php # modules/AOW_WorkFlow/aow_utils.php # modules/Trackers/store/DatabaseStore.php # phpcs.xml # service/core/REST/SugarRest.php # service/example/Rest_Proxy.php # suitecrm_version.php # tests/SuiteCRM/Test/SuitePHPUnit_Framework_TestCase.php # tests/unit/phpunit/data/SugarBeanTest.php # tests/unit/phpunit/include/MVC/Controller/SugarControllerTest.php # tests/unit/phpunit/include/MVC/SugarApplicationTest.php # tests/unit/phpunit/include/MVC/View/SugarViewTest.php # tests/unit/phpunit/include/MVC/View/views/view.editTest.php # tests/unit/phpunit/include/utils/securityUtilsTest.php # tests/unit/phpunit/modules/ACLActions/ACLActionTest.php # tests/unit/phpunit/modules/Emails/EmailTest.php # tests/unit/phpunit/modules/ProspectLists/ProspectListTest.php # tests/unit/phpunit/modules/SchedulersJobs/SchedulersJobTest.php # tests/unit/phpunit/modules/UserPreferences/UserPreferenceTest.php # themes/SuiteP/css/Dawn/style.css # themes/SuiteP/css/Day/style.css # themes/SuiteP/css/Dusk/style.css # themes/SuiteP/css/Night/style.css
112 lines
3.6 KiB
PHP
112 lines
3.6 KiB
PHP
<?php
|
|
|
|
use Faker\Generator;
|
|
|
|
class HistoryCest
|
|
{
|
|
/**
|
|
* @var Generator $fakeData
|
|
*/
|
|
protected $fakeData;
|
|
|
|
/**
|
|
* @var integer $fakeDataSeed
|
|
*/
|
|
protected $fakeDataSeed;
|
|
|
|
/**
|
|
* @param AcceptanceTester $I
|
|
*/
|
|
public function _before(AcceptanceTester $I)
|
|
{
|
|
if (!$this->fakeData) {
|
|
$this->fakeData = Faker\Factory::create();
|
|
}
|
|
|
|
$this->fakeDataSeed = mt_rand(0, 2048);
|
|
$this->fakeData->seed($this->fakeDataSeed);
|
|
}
|
|
|
|
|
|
/**
|
|
* @param \AcceptanceTester $I
|
|
* @param \Step\Acceptance\ListView $listView
|
|
* @param \Step\Acceptance\AccountsTester $accounts
|
|
* @param \Step\Acceptance\Calls $calls
|
|
* @param \Step\Acceptance\NavigationBarTester $NavigationBar
|
|
*
|
|
* As a user I want to see the due date on the activities module
|
|
*/
|
|
public function testSeeDueDateSubpanelView(
|
|
\AcceptanceTester $I,
|
|
\Step\Acceptance\ListView $listView,
|
|
\Step\Acceptance\DetailView $detailView,
|
|
\Step\Acceptance\AccountsTester $accounts,
|
|
\Step\Acceptance\Calls $calls,
|
|
\Step\Acceptance\NavigationBarTester $NavigationBar
|
|
) {
|
|
$I->wantTo('See the due date field on Account History subpanel');
|
|
|
|
// Navigate to accounts list-view
|
|
$I->loginAsAdmin();
|
|
$I->visitPage('Accounts', 'index');
|
|
$listView->waitForListViewVisible();
|
|
|
|
// Create account
|
|
$this->fakeData->seed($this->fakeDataSeed);
|
|
$account_name = 'Test_'. $this->fakeData->company();
|
|
$accounts->createAccount($account_name);
|
|
|
|
// Create a Call and relate to an Account
|
|
$NavigationBar->clickAllMenuItem('Calls');
|
|
|
|
// Create call
|
|
$this->fakeData->seed($this->fakeDataSeed);
|
|
$callName = 'Test_'. $this->fakeData->company();
|
|
$calls->createCallRelateModule($callName, $account_name, "Account", array("status" => "Held"));
|
|
|
|
// Navigate to the Account's Detail View and confirm the due date contains data
|
|
$I->visitPage('Accounts', 'index');
|
|
$listView->waitForListViewVisible();
|
|
|
|
// Select record from list view
|
|
$listView->clickFilterButton();
|
|
$listView->click('Quick Filter');
|
|
$listView->fillField('#name_basic', $account_name);
|
|
$listView->click('Search', '.submitButtons');
|
|
$listView->waitForListViewVisible();
|
|
$listView->clickNameLink($account_name);
|
|
|
|
//Click on History subpanel
|
|
$I->waitForElementVisible(['id'=>'subpanel_title_history']);
|
|
$I->click(['id'=>'subpanel_title_history']);
|
|
$I->waitForElementVisible('#History_createnoteorattachment_button');
|
|
$I->expect('the due date is visible');
|
|
$I->seeInSource('01/19/2038');
|
|
|
|
// Delete the Account
|
|
$detailView->clickActionMenuItem('Delete');
|
|
$detailView->acceptPopup();
|
|
$listView->waitForListViewVisible();
|
|
|
|
// Delete the Call
|
|
$NavigationBar->clickAllMenuItem('Calls');
|
|
$listView->waitForListViewVisible();
|
|
|
|
// Select record from list view
|
|
$I->wait(3);
|
|
$listView->clickFilterButton();
|
|
$listView->click('Quick Filter');
|
|
$listView->fillField('#name_basic', $callName);
|
|
$listView->click('Search', '.submitButtons');
|
|
$listView->waitForListViewVisible();
|
|
$listView->clickNameLink($callName);
|
|
|
|
// Delete record from detail view
|
|
$detailView->waitForDetailViewVisible();
|
|
|
|
$detailView->clickActionMenuItem('Delete');
|
|
$detailView->acceptPopup();
|
|
$listView->waitForListViewVisible();
|
|
}
|
|
}
|