Skip to content

Commit

Permalink
CMS-735: Implement FE part of sidebar image settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Negometyanov committed Nov 23, 2015
1 parent 7dd0647 commit 4609532
Show file tree
Hide file tree
Showing 14 changed files with 237 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
- DJANGO="https://github.com/django/django/archive/master.zip" EASY_THUMBNAILS="easy-thumbnails>2.0"

script:
- if [[ $TRAVIS_PYTHON_VERSION = "2.6" && $FRONTEND = "true" ]]; then gulp lint; else coverage run --rcfile=coverage.rc test_settings.py; fi;
- if [[ $TRAVIS_PYTHON_VERSION = "2.6" && $FRONTEND = "true" ]]; then gulp ci; else coverage run --rcfile=coverage.rc test_settings.py; fi;

after_success:
- coveralls --config_file=coverage.rc
Expand Down
2 changes: 1 addition & 1 deletion filer/static/filer/css/admin_filer.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion filer/static/filer/css/maps/admin_filer.css.map

Large diffs are not rendered by default.

File renamed without changes.
5 changes: 5 additions & 0 deletions filer/static/filer/js/libs/jquery.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions filer/templates/admin/filer/base_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{# upload stuff #}
{{ media.js }}
<script src="{% static 'filer/js/libs/class.min.js' %}"></script>
<script src="{% static 'admin/js/jquery.min.js' %}"></script>
<script src="{% static 'filer/js/libs/jquery.min.js' %}"></script>
<script src="{% static 'filer/js/libs/jquery-ui.min.js' %}"></script>
<script src="{% static 'filer/js/addons/jquery.cookie.min.js' %}"></script>
<script src="{% static 'filer/js/addons/fileuploader.min.js' %}"></script>
Expand All @@ -22,6 +22,6 @@
<script src="{% static 'filer/js/addons/popup_handling.js' %}"></script>

<script src="{% static 'filer/js/addons/mediator.min.js' %}"></script>
<script src="{% static 'filer/js/addons/focal_point.js' %}"></script>
<script src="{% static 'filer/js/addons/focal-point.js' %}"></script>
<script src="{% static 'filer/js/base.js' %}"></script>
{% endblock %}
5 changes: 5 additions & 0 deletions filer/tests/frontend/fixtures/focal-point.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="js-focal-point" id="container">
<img src="image.url" data-ratio="4.638095" width="210" height="266" class="js-focal-point-image" id="image">
<div class="js-focal-point-circle hidden" id="circle"></div>
<input type="hidden" class="js-focal-point-location" id="location">
</div>
84 changes: 84 additions & 0 deletions filer/tests/frontend/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
'use strict';

// #############################################################################
// CONFIGURATION

// rake spec:javascript loads specs relative to the tmp/jasmine/runner.html, need to override:
module.exports = function (config) {
var browsers = {
'PhantomJS': 'used for local testing'
};

var settings = {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '..',

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine', 'fixture'],

// list of files / patterns to load in the browser
// tests/${path}
files: [
// the current order meets the dependency requirements
// dependency loading is not handled yet
'../static/filer/js/libs/jquery.min.js',
'../static/filer/js/libs/!(jquery.min)*.js',
'../static/filer/js/addons/mediator.min.js',

'frontend/unit/mocks.js',
'frontend/unit/mock-ajax.js',

'../static/filer/js/addons/!(mediator.min)*.js',

// tests themselves
'frontend/unit/*.js',

// fixture patterns
{
pattern: 'frontend/fixtures/**/*'
}
],

// list of files to exclude
exclude: [],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
// for fixtures
'**/*.html': ['html2js'],
'**/*.json': ['json_fixtures']
},

// fixtures dependency
// https://github.com/billtrik/karma-fixture
jsonFixturesPreprocessor: {
variableName: '__json__'
},

// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values:
// config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: Object.keys(browsers),

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
};

config.set(settings);
};
30 changes: 30 additions & 0 deletions filer/tests/frontend/unit/jasmine-jquery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4609532

Please sign in to comment.