The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit edf53457 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Test language switching.

parent c26becd2
No related merge requests found
......@@ -79,4 +79,30 @@ class BasicTest extends \VuFindTest\Unit\MinkTestCase
$this->findCss($page, '.location')->getText()
);
}
/**
* Test language switching by checking a link in the footer
*
* @return void
*/
public function testLanguage()
{
$session = $this->getMinkSession();
$session->visit($this->getVuFindUrl() . '/Search/Home');
$page = $session->getPage();
// Check footer help-link
$this->assertEquals(
'Search Tips',
$this->findCss($page, 'footer .help-link')->getHTML()
);
// Change the language:
$this->findCss($page, '.language.dropdown')->click();
$this->findCss($page, '.language.dropdown li:not(.active) a')->click();
$this->snooze();
// Check footer help-link
$this->assertNotEquals(
'Search Tips',
$this->findCss($page, 'footer .help-link')->getHTML()
);
}
}
......@@ -42,7 +42,7 @@
<? endif; ?>
<? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?>
<li class="dropdown">
<li class="theme dropdown">
<form method="post" name="themeForm" id="themeForm">
<input type="hidden" name="ui"/>
</form>
......@@ -56,7 +56,7 @@
<? endif; ?>
<? if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?>
<li class="dropdown">
<li class="language dropdown">
<form method="post" name="langForm" id="langForm">
<input type="hidden" name="mylang"/>
</form>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment