Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
update test suite template
Browse files Browse the repository at this point in the history
  • Loading branch information
mohdsayed committed Dec 14, 2017
1 parent f73cef3 commit b693ef9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
25 changes: 15 additions & 10 deletions tests/qunit/index.html
Expand Up @@ -20,23 +20,28 @@
<!--[if lt IE 8]>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/json2.js?ver=2015-05-03'></script>
<![endif]-->
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/underscore.min.js?ver=1.8.3'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/customize-base.js?ver=4.7.5'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/wp-a11y.js?ver=4.7.5'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/underscore.js?ver=1.8.3'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/customize-base.js?ver=5.0-alpha-42125-src'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/wp-a11y.js?ver=5.0-alpha-42125-src'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var _wpUtilSettings = {"ajax":{"url":"\/wp-admin\/admin-ajax.php"}};
/* ]]> */
</script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/wp-util.js?ver=4.7.5'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/wp-util.js?ver=5.0-alpha-42125-src'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/jquery/ui/core.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://wp-develop.test/wp-content/plugins/wp-customizer-dev-tools/js/base.js?ver=0.1.1'></script>
<script type='text/javascript'>
CustomizerDevTools.context = "pane";
</script>
<script type='text/javascript'>
/* <![CDATA[ */
var _wpCustomizeControlsL10n = {"activate":"Save & Activate","save":"Save & Publish","saveAlert":"The changes you made will be lost if you navigate away from this page.","saved":"Saved","cancel":"Cancel","close":"Close","cheatin":"Cheatin\u2019 uh?","notAllowed":"Sorry, you are not allowed to customize this site.","previewIframeTitle":"Site Preview","loginIframeTitle":"Session expired","collapseSidebar":"Hide Controls","expandSidebar":"Show Controls","untitledBlogName":"(Untitled)","allowedFiles":"Allowed Files"};
var _wpCustomizeControlsL10n = {"activate":"Activate & Publish","save":"Save & Publish","publish":"Publish","published":"Published","saveDraft":"Save Draft","draftSaved":"Draft Saved","updating":"Updating","schedule":"Schedule","scheduled":"Scheduled","invalid":"Invalid","saveBeforeShare":"Please save your changes in order to share the preview.","futureDateError":"You must supply a future date to schedule.","saveAlert":"The changes you made will be lost if you navigate away from this page.","saved":"Saved","cancel":"Cancel","close":"Close","action":"Action","discardChanges":"Discard changes","cheatin":"Cheatin\u2019 uh?","notAllowed":"Sorry, you are not allowed to customize this site.","previewIframeTitle":"Site Preview","loginIframeTitle":"Session expired","collapseSidebar":"Hide Controls","expandSidebar":"Show Controls","untitledBlogName":"(Untitled)","unknownRequestFail":"Looks like something\u2019s gone wrong. Wait a couple seconds, and then try again.","themeDownloading":"Downloading your new theme\u2026","themePreviewWait":"Setting up your live preview. This may take a bit.","revertingChanges":"Reverting unpublished changes\u2026","trashConfirm":"Are you sure you\u2019d like to discard your unpublished changes?","takenOverMessage":"%s has taken over and is currently customizing.","autosaveNotice":"There is a more recent autosave of your changes than the one you are previewing. <a href=\"%s\">Restore the autosave<\/a>","videoHeaderNotice":"This theme doesn\u2019t support video headers on this page. Navigate to the front page or another page that supports video headers.","allowedFiles":"Allowed Files","customCssError":{"singular":"There is %d error which must be fixed before you can save.","plural":"There are %d errors which must be fixed before you can save."},"pageOnFrontError":"Homepage and posts page must be different.","saveBlockedError":{"singular":"Unable to save due to %s invalid setting.","plural":"Unable to save due to %s invalid settings."},"scheduleDescription":"Schedule your customization changes to publish (\"go live\") at a future date.","themePreviewUnavailable":"Sorry, you can\u2019t preview new themes when you have changes scheduled or saved as a draft. Please publish your changes, or wait until they publish to preview new themes.","themeInstallUnavailable":"You won\u2019t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href=\"http:\/\/wp-develop.test\/wp-admin\/theme-install.php\">add themes in the admin<\/a>.","publishSettings":"Publish Settings","invalidDate":"Invalid date.","invalidValue":"Invalid value."};
/* ]]> */
</script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-admin/js/customize-controls.js?ver=4.7.5'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/backbone.min.js?ver=1.2.3'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/wp-backbone.js?ver=4.7.5'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-admin/js/customize-controls.js?ver=5.0-alpha-42125-src'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/backbone.js?ver=1.2.3'></script>
<script type='text/javascript' src='https://develop.svn.wordpress.org/trunk/src/wp-includes/js/wp-backbone.js?ver=5.0-alpha-42125-src'></script>
<script type='text/javascript' src='../../bower_components/select2/dist/js/select2.full.js?ver=0.8.7'></script>
<script type='text/javascript' src='../../js/customize-posts-panel.js?ver=0.8.7'></script>
<script type='text/javascript' src='../../js/customize-dynamic-control.js?ver=0.8.7'></script>
Expand All @@ -46,7 +51,7 @@
<script type='text/javascript' src='../../js/customize-post-section.js?ver=0.8.7'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var _wpCustomizePostsExports = {"postTypes":[],"postStatusChoices":[{"value":"draft","text":"Draft"},{"value":"pending","text":"Pending Review"},{"value":"private","text":"Private"},{"value":"publish","text":"Published"},{"value":"future","text":"Scheduled"},{"value":"trash","text":"Trash"}],"authorChoices":[{"value":1,"text":"dev (dev)"}],"dateMonthChoices":{"1":{"text":"01-Jan","value":"01"},"2":{"text":"02-Feb","value":"02"},"3":{"text":"03-Mar","value":"03"},"4":{"text":"04-Apr","value":"04"},"5":{"text":"05-May","value":"05"},"6":{"text":"06-Jun","value":"06"},"7":{"text":"07-Jul","value":"07"},"8":{"text":"08-Aug","value":"08"},"9":{"text":"09-Sep","value":"09"},"10":{"text":"10-Oct","value":"10"},"11":{"text":"11-Nov","value":"11"},"12":{"text":"12-Dec","value":"12"}},"initialServerDate":"2017-09-08 18:20:08","initialServerTimestamp":1.50487500823e+12,"l10n":{"sectionCustomizeActionTpl":"Customizing &#9656; %s","fieldTitleLabel":"Title","fieldSlugLabel":"Slug","fieldStatusLabel":"Status","fieldDateLabel":"Date","fieldContentLabel":"Content","fieldExcerptLabel":"Excerpt","fieldDiscussionLabel":"Discussion","fieldAuthorLabel":"Author","fieldParentLabel":"Parent","fieldOrderLabel":"Order","noTitle":"(no title)","theirChange":"Their change: %s","openEditor":"Open Editor","closeEditor":"Close Editor","invalidDateError":"Whoops, the provided date is invalid.","dropdownPagesOptionTrashed":"%s (Trashed)","dropdownPagesOptionUnpublished":"%s (Unpublished)","editingPageForPostsNotice":"You are currently editing the page that shows your latest posts.","editPostFailure":"Failed to open for editing.","createPostFailure":"Failed to create for editing.","installCustomizeObjectSelector":"This control depends on having the <a href=\"https:\/\/github.com\/xwp\/wp-customize-object-selector\" target=\"_blank\">Customize Object Selector<\/a> plugin installed and activated.","trashPostNotification":"This has been untrashed. If you publish changes now, its status will change to the selected status. Move back to trash to avoid this.","jumpToPostPlaceholder":"Jump to %s"}};
var _wpCustomizePostsExports = {"postTypes":[],"postStatusChoices":[{"value":"draft","text":"Draft"},{"value":"pending","text":"Pending Review"},{"value":"private","text":"Private"},{"value":"publish","text":"Published"},{"value":"future","text":"Scheduled"},{"value":"trash","text":"Trash"}],"authorChoices":[{"value":4,"text":"Imran (imran)"},{"value":1,"text":"Sayed Taqui (dev)"}],"dateMonthChoices":{"1":{"text":"01-Jan","value":"01"},"2":{"text":"02-Feb","value":"02"},"3":{"text":"03-Mar","value":"03"},"4":{"text":"04-Apr","value":"04"},"5":{"text":"05-May","value":"05"},"6":{"text":"06-Jun","value":"06"},"7":{"text":"07-Jul","value":"07"},"8":{"text":"08-Aug","value":"08"},"9":{"text":"09-Sep","value":"09"},"10":{"text":"10-Oct","value":"10"},"11":{"text":"11-Nov","value":"11"},"12":{"text":"12-Dec","value":"12"}},"initialServerDate":"2017-12-14 18:23:49","initialServerTimestamp":1513256029895,"l10n":{"sectionCustomizeActionTpl":"Customizing &#9656; %s","fieldTitleLabel":"Title","fieldSlugLabel":"Slug","fieldStatusLabel":"Status","fieldDateLabel":"Date","fieldContentLabel":"Content","fieldExcerptLabel":"Excerpt","fieldDiscussionLabel":"Discussion","fieldAuthorLabel":"Author","fieldParentLabel":"Parent","fieldOrderLabel":"Order","noTitle":"(no title)","theirChange":"Their change: %s","openEditor":"Open Editor","closeEditor":"Close Editor","invalidDateError":"Whoops, the provided date is invalid.","dropdownPagesOptionTrashed":"%s (Trashed)","dropdownPagesOptionUnpublished":"%s (Unpublished)","editingPageForPostsNotice":"You are currently editing the page that shows your latest posts.","editPostFailure":"Failed to open for editing.","createPostFailure":"Failed to create for editing.","installCustomizeObjectSelector":"This control depends on having the <a href=\"https:\/\/github.com\/xwp\/wp-customize-object-selector\" target=\"_blank\">Customize Object Selector<\/a> plugin installed and activated.","trashPostNotification":"This has been untrashed. If you publish changes now, its status will change to the selected status. Move back to trash to avoid this.","jumpToPostPlaceholder":"Jump to %s"}};
/* ]]> */
</script>
<script type='text/javascript' src='../../js/customize-posts.js?ver=0.8.7'></script>
Expand Down Expand Up @@ -441,6 +446,6 @@ <h3 class="accordion-section-title" tabindex="0">
</div>

<!-- Unit tests -->
<script src="js/customize-qunit-tests.js"></script>
<script src="js/customize-posts.js"></script>
</body>
</html>
@@ -1,11 +1,11 @@
/* global QUnit, wp, _ */
/* global jQuery, QUnit, wp, _ */

(function() {
jQuery( window ).on( 'load', function (){

'use strict';

QUnit.test( 'Test if wp.customize.Posts object exits', function( assert ) {
assert.ok( _.isObject( wp.customize.Posts ) );
assert.ok( ! _.isEmpty( wp.customize.Posts ) );
});
})();
});
2 changes: 1 addition & 1 deletion tests/qunit/test-suite-template.html
Expand Up @@ -395,6 +395,6 @@ <h3 class="accordion-section-title" tabindex="0">
</div>

<!-- Unit tests -->
<script src="js/customize-qunit-tests.js"></script>
<script src="js/customize-posts.js"></script>
</body>
</html>

0 comments on commit b693ef9

Please sign in to comment.