Skip to content

Commit

Permalink
get ajaxtest from master
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Jan 12, 2018
1 parent a7a00e1 commit af3c24c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/acceptance/surveys/AjaxModeTest.php
Expand Up @@ -28,6 +28,10 @@ public static function setupBeforeClass()
*/
public function testAjaxModeRecordsAnswer()
{
// TODO: This works when run individually, but not
// as part of the test suit. Screenshot shows it's
// stuck on welcome page.
$this->markTestSkipped();
// Get questions.
$survey = \Survey::model()->findByPk(self::$surveyId);
$questionObjects = $survey->groups[0]->questions;
Expand Down Expand Up @@ -59,6 +63,11 @@ public function testAjaxModeRecordsAnswer()
self::$webDriver->get($url);
$nextButton = self::$webDriver->findElement(WebDriverBy::id('ls-button-submit'));
$nextButton->click();
sleep(1);
// TODO: Temporary, test fails here (but only on fresh install).
$screenshot = self::$webDriver->takeScreenshot();
$filename = self::$screenshotsFolder.'/AjaxModeTest.png';
file_put_contents($filename, $screenshot);
// Find yes-no radio buttons, click "Yes".
$items = self::$webDriver->findElements(WebDriverBy::cssSelector('ul.yesno-button li'));
$this->assertCount(3, $items, 'Three radio buttons for yes-no question');
Expand Down

0 comments on commit af3c24c

Please sign in to comment.