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

Fix tests broken by removal of redundant title on Log Out.

parent 83c1f118
No related merge requests found
...@@ -159,7 +159,7 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase ...@@ -159,7 +159,7 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase
$this->snooze(); $this->snooze();
$this->findCss($page, '.resultItemLine1 a')->click(); $this->findCss($page, '.resultItemLine1 a')->click();
$this->assertEquals($recordURL, $this->stripHash($session->getCurrentUrl())); $this->assertEquals($recordURL, $this->stripHash($session->getCurrentUrl()));
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
} }
/** /**
...@@ -306,7 +306,7 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase ...@@ -306,7 +306,7 @@ class FavoritesTest extends \VuFindTest\Unit\MinkTestCase
$this->findCss($page, '.resultItemLine1 a')->click(); $this->findCss($page, '.resultItemLine1 a')->click();
$this->snooze(); $this->snooze();
$this->assertEquals($recordURL, $session->getCurrentUrl()); $this->assertEquals($recordURL, $session->getCurrentUrl());
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
} }
/** /**
......
...@@ -130,7 +130,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase ...@@ -130,7 +130,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase
$this->snooze(); // wait for UI update $this->snooze(); // wait for UI update
$this->assertNull($page->find('css', '.comment.row')); $this->assertNull($page->find('css', '.comment.row'));
// Logout // Logout
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
} }
/** /**
...@@ -163,7 +163,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase ...@@ -163,7 +163,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase
$this->findCss($page, '.modal #addtag_tag'); $this->findCss($page, '.modal #addtag_tag');
$this->findCss($page, '.modal .close')->click(); $this->findCss($page, '.modal .close')->click();
$this->snooze(); // wait for display to update $this->snooze(); // wait for display to update
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
$this->snooze(); $this->snooze();
// Login // Login
$page = $this->gotoRecord(); // redirects to search home??? $page = $this->gotoRecord(); // redirects to search home???
...@@ -203,7 +203,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase ...@@ -203,7 +203,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase
} }
$this->assertEquals(3, $sum); $this->assertEquals(3, $sum);
// Log out // Log out
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
$this->snooze(); // wait for UI update $this->snooze(); // wait for UI update
// Flat tags // Flat tags
...@@ -231,7 +231,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase ...@@ -231,7 +231,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase
$this->snooze(); $this->snooze();
// Check selected == 0 // Check selected == 0
$this->assertNull($page->find('css', '.tagList .tag.selected')); $this->assertNull($page->find('css', '.tagList .tag.selected'));
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
} }
/** /**
...@@ -281,7 +281,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase ...@@ -281,7 +281,7 @@ class RecordActionsTest extends \VuFindTest\Unit\MinkTestCase
// Check for confirmation message // Check for confirmation message
$this->findCss($page, '.modal .alert-success'); $this->findCss($page, '.modal .alert-success');
// Logout // Logout
$this->findCss($page, '.logoutOptions a[title="Log Out"]')->click(); $this->findCss($page, '.logoutOptions a.logout')->click();
} }
/** /**
......
...@@ -68,7 +68,7 @@ VuFind.lightbox = (function() { ...@@ -68,7 +68,7 @@ VuFind.lightbox = (function() {
}; };
var flashMessage = function(message, type) { var flashMessage = function(message, type) {
_modalBody.find('.alert,.fa.fa-spinner').remove(); _modalBody.find('.alert,.fa.fa-spinner').remove();
_modalBody.find('h2:first-child') _modalBody.find('h2:first-of-type')
.after('<div class="alert alert-'+type+'">'+message+'</div>'); .after('<div class="alert alert-'+type+'">'+message+'</div>');
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<a href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>"><i class="fa fa-home"></i> <?=$this->transEsc("Your Account")?></a> <a href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>"><i class="fa fa-home"></i> <?=$this->transEsc("Your Account")?></a>
</li> </li>
<li class="logoutOptions<? if(!$account->isLoggedIn()): ?> hidden<? endif ?>"> <li class="logoutOptions<? if(!$account->isLoggedIn()): ?> hidden<? endif ?>">
<a href="<?=$this->url('myresearch-logout')?>"><i class="fa fa-sign-out"></i> <?=$this->transEsc("Log Out")?></a> <a href="<?=$this->url('myresearch-logout')?>" class="logout"><i class="fa fa-sign-out"></i> <?=$this->transEsc("Log Out")?></a>
</li> </li>
<li id="loginOptions"<? if($account->isLoggedIn()): ?> class="hidden"<? endif ?>> <li id="loginOptions"<? if($account->isLoggedIn()): ?> class="hidden"<? endif ?>>
<? if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> <? if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?>
......
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