/** * Activates PayPal, adds configuration, activates mobile theme. * * @param string $sTestSuitePath * * @throws Exception */ public function addTestData($sTestSuitePath) { parent::addTestData($sTestSuitePath); $this->open(shopURL . "admin"); $this->loginAdminForModule("Extensions", "Modules"); $this->openListItem("PayPal"); if ($this->isElementPresent('module_activate')) { $this->clickAndWait("module_activate"); } $this->callShopSC("oxConfig", null, null, array('sOEPayPalTransactionMode' => array('type' => 'select', 'value' => 'Authorization', 'module' => 'module:oepaypal'), 'sOEPayPalUsername' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalUsername'), 'module' => 'module:oepaypal'), 'sOEPayPalPassword' => array('type' => 'password', 'value' => $this->getLoginDataByName('sOEPayPalPassword'), 'module' => 'module:oepaypal'), 'sOEPayPalSignature' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalSignature'), 'module' => 'module:oepaypal'), 'blOEPayPalSandboxMode' => array('type' => 'bool', 'value' => 1, 'module' => 'module:oepaypal'), 'sOEPayPalSandboxUsername' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalSandboxUsername'), 'module' => 'module:oepaypal'), 'sOEPayPalSandboxPassword' => array('type' => 'password', 'value' => $this->getLoginDataByName('sOEPayPalSandboxPassword'), 'module' => 'module:oepaypal'), 'sOEPayPalSandboxSignature' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalSandboxSignature'), 'module' => 'module:oepaypal'))); $this->selectMenu("Extensions", "Modules"); if ($this->isElementPresent("link=OXID eShop theme switch")) { $this->openListItem("link=OXID eShop theme switch"); $this->openTab("Settings"); $this->click("//b[text()='General parameters']"); $this->type("//input[@name='confstrs[sOEThemeSwitcherMobileTheme]']", 'some_unexisting_theme'); $this->clickAndWait("//input[@name='save']"); $this->openTab("Overview"); if ($this->isElementPresent('module_activate')) { $this->clickAndWait("module_activate"); } $this->selectMenu("Extensions", "Themes"); $this->openListItem("link=OXID eShop mobile theme"); if ($this->isElementPresent("//input[@value='Activate']")) { $this->clickAndWait("//input[@value='Activate']"); } } }
/** * Activates PayPal and adds configuration * * @param string $sTestSuitePath * * @throws Exception */ public function addTestData($sTestSuitePath) { parent::addTestData($sTestSuitePath); $this->open(shopURL . "admin"); $this->loginAdminForModule("Extensions", "Modules"); $this->openListItem("PayPal"); if ($this->isElementPresent('module_activate')) { $this->clickAndWait("module_activate"); } $this->callShopSC("oxConfig", null, null, array('sOEPayPalTransactionMode' => array('type' => 'select', 'value' => 'Authorization', 'module' => 'module:oepaypal'), 'sOEPayPalUsername' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalUsername'), 'module' => 'module:oepaypal'), 'sOEPayPalPassword' => array('type' => 'password', 'value' => $this->getLoginDataByName('sOEPayPalPassword'), 'module' => 'module:oepaypal'), 'sOEPayPalSignature' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalSignature'), 'module' => 'module:oepaypal'), 'blOEPayPalSandboxMode' => array('type' => 'bool', 'value' => 1, 'module' => 'module:oepaypal'), 'sOEPayPalSandboxUsername' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalSandboxUsername'), 'module' => 'module:oepaypal'), 'sOEPayPalSandboxPassword' => array('type' => 'password', 'value' => $this->getLoginDataByName('sOEPayPalSandboxPassword'), 'module' => 'module:oepaypal'), 'sOEPayPalSandboxSignature' => array('type' => 'str', 'value' => $this->getLoginDataByName('sOEPayPalSandboxSignature'), 'module' => 'module:oepaypal'))); }