コード例 #1
0
 /**
  * @When /^I navigate to "([^"]*)" page$/
  *
  * @param $page
  */
 public function navigateToPage($page)
 {
     $testCase = new Mage_Selenium_TestCase();
     $testCase->prepareBrowserSession();
     //        $testCase->loginAdminUser();
     $testCase->navigate($page);
 }
コード例 #2
0
ファイル: SitesTest.php プロジェクト: ridhoq/mxpi-twitter
 protected function assertPreConditions()
 {
     parent::assertPreConditions();
     $this->addParameter('id', '0');
 }
コード例 #3
0
 /**
  * Retrieves current Page's data from UIMap
  *
  * @return Mage_Selenium_Uimap_Page|null
  */
 public function getCurrentLocationUimapPage()
 {
     $mca = Mage_Selenium_TestCase::_getMcaFromCurrentUrl($this->_applicationHelper->getBaseUrl(), $this->getLocation());
     $page = $this->_uimapHelper->getUimapPageByMca($this->getArea(), $mca, $this->_paramsHelper);
     if (!$page) {
         $this->fail('Can\'t find page in area "' . $this->getArea() . '" for mca "' . $mca . '"');
     }
     return $page;
 }
コード例 #4
0
ファイル: TestCase.php プロジェクト: ridhoq/mxpi-twitter
 public function setUp()
 {
     parent::setUp();
     $this->setUpBeforeEachTest();
     self::$_lastXMessageId = $this->_getLatestXMessageId();
 }
コード例 #5
0
ファイル: TestCase.php プロジェクト: venkateshcontus/taf
 /**
  * Removes all added messages
  *
  * @param null|string $type
  */
 public function clearMessages($type = null)
 {
     if ($type && array_key_exists($type, self::$_messages)) {
         unset(self::$_messages[$type]);
     } elseif ($type == null) {
         self::$_messages = null;
     }
 }
コード例 #6
0
ファイル: Config.php プロジェクト: ridhoq/mxpi-twitter
 /**
  * Load config for browsers
  * @return Mage_Selenium_Helper_Config
  */
 protected function _loadConfigBrowsers()
 {
     $config = $this->getConfigValue('browsers');
     if (array_key_exists(self::DEFAULT_BROWSER, $config)) {
         if (is_array($config[self::DEFAULT_BROWSER])) {
             $this->_configBrowsers[self::DEFAULT_BROWSER] = $config[self::DEFAULT_BROWSER];
         } else {
             unset($config[self::DEFAULT_BROWSER]);
             $this->_configBrowsers = $config;
         }
     } else {
         $this->_configBrowsers = $config;
     }
     Mage_Selenium_TestCase::$browsers = $this->_configBrowsers;
     return $this;
 }
コード例 #7
0
ファイル: TestCaseTest.php プロジェクト: venkateshcontus/taf
 /**
  * @covers Mage_Selenium_TestCase::setDefaultScreenshotPath
  * @covers Mage_Selenium_TestCase::getDefaultScreenshotPath
  */
 public function testSetGetDefaultScreenshotPath()
 {
     $inst = new Mage_Selenium_TestCase();
     $inst->setDefaultScreenshotPath('d:\\Temp');
     $path = $inst->getDefaultScreenshotPath();
     $this->assertEquals('d:\\Temp', $path);
     $this->assertInternalType('string', $path);
     $inst->setDefaultScreenshotPath('d:\\Temp\\');
     $path = $inst->getDefaultScreenshotPath();
     $this->assertEquals('d:\\Temp\\', $path);
 }
コード例 #8
0
ファイル: TestCaseTest.php プロジェクト: ridhoq/mxpi-twitter
 /**
  * @covers Mage_Selenium_TestCase::generate
  */
 public function testGenerateModifierEmail()
 {
     $instance = new Mage_Selenium_TestCase();
     $this->assertTrue((bool) filter_var($instance->generate('email', 20, 'valid'), FILTER_VALIDATE_EMAIL));
     $this->assertFalse((bool) filter_var($instance->generate('email', 20, 'invalid'), FILTER_VALIDATE_EMAIL));
 }