Skip to content

Commit

Permalink
Refs #4087, adding new screenshot tests for visitor profile, transiti…
Browse files Browse the repository at this point in the history
…ons and user settings admin page.
  • Loading branch information
Benaka Moorthi committed Oct 2, 2013
1 parent ea35e5e commit 07d058f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tests/PHPUnit/TestingEnvironment.php
Expand Up @@ -46,6 +46,9 @@ public static function addHooks()
$jsFiles[] = 'tests/resources/screenshot-override/jquery.waitforimages.js';
$jsFiles[] = 'tests/resources/screenshot-override/override.js';
});

Piwik_AddAction('Request.dispatch', function () {
\Piwik\Access::setSingletonInstance(null);
\Piwik\Access::getInstance();
});
}
}
2 changes: 1 addition & 1 deletion tests/PHPUnit/UI
Submodule UI updated from a209d6 to c4995b
5 changes: 4 additions & 1 deletion tests/PHPUnit/UITest.php
Expand Up @@ -41,6 +41,8 @@ public static function setUpBeforeClass()
}

parent::setUpBeforeClass();

DbHelper::createAnonymousUser();

AssetManager::removeMergedAssets();

Expand Down Expand Up @@ -135,12 +137,13 @@ private static function runCaptureProgram($urlInfo)

protected function compareScreenshot($name, $urlQuery)
{
list($expectedPath, $processedPath) = self::getProcessedAndExpectedScreenshotPaths($name);
list($processedPath, $expectedPath) = self::getProcessedAndExpectedScreenshotPaths($name);

$processed = file_get_contents($processedPath);

if (!file_exists($expectedPath)) {
$this->markTestIncomplete("expected screenshot for processed '$processedPath' is missing");
return;
}

$expected = file_get_contents($expectedPath);
Expand Down

0 comments on commit 07d058f

Please sign in to comment.