mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge pull request #2678 from jaswilli/issue-2273
Add functional test for markdown help modal in editor
This commit is contained in:
commit
ca3b3782bc
1 changed files with 25 additions and 0 deletions
|
@ -506,3 +506,28 @@ CasperTest.begin('Admin navigation bar is correct', 28, function suite(test) {
|
||||||
test.assertEquals(this.getElementAttribute('#usermenu li.usermenu-signout a', 'href'), '/ghost/signout/', 'Sign Out href is correct');
|
test.assertEquals(this.getElementAttribute('#usermenu li.usermenu-signout a', 'href'), '/ghost/signout/', 'Sign Out href is correct');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// test the markdown help modal
|
||||||
|
CasperTest.begin('Markdown help modal', 4, function suite(test) {
|
||||||
|
casper.thenOpen(url + 'ghost/editor/', function testTitleAndUrl() {
|
||||||
|
test.assertTitle('Ghost Admin', 'Ghost admin has no title');
|
||||||
|
});
|
||||||
|
|
||||||
|
// open markdown help modal
|
||||||
|
casper.thenClick('a.markdown-help');
|
||||||
|
|
||||||
|
casper.waitUntilVisible('#modal-container', function onSuccess() {
|
||||||
|
test.assertSelectorHasText(
|
||||||
|
'.modal-content .modal-header',
|
||||||
|
'Markdown Help',
|
||||||
|
'delete modal has correct text');
|
||||||
|
|
||||||
|
test.assertExists('.modal-content .close');
|
||||||
|
});
|
||||||
|
|
||||||
|
casper.thenClick('.modal-content .close');
|
||||||
|
|
||||||
|
casper.waitWhileVisible('#modal-container', function onSuccess() {
|
||||||
|
test.assert(true, 'clicking close should remove the markdown help modal');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue