Skip to content

Commit

Permalink
testAdminClickViews
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Jan 2, 2018
1 parent b8ebd68 commit d5502bc
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions tests/controllers/AdminViewsTest.php
Expand Up @@ -175,8 +175,6 @@ public function testParticipantsViews($name,$view){
* @dataProvider addAdminClickViews
*/
public function testAdminClickViews($name,$view){
$this->markTestSkipped();
return;

$user = self::$user;
if(isset($view['username'])){
Expand All @@ -187,25 +185,18 @@ public function testAdminClickViews($name,$view){
$url = $this->getUrl($view);
$this->openView($url);

try{
$clickable = self::findAndClick(WebDriverBy::id($view['clickId']),10);
$element = $this->findViewTag($name,10);
$this->assertNotEmpty(
$element,
sprintf(
'FAILED viewing %s on route %s, full url %s',
$name,
(isset($view['route']) ? $view['route'] : ''),
$this->url
)
);

}catch (\Exception $e){
$screenshot = self::$webDriver->takeScreenshot();
$filename = self::$screenshotsFolder .'/'.$name.'.png';
file_put_contents($filename, $screenshot);
throw $e;
}
self::findAndClick(WebDriverBy::id($view['clickId']),10);
$element = $this->findViewTag($name,10);
$this->assertNotEmpty(
$element,
sprintf(
'FAILED viewing %s on route %s, full url %s',
$name,
(isset($view['route']) ? $view['route'] : ''),
$this->url
)
);

}

}

0 comments on commit d5502bc

Please sign in to comment.