Browse files

Merge pull request #565 from stof/invalid_xpath_speedup

Change the xpath for invalid elements to make tests faster
  • Loading branch information...
2 parents 4acb178 + d946a10 commit 8becf96f7df113433ad4030a1ad2114de842d9b0 @stof stof committed May 20, 2014
Showing with 24 additions and 24 deletions.
  1. +24 −24 driver-testsuite/tests/Basic/ErrorHandlingTest.php
View
48 driver-testsuite/tests/Basic/ErrorHandlingTest.php
@@ -33,7 +33,7 @@ public function testCheckNotFoundElement()
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->check('//html/.//invalid');
+ $this->getSession()->getDriver()->check('//html/./invalid');
}
public function testUncheckInvalidElement()
@@ -52,7 +52,7 @@ public function testUncheckNotFoundElement()
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->uncheck('//html/.//invalid');
+ $this->getSession()->getDriver()->uncheck('//html/./invalid');
}
public function testSelectOptionInvalidElement()
@@ -71,7 +71,7 @@ public function testSelectOptionNotFoundElement()
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->selectOption('//html/.//invalid', 'test');
+ $this->getSession()->getDriver()->selectOption('//html/./invalid', 'test');
}
public function testAttachFileInvalidElement()
@@ -90,7 +90,7 @@ public function testAttachFileNotFoundElement()
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->attachFile('//html/.//invalid', __FILE__);
+ $this->getSession()->getDriver()->attachFile('//html/./invalid', __FILE__);
}
public function testSubmitFormInvalidElement()
@@ -109,158 +109,158 @@ public function testSubmitFormNotFoundElement()
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->submitForm('//html/.//invalid');
+ $this->getSession()->getDriver()->submitForm('//html/./invalid');
}
public function testGetTagNameNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->getTagName('//html/.//invalid');
+ $this->getSession()->getDriver()->getTagName('//html/./invalid');
}
public function testGetTextNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->getText('//html/.//invalid');
+ $this->getSession()->getDriver()->getText('//html/./invalid');
}
public function testGetHtmlNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->getHtml('//html/.//invalid');
+ $this->getSession()->getDriver()->getHtml('//html/./invalid');
}
public function testGetOuterHtmlNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->getOuterHtml('//html/.//invalid');
+ $this->getSession()->getDriver()->getOuterHtml('//html/./invalid');
}
public function testGetValueNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->getValue('//html/.//invalid');
+ $this->getSession()->getDriver()->getValue('//html/./invalid');
}
public function testSetValueNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->setValue('//html/.//invalid', 'test');
+ $this->getSession()->getDriver()->setValue('//html/./invalid', 'test');
}
public function testIsSelectedNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->isSelected('//html/.//invalid');
+ $this->getSession()->getDriver()->isSelected('//html/./invalid');
}
public function testIsCheckedNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->isChecked('//html/.//invalid');
+ $this->getSession()->getDriver()->isChecked('//html/./invalid');
}
public function testIsVisibleNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->isVisible('//html/.//invalid');
+ $this->getSession()->getDriver()->isVisible('//html/./invalid');
}
public function testClickNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->click('//html/.//invalid');
+ $this->getSession()->getDriver()->click('//html/./invalid');
}
public function testDoubleClickNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->doubleClick('//html/.//invalid');
+ $this->getSession()->getDriver()->doubleClick('//html/./invalid');
}
public function testRightClickNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->rightClick('//html/.//invalid');
+ $this->getSession()->getDriver()->rightClick('//html/./invalid');
}
public function testGetAttributeNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->getAttribute('//html/.//invalid', 'id');
+ $this->getSession()->getDriver()->getAttribute('//html/./invalid', 'id');
}
public function testMouseOverFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->mouseOver('//html/.//invalid');
+ $this->getSession()->getDriver()->mouseOver('//html/./invalid');
}
public function testFocusFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->focus('//html/.//invalid');
+ $this->getSession()->getDriver()->focus('//html/./invalid');
}
public function testBlurFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->blur('//html/.//invalid');
+ $this->getSession()->getDriver()->blur('//html/./invalid');
}
public function testKeyPressNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->keyPress('//html/.//invalid', 'a');
+ $this->getSession()->getDriver()->keyPress('//html/./invalid', 'a');
}
public function testKeyDownNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->keyDown('//html/.//invalid', 'a');
+ $this->getSession()->getDriver()->keyDown('//html/./invalid', 'a');
}
public function testKeyUpNotFoundElement()
{
$this->getSession()->visit($this->pathTo('/index.html'));
$this->setExpectedException('Behat\Mink\Exception\DriverException');
- $this->getSession()->getDriver()->keyUp('//html/.//invalid', 'a');
+ $this->getSession()->getDriver()->keyUp('//html/./invalid', 'a');
}
}

0 comments on commit 8becf96

Please sign in to comment.