Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ php:
- 5.4
- 5.5

env:
- CODECEPT_VERSION="1"
- CODECEPT_VERSION="2"

matrix:
exclude:
- php: 5.3
env: CODECEPT_VERSION="2"

before_script:
- printf "\n" | pecl install imagick
- wget http://selenium.googlecode.com/files/selenium-server-standalone-2.35.0.jar
- java -jar selenium-server-standalone-2.35.0.jar -port 4444 >/dev/null 2>&1 &
- cd test/integration/
- mkdir tests/_log
- php codecept.phar build
- php codecept${CODECEPT_VERSION}.phar build

script: php codecept.phar run -d
script: php codecept${CODECEPT_VERSION}.phar run -d
7 changes: 7 additions & 0 deletions module/VisualCeption.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ private function getCoordinates ($elementId)
private function getScreenshotName ($identifier)
{
$caseName = str_replace('Cept.php', '', $this->test->getFileName());

$search = array('/', '\\');
$replace = array('.', '.');
$caseName = str_replace($search, $replace, $caseName);

return $caseName . '.' . $identifier . '.png';
}

Expand Down Expand Up @@ -263,6 +268,8 @@ private function compare ($identifier)
*/
private function compareImages ($image1, $image2)
{
$this->debug("Trying to compare $image1 with $image2");

$imagick1 = new \Imagick($image1);
$imagick2 = new \Imagick($image2);

Expand Down
File renamed without changes.
Binary file added test/integration/codecept2.phar
Binary file not shown.
11 changes: 11 additions & 0 deletions test/integration/tests/acceptance/SimpleCept.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

$I = new WebGuy($scenario);

$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->seeVisualChanges("SimpleBlock", "#theblock");

// the test has to be called twice for comparison on the travis server
$I->wait(2);
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->seeVisualChanges("SimpleBlock", "#theblock");
4 changes: 2 additions & 2 deletions test/integration/tests/acceptance/TimeComparisonCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public function seeVisualChanges (WebGuy $I, $scenario)
public function dontSeeVisualChanges (WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/dontSeeVisualChanges.php");
$I->dontSeeVisualChanges("block", "#theblock");
$I->dontSeeVisualChanges("block2", "#theblock");

// the test has to be called twice for comparison on the travis server
$I->amOnPage("/VisualCeption/dontSeeVisualChanges.php");
$I->dontSeeVisualChanges("block", "#theblock");
$I->dontSeeVisualChanges("block2", "#theblock");
}

}
Loading