0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #3377 from PaulAdamDavis/signout-button

Change signout link to button
This commit is contained in:
Hannah Wolfe 2014-07-24 17:52:09 +01:00
commit a9a5acf2f2
4 changed files with 7 additions and 7 deletions

View file

@ -24,7 +24,7 @@
<li class="divider"></li>
<li class="usermenu-help"><a href="http://support.ghost.org/">Help / Support</a></li>
<li class="divider"></li>
<li class="usermenu-signout"><a {{ action 'invalidateSession' }}>Sign Out</a></li>
<li class="usermenu-signout"><button {{action 'invalidateSession'}}>Sign Out</button></li>
{{/gh-popover}}
</li>
</ul>

View file

@ -95,7 +95,7 @@ screens = {
},
'signout': {
url: 'ghost/signout/',
linkSelector: '#user-menu li.usermenu-signout a',
linkSelector: '#user-menu li.usermenu-signout button',
// When no user exists we get redirected to setup which has button-add
selector: '.button-save, .button-add'
},

View file

@ -47,7 +47,7 @@ CasperTest.begin('Admin navigation bar is correct', 27, function suite(test) {
casper.waitForSelector('#usermenu ul.overlay.open', function then() {
var profileHref = this.getElementAttribute('#usermenu li.usermenu-profile a', 'href'),
helpHref = this.getElementAttribute('#usermenu li.usermenu-help a', 'href'),
signoutHref = this.getElementAttribute('#usermenu li.usermenu-signout a', 'href');
signoutHref = this.getElementAttribute('#usermenu li.usermenu-signout button', 'href');
test.assertVisible('#usermenu ul.overlay', 'User menu should be visible');
@ -60,8 +60,8 @@ CasperTest.begin('Admin navigation bar is correct', 27, function suite(test) {
test.assertSelectorHasText('#usermenu li.usermenu-help a', 'Help / Support', 'Help menu item has correct text');
test.assertEquals(helpHref, 'http://support.ghost.org/', 'Help href is correct');
test.assertExists('#usermenu li.usermenu-signout a', 'Sign Out menu item exists');
test.assertSelectorHasText('#usermenu li.usermenu-signout a', 'Sign Out', 'Signout menu item has correct text');
test.assertExists('#usermenu li.usermenu-signout button', 'Sign Out menu item exists');
test.assertSelectorHasText('#usermenu li.usermenu-signout button', 'Sign Out', 'Signout menu item has correct text');
// test.assertEquals(signoutHref, '/ghost/signout/', 'Sign Out href is correct');
}, casper.failOnTimeout(test, 'WaitForSelector #usermenu ul.overlay failed'));
});

View file

@ -21,8 +21,8 @@ CasperTest.begin('Ghost signout works correctly', 3, function suite(test) {
casper.captureScreenshot('user-menu-open.png');
casper.waitForSelector('.usermenu-signout a');
casper.thenClick('.usermenu-signout a');
casper.waitForSelector('.usermenu-signout button');
casper.thenClick('.usermenu-signout button');
casper.waitForSelector('#login').then(function assertSuccess() {
test.assert(true, 'Got login screen');