コード例 #1
0
ファイル: CreateLeadTest.php プロジェクト: antrampa/crm
 /**
  * @param Login $login
  * @return string
  */
 protected function createChannel(Login $login)
 {
     $channelName = 'Channel_' . mt_rand();
     /** @var Channels $login */
     $login->openChannels('OroCRM\\Bundle\\ChannelBundle')->assertTitle('All - Channels - System')->add()->assertTitle('Create Channel - Channels - System')->setType('B2B')->setName($channelName)->setStatus('Active')->save()->assertMessage('Channel saved');
     return $channelName;
 }
コード例 #2
0
 /**
  * @param $userName
  * @param $password
  *
  * @return Login
  */
 public function login($userName = null, $password = null, $args = [])
 {
     /** @var Login $login */
     $login = new Login($this, $args);
     $login->setUsername($userName ? $userName : PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_LOGIN)->setPassword($password ? $password : PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PASS)->submit();
     return $login;
 }
コード例 #3
0
ファイル: AclOpportunityTest.php プロジェクト: dairdr/crm
 /**
  * @param  Login  $login
  * @return string
  */
 protected function createAccount(Login $login)
 {
     $accountName = 'Account_' . mt_rand();
     /** @var Accounts $login */
     $login->openAccounts('OroCRM\\Bundle\\AccountBundle')->add()->setAccountName($accountName)->setOwner('admin')->save();
     return $accountName;
 }
コード例 #4
0
 /**
  * @param Login $login
  * @param string $account
  * @param string $channel
  * @return string
  */
 protected function createB2BCustomer(Login $login, $account, $channel)
 {
     $name = 'B2BCustomer_' . mt_rand();
     /** @var B2BCustomers $login */
     $login->openB2BCustomers('OroCRM\\Bundle\\SalesBundle')->add()->setName($name)->setOwner('admin')->setAccount($account)->setChannel($channel)->save();
     return $name;
 }
コード例 #5
0
ファイル: AclTest.php プロジェクト: antrampa/crm
 /**
  * @param $username
  * @depends testCreateUser
  * @depends testEditRole
  */
 public function testViewAccountsContacts($username)
 {
     $login = new Login($this);
     $login->setUsername($username)->setPassword('123123q')->submit();
     /** @var Accounts $login */
     $login->openAccounts('OroCRM\\Bundle\\AccountBundle')->assertTitle('Accounts - Customers')->assertElementNotPresent("//div[@class='container-fluid']//a[@title='Create Account']");
     /** @var Contacts $login */
     $login->openContacts('OroCRM\\Bundle\\ContactBundle')->assertTitle('Contacts - Customers')->assertElementNotPresent("//div[@class='container-fluid']//a[@title='Create Contact']");
     /** @var ContactGroups $login */
     $login->openContactGroups('OroCRM\\Bundle\\ContactBundle')->assertTitle('Contact Groups - System')->assertElementNotPresent("//div[@class='container-fluid']//a[@title='Create Contact Group']");
     /** @var AclCheck $login */
     $login->openAclCheck('Oro\\Bundle\\SecurityBundle')->assertAcl('account/create')->assertAcl('contact/create')->assertAcl('contact/group/create')->assertAcl('contact/group/create');
 }
コード例 #6
0
ファイル: ContactPaginationTest.php プロジェクト: abipit/crm
 /**
  * @param Login $login
  * @param $contactData
  */
 public function createContact(Login $login, $contactData)
 {
     /** @var Contacts $login */
     $login->openContacts('OroCRM\\Bundle\\ContactBundle')->add()->setFirstName($contactData['firstName'])->setLastName($contactData['secondName'])->setOwner('admin')->setEmail($contactData['email'])->save()->assertMessage('Contact saved');
 }
コード例 #7
0
ファイル: SeleniumContext.php プロジェクト: xamin123/platform
 /**
  * @Given /^Login as an existing "([^"]*)" user and "([^"]*)" password$/
  */
 public function loginAsAnExistingUserAndPassword($user, $password)
 {
     $login = new Login($this);
     $login->setUsername($user)->setPassword($password)->submit()->assertTitle('Dashboard');
 }