Skip to content

Commit

Permalink
fix pagetree tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FinalAngel committed Apr 5, 2016
1 parent b24e4d0 commit accde63
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ cms/static/cms/compass_app_log.txt
!cms/static/cms/js/dist
cms/tests/frontend/coverage
node_modules
screenshots
.idea
.better_test.db
4 changes: 2 additions & 2 deletions cms/static/cms/css/cms.pagetree.css

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions cms/static/cms/js/dist/bundle.admin.pagetree.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions cms/static/cms/sass/components/_pagetree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
background-color: $white;
}
}
.cms-admin-sideframe .cms-pagetree-header {
margin-top: -25px;
}

.cms-pagetree-header-title {
padding-top: 6px;
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/admin/cms/page/tree/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h2>{% trans "Main Navigation" %}</h2>
{# INFO: javascript is loaded from cms.pagetree.js #}
{% if cl.get_items or cl.get_items and cl.is_filtered %}
<div class="cms-pagetree cms-pagetree-container">
<div class="js-cms-pagetree" data-json='{
<div class="cms-pagetree-jstree js-cms-pagetree" data-json='{
"urls": {
"tree": "{% url 'admin:get_tree' %}",
"move": "./{id}/move-page/",
Expand Down
8 changes: 4 additions & 4 deletions cms/tests/frontend/integration/helpers/cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function (casperjs) {
var that = this;
return function () {
return this.thenOpen(globals.adminPagesUrl)
.waitUntilVisible('.cms-pagetree [href*="delete"]')
.waitUntilVisible('.cms-pagetree-jstree [href*="delete"]')
.then(that.expandPageTree())
.then(function () {
var pageId;
Expand All @@ -48,9 +48,9 @@ module.exports = function (casperjs) {
}

if (pageId) {
this.click('.cms-pagetree [href*="delete"][href*="' + pageId + '"]');
this.click('.cms-pagetree-jstree [href*="delete"][href*="' + pageId + '"]');
} else {
this.click('.cms-pagetree [href*="delete"]'); // first one
this.click('.cms-pagetree-jstree [href*="delete"]'); // first one
}
})
.waitForUrl(/delete/)
Expand Down Expand Up @@ -78,7 +78,7 @@ module.exports = function (casperjs) {
if (opts.parent) {
return function () {
return this.wait(1000).thenOpen(globals.adminPagesUrl)
.waitUntilVisible('.cms-pagetree')
.waitUntilVisible('.cms-pagetree-jstree')
.then(that.waitUntilAllAjaxCallsFinish())
.then(that.expandPageTree())
.then(function () {
Expand Down
79 changes: 41 additions & 38 deletions cms/tests/frontend/integration/pagetree.js

Large diffs are not rendered by default.

0 comments on commit accde63

Please sign in to comment.