diff --git a/src/OroCRM/Bundle/AccountBundle/Resources/config/datagrid.yml b/src/OroCRM/Bundle/AccountBundle/Resources/config/datagrid.yml index e727acf0874..b1beade143e 100644 --- a/src/OroCRM/Bundle/AccountBundle/Resources/config/datagrid.yml +++ b/src/OroCRM/Bundle/AccountBundle/Resources/config/datagrid.yml @@ -153,16 +153,14 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: a.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' businessUnitId: label: oro.business_unit.label type: choice-business-unit data_name: a.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' createdAt: type: datetime data_name: a.createdAt @@ -402,16 +400,14 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: a.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' businessUnitId: label: oro.business_unit.label type: choice-business-unit data_name: a.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' options: entityHint: account diff --git a/src/OroCRM/Bundle/AccountBundle/Tests/Functional/API/SoapAccountTest.php b/src/OroCRM/Bundle/AccountBundle/Tests/Functional/API/SoapAccountTest.php index 18fb11e8b23..f7489d49ff5 100644 --- a/src/OroCRM/Bundle/AccountBundle/Tests/Functional/API/SoapAccountTest.php +++ b/src/OroCRM/Bundle/AccountBundle/Tests/Functional/API/SoapAccountTest.php @@ -7,6 +7,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class SoapAccountTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/AccountBundle/Tests/Selenium/AclAccountTest.php b/src/OroCRM/Bundle/AccountBundle/Tests/Selenium/AclAccountTest.php index 35e0d4a1108..f06cdccf654 100644 --- a/src/OroCRM/Bundle/AccountBundle/Tests/Selenium/AclAccountTest.php +++ b/src/OroCRM/Bundle/AccountBundle/Tests/Selenium/AclAccountTest.php @@ -36,11 +36,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); - /* @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); + /** @var Users $login */ + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -49,9 +47,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/CallBundle/Tests/Functional/Controller/API/Soap/CallControllerTest.php b/src/OroCRM/Bundle/CallBundle/Tests/Functional/Controller/API/Soap/CallControllerTest.php index e699ae432ed..dde3f88076f 100644 --- a/src/OroCRM/Bundle/CallBundle/Tests/Functional/Controller/API/Soap/CallControllerTest.php +++ b/src/OroCRM/Bundle/CallBundle/Tests/Functional/Controller/API/Soap/CallControllerTest.php @@ -7,6 +7,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class CallControllerTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/CallBundle/Tests/Selenium/AclCallTest.php b/src/OroCRM/Bundle/CallBundle/Tests/Selenium/AclCallTest.php index b4a2f502b17..00933952190 100644 --- a/src/OroCRM/Bundle/CallBundle/Tests/Selenium/AclCallTest.php +++ b/src/OroCRM/Bundle/CallBundle/Tests/Selenium/AclCallTest.php @@ -36,11 +36,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); /** @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -49,9 +47,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/CampaignBundle/Model/EmailCampaignStatisticsConnector.php b/src/OroCRM/Bundle/CampaignBundle/Model/EmailCampaignStatisticsConnector.php index f1f06db85b7..21021119abb 100644 --- a/src/OroCRM/Bundle/CampaignBundle/Model/EmailCampaignStatisticsConnector.php +++ b/src/OroCRM/Bundle/CampaignBundle/Model/EmailCampaignStatisticsConnector.php @@ -91,7 +91,9 @@ public function getStatisticsRecord(EmailCampaign $emailCampaign, $entity) if ($marketingListItem->getId() !== null) { $statisticsRecord = $manager->getRepository($this->entityName) ->findOneBy(['emailCampaign' => $emailCampaign, 'marketingListItem' => $marketingListItem]); - } elseif (!empty($this->statisticRecordsCache[$emailCampaign->getId()][$marketingListItemHash])) { + } + + if (!empty($this->statisticRecordsCache[$emailCampaign->getId()][$marketingListItemHash])) { $statisticsRecord = $this->statisticRecordsCache[$emailCampaign->getId()][$marketingListItemHash]; } diff --git a/src/OroCRM/Bundle/CampaignBundle/Tests/Unit/Model/EmailCampaignStatisticsConnectorTest.php b/src/OroCRM/Bundle/CampaignBundle/Tests/Unit/Model/EmailCampaignStatisticsConnectorTest.php index 8c1513db8d5..6e54b9615f1 100644 --- a/src/OroCRM/Bundle/CampaignBundle/Tests/Unit/Model/EmailCampaignStatisticsConnectorTest.php +++ b/src/OroCRM/Bundle/CampaignBundle/Tests/Unit/Model/EmailCampaignStatisticsConnectorTest.php @@ -108,7 +108,7 @@ public function testGetStatisticsRecordExisting($existing) ->with(['emailCampaign' => $emailCampaign, 'marketingListItem' => $marketingListItem]) ->will($this->returnValue(null)); - $manager->expects($this->exactly(2)) + $manager->expects($this->exactly(1)) ->method('persist') ->with($this->isInstanceOf('OroCRM\Bundle\CampaignBundle\Entity\EmailCampaignStatistics')); } diff --git a/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CaseControllerTest.php b/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CaseControllerTest.php index 70a26d6b711..406a565eea9 100644 --- a/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CaseControllerTest.php +++ b/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CaseControllerTest.php @@ -11,6 +11,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class CaseControllerTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CommentControllerTest.php b/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CommentControllerTest.php index f91bdab82f9..a06691891c0 100644 --- a/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CommentControllerTest.php +++ b/src/OroCRM/Bundle/CaseBundle/Tests/Functional/Controller/Api/Soap/CommentControllerTest.php @@ -7,6 +7,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class CommentControllerTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/CaseBundle/Tests/Selenium/AclCasesTest.php b/src/OroCRM/Bundle/CaseBundle/Tests/Selenium/AclCasesTest.php index 119c5601773..9af816ac3c4 100644 --- a/src/OroCRM/Bundle/CaseBundle/Tests/Selenium/AclCasesTest.php +++ b/src/OroCRM/Bundle/CaseBundle/Tests/Selenium/AclCasesTest.php @@ -36,11 +36,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); /** @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -49,9 +47,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/ContactBundle/Resources/config/datagrid.yml b/src/OroCRM/Bundle/ContactBundle/Resources/config/datagrid.yml index 886a916035c..358703b63a1 100644 --- a/src/OroCRM/Bundle/ContactBundle/Resources/config/datagrid.yml +++ b/src/OroCRM/Bundle/ContactBundle/Resources/config/datagrid.yml @@ -494,15 +494,15 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: c.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' assignedName: type: choice-tree data_name: c.assignedTo - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' enabled: false reportsName: type: string @@ -512,9 +512,7 @@ datagrid: label: oro.business_unit.label type: choice-business-unit data_name: c.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' actions: view: type: navigate @@ -637,16 +635,14 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: a.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' businessUnitId: label: oro.business_unit.label type: choice-business-unit data_name: a.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' createdAt: type: datetime data_name: a.createdAt diff --git a/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactApiTest.php b/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactApiTest.php index 83e231d1cb6..01731494987 100755 --- a/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactApiTest.php +++ b/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactApiTest.php @@ -7,6 +7,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class SoapContactApiTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactGroupApiTest.php b/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactGroupApiTest.php index 0ebba6ce2c0..b2aa4b7bc65 100755 --- a/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactGroupApiTest.php +++ b/src/OroCRM/Bundle/ContactBundle/Tests/Functional/API/SoapContactGroupApiTest.php @@ -7,6 +7,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class SoapContactGroupApiTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/ContactBundle/Tests/Selenium/AclContactTest.php b/src/OroCRM/Bundle/ContactBundle/Tests/Selenium/AclContactTest.php index cfb1b7ce0dc..c7d42c6768b 100644 --- a/src/OroCRM/Bundle/ContactBundle/Tests/Selenium/AclContactTest.php +++ b/src/OroCRM/Bundle/ContactBundle/Tests/Selenium/AclContactTest.php @@ -36,11 +36,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); /** @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -49,9 +47,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/ReportBundle/Resources/config/datagrid.yml b/src/OroCRM/Bundle/ReportBundle/Resources/config/datagrid.yml index 339a99d5280..7e6df1dc9dd 100644 --- a/src/OroCRM/Bundle/ReportBundle/Resources/config/datagrid.yml +++ b/src/OroCRM/Bundle/ReportBundle/Resources/config/datagrid.yml @@ -452,9 +452,9 @@ datagrid: ownerName: type: choice-tree data_name: o.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' inProgressCount: type: number data_name: inProgressCount diff --git a/src/OroCRM/Bundle/SalesBundle/Resources/config/datagrid.yml b/src/OroCRM/Bundle/SalesBundle/Resources/config/datagrid.yml index 210672cd388..551c70360cc 100644 --- a/src/OroCRM/Bundle/SalesBundle/Resources/config/datagrid.yml +++ b/src/OroCRM/Bundle/SalesBundle/Resources/config/datagrid.yml @@ -213,16 +213,14 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: o.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' businessUnitId: label: oro.business_unit.label type: choice-business-unit data_name: o.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' actions: view: type: navigate @@ -563,9 +561,9 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: l.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' contactName: type: string data_name: contactName @@ -574,9 +572,7 @@ datagrid: label: oro.business_unit.label type: choice-business-unit data_name: l.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' sales-funnel-grid: extended_entity_name: %orocrm_sales.salesfunnel.entity.class% @@ -732,16 +728,14 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: salesFunnel.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' businessUnitId: label: oro.business_unit.label type: choice-business-unit data_name: salesFunnel.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' sales-funnel-lead-with-data-channel-grid: extends: sales-funnel-lead-grid @@ -1118,9 +1112,9 @@ datagrid: type: choice-tree data_name: c.owner enabled: false - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' accountName: type: string data_name: accountName diff --git a/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclLeadTest.php b/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclLeadTest.php index e70e150c93e..72ce577a7cf 100644 --- a/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclLeadTest.php +++ b/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclLeadTest.php @@ -41,11 +41,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); /** @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -54,9 +52,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclOpportunityTest.php b/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclOpportunityTest.php index e0d0a08ec5c..dcd0f29bcad 100644 --- a/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclOpportunityTest.php +++ b/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/AclOpportunityTest.php @@ -43,11 +43,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); /** @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -56,9 +54,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/Pages/Opportunity.php b/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/Pages/Opportunity.php index 262a2a65a33..0dc2fb493e8 100644 --- a/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/Pages/Opportunity.php +++ b/src/OroCRM/Bundle/SalesBundle/Tests/Selenium/Pages/Opportunity.php @@ -49,12 +49,16 @@ public function init() ->byXpath("//*[@data-ftid='orocrm_sales_opportunity_form_customerNeed']"); $this->proposedSolution = $this->test ->byXpath("//*[@data-ftid='orocrm_sales_opportunity_form_proposedSolution']"); - $this->closeReason = $this->test->select($this->test - ->byXpath("//*[@data-ftid='orocrm_sales_opportunity_form_closeReason']")); + $this->closeReason = $this->test->select( + $this->test + ->byXpath("//*[@data-ftid='orocrm_sales_opportunity_form_closeReason']") + ); $this->closeRevenue = $this->test ->byXpath("//*[@data-ftid='orocrm_sales_opportunity_form_closeRevenue']"); - $this->closeDate = $this->test->byXpath("//*[@data-ftid='orocrm_sales_opportunity_form_closeDate']/..". - "/following-sibling::input[contains(@class,'datepicker-input')]"); + $this->closeDate = $this->test->byXpath( + "//*[@data-ftid='orocrm_sales_opportunity_form_closeDate']/.." . + "/following-sibling::input[contains(@class,'datepicker-input')]" + ); return $this; } @@ -107,7 +111,7 @@ public function setChannel($channel) "Channel autocomplete doesn't return search value" ); } - $this->test->byXpath("//div[@id='select2-drop']//div[contains(., '{$channel}')]")->click(); + $this->test->byXpath("//div[@id='select2-drop']//div[starts-with(., '{$channel}')]")->click(); return $this; } diff --git a/src/OroCRM/Bundle/TaskBundle/Resources/config/datagrid.yml b/src/OroCRM/Bundle/TaskBundle/Resources/config/datagrid.yml index ed50cd19db9..4466a59da9d 100644 --- a/src/OroCRM/Bundle/TaskBundle/Resources/config/datagrid.yml +++ b/src/OroCRM/Bundle/TaskBundle/Resources/config/datagrid.yml @@ -95,16 +95,14 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: task.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' + className: 'Oro\Bundle\UserBundle\Entity\User' businessUnitId: label: oro.business_unit.label type: choice-business-unit data_name: task.owner - options: - lazy: @oro_organization.provider.filter.busines_unit_choice_tree->shouldBeLazy - data: @?oro_organization.provider.filter.busines_unit_choice_tree->getList + className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit' createdAt: type: datetime data_name: task.createdAt @@ -317,6 +315,5 @@ datagrid: type: choice-tree label: oro.user.owner.label data_name: task.owner - options: - lazy: @oro_user.provider.filter.user_choice_tree->shouldBeLazy - data: @?oro_user.provider.filter.user_choice_tree->getList + autocomplete_alias: users + renderedPropertyName: 'fullName' diff --git a/src/OroCRM/Bundle/TaskBundle/Tests/Functional/Controller/Api/Soap/TaskControllerTest.php b/src/OroCRM/Bundle/TaskBundle/Tests/Functional/Controller/Api/Soap/TaskControllerTest.php index 2840789b938..cce44401671 100644 --- a/src/OroCRM/Bundle/TaskBundle/Tests/Functional/Controller/Api/Soap/TaskControllerTest.php +++ b/src/OroCRM/Bundle/TaskBundle/Tests/Functional/Controller/Api/Soap/TaskControllerTest.php @@ -7,6 +7,7 @@ /** * @outputBuffering enabled * @dbIsolation + * @group soap */ class TaskControllerTest extends WebTestCase { diff --git a/src/OroCRM/Bundle/TaskBundle/Tests/Selenium/AclTasksTest.php b/src/OroCRM/Bundle/TaskBundle/Tests/Selenium/AclTasksTest.php index 11ecc1e51cd..ff5c308788d 100644 --- a/src/OroCRM/Bundle/TaskBundle/Tests/Selenium/AclTasksTest.php +++ b/src/OroCRM/Bundle/TaskBundle/Tests/Selenium/AclTasksTest.php @@ -36,11 +36,9 @@ public function testCreateUser($role) { $username = 'User_'.mt_rand(); - $login = $this->login(); + $page = $this->login()->openUsers('Oro\Bundle\UserBundle')->add(); /** @var Users $login */ - $login->openUsers('Oro\Bundle\UserBundle') - ->add() - ->assertTitle('Create User - Users - User Management - System') + $page->assertTitle('Create User - Users - User Management - System') ->setUsername($username) ->enable() ->setOwner('Main') @@ -49,9 +47,11 @@ public function testCreateUser($role) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array('Label_' . $role)) - ->setBusinessUnit() - ->setOrganization('OroCRM') + ->setRoles(['Label_' . $role]); + if ($page->hasBusinessUnitOrganizationChoice()) { + $page->setBusinessUnitOrganization(['OroCRM']); + } + $page->setBusinessUnit() ->uncheckInviteUser() ->save() ->assertMessage('User saved') diff --git a/src/OroCRM/Bundle/TestFrameworkBundle/Tests/Selenium/Acl/AclTest.php b/src/OroCRM/Bundle/TestFrameworkBundle/Tests/Selenium/Acl/AclTest.php index af01d9c8825..3789f324fc2 100644 --- a/src/OroCRM/Bundle/TestFrameworkBundle/Tests/Selenium/Acl/AclTest.php +++ b/src/OroCRM/Bundle/TestFrameworkBundle/Tests/Selenium/Acl/AclTest.php @@ -64,9 +64,9 @@ public function testCreateUser($roleName) ->setFirstName('First_'.$username) ->setLastName('Last_'.$username) ->setEmail($username.'@mail.com') - ->setRoles(array($roleName)) + ->setRoles([$roleName]) + ->setBusinessUnitOrganization(['OroCRM']) ->setBusinessUnit() - ->setOrganization('OroCRM') ->uncheckInviteUser() ->save() ->assertMessage('User saved')