Skip to content

Commit

Permalink
Dev: Debug language change test
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 19, 2018
1 parent 92e05a0 commit 4776b1e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ before_script:

script:
# Run tests.
- DOMAIN=localhost phpunit
- DOMAIN=localhost phpunit --group langchang
10 changes: 10 additions & 0 deletions tests/LimeSurveyWebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,14 @@ public function clickButton($id)
$button = $this->findElement(WebDriverBy::id($id));
$button->click();
}

/**
* Debug method to dump all text in <body></body>.
* @return void
*/
public function dumpBody()
{
$body = $this->findElement(WebDriverBy::tagName('body'));
var_dump('body text = ' . $body->getText());
}
}
4 changes: 4 additions & 0 deletions tests/surveys/LanguageChangerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ public function testBasic()
// Open survey.
$web->get($url);

$web->dumpBody();

// Change to Deutsch.
$web->changeLanguageSelect('de');

$web->dumpBody();

sleep(2);

// Check so that we see German text.
Expand Down

0 comments on commit 4776b1e

Please sign in to comment.