public function testSuperUserCustomDateNotRequiredFieldWalkthroughForAccountsModule() { $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); //Test create field list. $this->resetPostArray(); $this->setGetArray(array('moduleClassName' => 'AccountsModule')); //View creation screen, then create custom field for date custom field type. $this->createDateNotRequiredCustomFieldByModule('AccountsModule', 'datenotreq'); $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountEditAndDetailsView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountEditAndDetailsViewLayoutWithAllCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout, 'LayoutPanelsTypeForm' => array('type' => FormLayout::PANELS_DISPLAY_TYPE_ALL))); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); $superAccountId = self::getModelIdByModelNameAndName('Account', 'superAccount'); $this->setGetArray(array('modalTransferInformation' => array('sourceIdFieldId' => 'x', 'sourceNameFieldId' => 'y', 'modalId' => 'z'))); $this->resetPostArray(); $this->runControllerWithNoExceptionsAndGetContent('accounts/default/modalList'); $this->setGetArray(array('selectAll' => '1')); $this->resetPostArray(); $this->runControllerWithNoExceptionsAndGetContent('accounts/default/massEdit'); }
/** * @depends testSuperUserCustomFieldsWalkthroughForAccountsModule */ public function testSuperUserAddCustomFieldsToLayoutsForAccountsModule() { $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); //Add custom fields to AccountEditAndDetailsView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountEditAndDetailsView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountEditAndDetailsViewLayoutWithAllCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout, 'LayoutPanelsTypeForm' => array('type' => FormLayout::PANELS_DISPLAY_TYPE_ALL))); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountsSearchView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountsSearchView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountsSearchViewLayoutWithAllCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountsModalSearchView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountsModalSearchView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountsSearchViewLayoutWithAllCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountsListView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountsListView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountsListViewLayoutWithAllStandardAndCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountsRelatedListView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountsRelatedListView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountsListViewLayoutWithAllStandardAndCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountsModalListView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountsModalListView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountsListViewLayoutWithAllStandardAndCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountsMassEditView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountsMassEditView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountsMassEditViewLayoutWithAllStandardAndCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertContains('Layout saved successfully', $content); //Add all fields to AccountConvertToView. $this->setGetArray(array('moduleClassName' => 'AccountsModule', 'viewClassName' => 'AccountConvertToView')); $layout = AccountsDesignerWalkthroughHelperUtil::getAccountEditAndDetailsViewLayoutWithAllCustomFieldsPlaced(); $this->setPostArray(array('save' => 'Save', 'layout' => $layout)); $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/LayoutEdit'); $this->assertFalse(strpos($content, 'Layout saved successfully') === false); }