Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into sane-add-plugin #2 #5122

Merged
merged 827 commits into from
Apr 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
827 commits
Select commit Hold shift + click to select a range
4c3963a
add tests for _hide
vxsx Mar 1, 2016
b533e7c
lint
vxsx Mar 1, 2016
9b93b8d
wip
vxsx Mar 1, 2016
05d3093
add tests for _startMove
vxsx Mar 1, 2016
289d14f
add tests for _stopMove
vxsx Mar 1, 2016
0a77e5a
add tests for startResize
vxsx Mar 2, 2016
cc1cab6
add tests for stopResize
vxsx Mar 2, 2016
93b10df
Merge pull request #164 from FinalAngel/feature/unit-tests/modal-private
vxsx Mar 2, 2016
94de2d3
add tests for _setBreadcrumb
vxsx Mar 2, 2016
a30fdb5
add tests for _setButtons
vxsx Mar 3, 2016
67aa288
add tests for _deletePlugin
vxsx Mar 3, 2016
04da7f5
fix tests in IE
vxsx Mar 3, 2016
44070c1
adds tests for setupCtrlEnterSave
vxsx Mar 3, 2016
440654f
add tests for _changeIframe
vxsx Mar 3, 2016
bd7fa6e
Merge pull request #165 from FinalAngel/feature/unit-tests/modal-private
vxsx Mar 3, 2016
9d89197
tests for loadIframe
vxsx Mar 3, 2016
a243cfb
Merge pull request #166 from FinalAngel/feature/unit-tests/modal-private
vxsx Mar 3, 2016
ef50c70
Pass all trans in js templates to escapejs
yakky Mar 4, 2016
6f0cdb5
Merge branch 'develop' into develop-3.4
vxsx Mar 4, 2016
69b87c0
fix incorrectly resolved conflict
vxsx Mar 4, 2016
82f1ac4
bundled file
vxsx Mar 4, 2016
18143ab
fix lint
vxsx Mar 4, 2016
7ca5782
fix the url change
vxsx Jan 22, 2016
afa532a
stability fixes
vxsx Jan 22, 2016
7683f1e
set toolbar to expanded by default
vxsx Jan 22, 2016
a5ce340
change selectors for the new page tree
vxsx Jan 22, 2016
02f3230
rm comment
vxsx Jan 22, 2016
3eb1b27
fix and add helpers
vxsx Jan 22, 2016
637b17e
add initial pagetree tests and add them to gulp file
vxsx Jan 22, 2016
0f6b299
add a tests for pages reordering
vxsx Jan 25, 2016
961a574
add a test that pages can be nested
vxsx Jan 25, 2016
f4154fe
add a test for "unnesting" pages (bypassed because fails)
vxsx Jan 25, 2016
db6bea0
forgot starts
vxsx Jan 25, 2016
92d3106
remove second page first
vxsx Jan 25, 2016
43d6d4a
add a test for publishing a page without a slug/title
vxsx Jan 25, 2016
5652b02
correct comment
vxsx Jan 25, 2016
7337759
add a test for publishing / unpublishing
vxsx Jan 25, 2016
0e9d2d9
add a "parent" option to the helpers
vxsx Jan 25, 2016
5b22f7c
fix comments
vxsx Jan 26, 2016
1ae10c9
wip copy paste pagetree tests
vxsx Jan 26, 2016
2ed42eb
add private _getPageIds method
vxsx Jan 27, 2016
84274a4
add a test for copying a page into the sibling (copies tree)
vxsx Jan 27, 2016
61e47b9
clarify comment
vxsx Jan 27, 2016
f0ba26a
Merge pull request #167 from FinalAngel/feature/merge-upstream-develop
vxsx Mar 4, 2016
56eb77e
Merge pull request #5064 from yakky/feature/fix_pagetree
yakky Mar 5, 2016
e565a9e
strip dashes from language codes for pagetree
vxsx Mar 7, 2016
f5b51b4
bundled files
vxsx Mar 7, 2016
b82b20a
Merge pull request #5072 from FinalAngel/feature/fix-pagetree-for-lan…
mkoistinen Mar 7, 2016
fefcac0
Updated Board/Core developers lists
evildmp Feb 17, 2016
b7fbf56
Merge remote-tracking branch 'upstream/develop' into update-board-cor…
evildmp Mar 8, 2016
ed5316e
Merge pull request #5075 from divio/update-board-core-devs
evildmp Mar 8, 2016
a3299ad
Fixed numerous small documentation issues
mcavigelli Jan 15, 2016
cb71123
Merge pull request #5077 from divio/mcavigelli-small_documentation_fixes
evildmp Mar 9, 2016
5ca0aa1
Bump to 3.2.3
mkoistinen Mar 9, 2016
92cddfe
Update translation files
mkoistinen Mar 9, 2016
e036898
Update changelog, docs
mkoistinen Mar 9, 2016
8be98e1
Minify JS, etc.
mkoistinen Mar 9, 2016
6374f79
Bump to 3.2.3.dev1
mkoistinen Mar 9, 2016
025febf
no puns
vxsx Mar 10, 2016
f93442e
fix arguments
vxsx Mar 14, 2016
58ca200
fix some of the pagetree tests
vxsx Mar 14, 2016
24737bb
add XPath generation func
vxsx Mar 14, 2016
737d7aa
use the function to generate XPath
vxsx Mar 14, 2016
909314a
lint
vxsx Mar 15, 2016
0e63746
fix page copy pasting test
vxsx Mar 15, 2016
b3eac82
fix helpers showing up when pasting mode is active
vxsx Mar 15, 2016
4f754ef
small fix
vxsx Mar 15, 2016
59ce25c
readability [ci skip]
vxsx Mar 15, 2016
e518399
Merge pull request #168 from FinalAngel/feature/integration-tests/pag…
vxsx Mar 15, 2016
d55ab62
Merge branch 'develop' into develop-3.4
vxsx Mar 15, 2016
4b4d482
add a test about cut helpers
vxsx Mar 16, 2016
7f8a91e
don't show paste helpers on children of the cut out node
vxsx Mar 16, 2016
74c2c22
use helper to generate xpath for paste helpers
vxsx Mar 16, 2016
21b834a
Merge pull request #169 from FinalAngel/feature/integration-tests/pag…
vxsx Mar 16, 2016
099daa6
add tests for cutting and pasting pages
vxsx Mar 16, 2016
dab8269
Merge pull request #170 from FinalAngel/feature/integration-tests/pag…
vxsx Mar 16, 2016
446d441
disable dragging when filtered
vxsx Mar 16, 2016
6cf8f3d
reset the cursor if the pagetree is filtered
vxsx Mar 16, 2016
5827e93
add test for pagetree remembering nodes state (open / closed)
vxsx Mar 16, 2016
137f24c
add tests for filtered pages
vxsx Mar 16, 2016
ab22010
lint fixes
vxsx Mar 16, 2016
bbd99a2
add italian and chinese and a test that they are displayed correctly
vxsx Mar 16, 2016
15d7961
Merge pull request #171 from FinalAngel/feature/integration-tests/pag…
vxsx Mar 16, 2016
29a1da8
Merge remote-tracking branch 'upstream/release/3.2.x' into HEAD
yakky Mar 16, 2016
d04f1e2
Merge pull request #5087 from yakky/merge/3.2.3
yakky Mar 17, 2016
7c2e4b4
Merge branch 'develop' into develop-3.4
vxsx Mar 17, 2016
c8db36e
Merge branch 'develop-3.4' into feature/integration-tests/pagetree-la…
vxsx Mar 17, 2016
455bf23
fix language name [ci skip]
vxsx Mar 17, 2016
102f112
add more waits [ci skip]
vxsx Mar 17, 2016
dedb53e
more waits
vxsx Mar 17, 2016
b596873
more waits
vxsx Mar 17, 2016
e982431
fix selectors
vxsx Mar 17, 2016
8ce0b37
more waits
vxsx Mar 17, 2016
5d17bd7
Merge pull request #172 from FinalAngel/feature/integration-tests/pag…
vxsx Mar 17, 2016
99c481d
update phantomjs and casperjs
vxsx Mar 18, 2016
d05495e
test for info dropdown
vxsx Mar 18, 2016
621e0c9
add tests for settings/advanced-settings
vxsx Mar 18, 2016
3bb3f6f
fix space [ci skip]
vxsx Mar 18, 2016
bd83043
stability fixes
vxsx Mar 18, 2016
ddbe926
wait more?
vxsx Mar 18, 2016
90823aa
try more specific selector
vxsx Mar 18, 2016
2fcc2b9
stability
vxsx Mar 19, 2016
95d6356
stability :/
vxsx Mar 20, 2016
c647cb5
more stability fixes
vxsx Mar 20, 2016
678fb3a
add more waits for pagetree loads
vxsx Mar 20, 2016
50110d9
more waits
vxsx Mar 20, 2016
5d06b09
slow down the world
vxsx Mar 20, 2016
c020dfc
slow down the world v2
vxsx Mar 20, 2016
f472466
even more waits
vxsx Mar 20, 2016
9282433
wait more
vxsx Mar 20, 2016
4e25673
wait more until start of the server
vxsx Mar 21, 2016
3af3062
add waitUntilAllAjaxCallsFinish helper (hopefully speed up the world)
vxsx Mar 21, 2016
485dba9
remove another point of failure
vxsx Mar 21, 2016
6f7b2cc
Merge branch 'feature/integration-tests/pagetree-minor-tests' into fe…
vxsx Mar 21, 2016
e0a4230
use more helpers
vxsx Mar 21, 2016
b2c2f9d
finish test for copy all
vxsx Mar 21, 2016
b8598b4
fix a helper
vxsx Mar 21, 2016
aa193ca
wait more for pagetree
vxsx Mar 21, 2016
40c0eab
more waits
vxsx Mar 21, 2016
34bafb2
use phantomjs2 for unit tests
vxsx Mar 21, 2016
caf0758
helpers misbehave again
vxsx Mar 21, 2016
a641581
fix sudden linting error
vxsx Mar 21, 2016
5a1727b
wait even more
vxsx Mar 21, 2016
8c929f7
fix failed to load resource on welcome screen
FinalAngel Mar 21, 2016
93efdc1
Merge pull request #173 from FinalAngel/feature/integration-tests/pag…
vxsx Mar 21, 2016
c49821d
Merge branch 'develop-3.4' into feature/integration-tests/copy-all-test
vxsx Mar 21, 2016
6476ad4
Merge pull request #5096 from FinalAngel/feature/favicon
FinalAngel Mar 21, 2016
8fb7274
fix copy all test
vxsx Mar 21, 2016
f6e3379
Merge pull request #175 from FinalAngel/feature/integration-tests/cop…
vxsx Mar 22, 2016
606bfc5
restore coveralls and travis to point back to divio
vxsx Mar 22, 2016
b70502f
changelog [ci skip]
vxsx Mar 22, 2016
893dd49
Merge branch 'develop' into develop-3.4
vxsx Mar 22, 2016
7a7e322
update travis config
vxsx Mar 22, 2016
5f6d1d4
put frontend jobs on top of the build [skip saucelabs]
vxsx Mar 22, 2016
2257789
more fixes
vxsx Mar 22, 2016
ce3a3f8
fix docs
vxsx Mar 22, 2016
d721436
fix docs
vxsx Mar 22, 2016
bdd507c
no reason not to wait even more
vxsx Mar 22, 2016
fcaa2cc
wait a bit before submitting a form
vxsx Mar 22, 2016
aa0991d
try clean run
vxsx Mar 22, 2016
c7fa828
again
vxsx Mar 22, 2016
d82b233
restore full build
vxsx Mar 22, 2016
b2c1349
different download location for phantomjs
vxsx Mar 22, 2016
ec54d79
changelog and docs adaptation
vxsx Mar 23, 2016
6786551
unit tests for cms.navigation
vxsx Mar 24, 2016
45b7977
fix linting errors
vxsx Mar 24, 2016
3cd93d3
Merge pull request #5099 from FinalAngel/develop-3.4
yakky Mar 24, 2016
a59b6b9
small wait increase in history.js
vxsx Mar 24, 2016
2bbc3ca
use more reliable download location for phantomjs
vxsx Mar 24, 2016
e5acb71
split integration tests into three buckets
vxsx Mar 24, 2016
d22b32e
hotfix
vxsx Mar 24, 2016
8a0e3ed
integration tests fixes
vxsx Mar 24, 2016
5bf705a
more waits for pagetree
vxsx Mar 24, 2016
d6eabe1
try again
vxsx Mar 25, 2016
d232c7f
more wait
vxsx Mar 25, 2016
92352f1
redistribute buckets a bit
vxsx Mar 25, 2016
3753613
wait for delete url
vxsx Mar 25, 2016
9dd37be
wait for url
vxsx Mar 25, 2016
0b8d6fe
correct wait
vxsx Mar 25, 2016
db9131e
wait a bit more when adding plugin
vxsx Mar 25, 2016
74fa66c
add wait for modal
vxsx Mar 25, 2016
bd35950
more tests
vxsx Mar 25, 2016
2b2dbb0
restore full build
vxsx Mar 25, 2016
5257b05
wait after opening sideframe
vxsx Mar 25, 2016
2adfe0d
added comment [ci skip]
vxsx Mar 29, 2016
6868946
Merge pull request #5103 from FinalAngel/feature/unit-tests/cms-navig…
vxsx Mar 29, 2016
d6afbe6
update fixture
vxsx Mar 29, 2016
bac5fa0
few ignores
vxsx Mar 29, 2016
0ba1cca
fix typo
vxsx Mar 29, 2016
b701e57
fix incorrect events separator
vxsx Mar 29, 2016
e85e21c
eliminate small memory leak
vxsx Mar 29, 2016
d688aca
screenblock cache variables
vxsx Mar 29, 2016
0b86843
use _getWindow for easier mocking
vxsx Mar 29, 2016
7176672
bundled files
vxsx Mar 29, 2016
df60372
add more tests for toolbar
vxsx Mar 29, 2016
47c714c
be very defensive about setSettings and unhandled loads
vxsx Mar 29, 2016
e99a3db
fix the bug where screenblock hid menus
vxsx Mar 29, 2016
e7671d2
bundled file
vxsx Mar 29, 2016
eb212dc
attempt to fix spelling
vxsx Mar 29, 2016
39097d4
spelling wordlist update
vxsx Mar 29, 2016
c089a98
Implement CMSPluginBase.get_expiration()
mkoistinen Mar 21, 2016
ac22722
Adds documentation
mkoistinen Mar 21, 2016
f06050a
Adds tests and fixes existing
mkoistinen Mar 21, 2016
3c7b666
Doc fixes
mkoistinen Mar 21, 2016
dc0e793
Another doc fix
mkoistinen Mar 21, 2016
d1ae39e
Spelling fixes, minor doc updates
mkoistinen Mar 21, 2016
890451d
Use get_cache_expiration(), also fix spelling and indention
mkoistinen Mar 21, 2016
7091ea7
Address comments,...
mkoistinen Mar 22, 2016
bcda505
Tweaks, properly set placeholder cache and honor settings...
mkoistinen Mar 23, 2016
33f187c
Fixes from review
mkoistinen Mar 28, 2016
722af73
Leverage work already done in downcast_plugins
mkoistinen Mar 28, 2016
5322b4a
Use existing utility
mkoistinen Mar 29, 2016
da4af00
Implement CMSPluginBase.get_expiration()
mkoistinen Mar 21, 2016
1e7a738
Adds documentation
mkoistinen Mar 21, 2016
d869e56
Adds tests and fixes existing
mkoistinen Mar 21, 2016
ba17fc2
Doc fixes
mkoistinen Mar 21, 2016
4cb55eb
Another doc fix
mkoistinen Mar 21, 2016
8a69795
Spelling fixes, minor doc updates
mkoistinen Mar 21, 2016
64e6f1c
Use get_cache_expiration(), also fix spelling and indention
mkoistinen Mar 21, 2016
48b33d2
Address comments,...
mkoistinen Mar 22, 2016
2eca994
Tweaks, properly set placeholder cache and honor settings...
mkoistinen Mar 23, 2016
9040390
Fixes from review
mkoistinen Mar 28, 2016
cee592f
Leverage work already done in downcast_plugins
mkoistinen Mar 28, 2016
2888fb0
Use existing utility
mkoistinen Mar 29, 2016
9c8c48e
Merge branch 'develop' of https://github.com/divio/django-cms into fe…
mkoistinen Mar 30, 2016
e66ff5b
Correct query ranges, ensure plugins are unregistered after use
mkoistinen Mar 30, 2016
14d114c
More test fixes
mkoistinen Mar 30, 2016
ef06ff0
wait more
vxsx Mar 30, 2016
7979a06
fix spelling test case for sphinx >= 1.4
vxsx Mar 30, 2016
06a7737
remove dead code
vxsx Mar 30, 2016
4142a34
istanbul comments
vxsx Mar 30, 2016
248daf9
bundled file
vxsx Mar 30, 2016
27765b4
additional tests for cms.sideframe
vxsx Mar 30, 2016
17e4a1d
Merge branch 'develop' into feature/unit-tests/cms-toolbar
vxsx Mar 30, 2016
a6ef5ea
Capture PluginAlreadyRegistered
mkoistinen Mar 30, 2016
c525f03
More fixing of tests
mkoistinen Mar 30, 2016
d0f90e7
Fixes tests (and functionality) of the recently committed better_cach…
mkoistinen Mar 30, 2016
28c6ac1
Merge pull request #5113 from divio/feature/better_cache_control_fixes
mkoistinen Mar 30, 2016
77a4369
few ignores
vxsx Mar 30, 2016
36784f9
tests for structureboard
vxsx Mar 30, 2016
0bb4202
beforeAll and afterAll are ok
vxsx Mar 30, 2016
8b002c0
Merge branch 'develop' into feature/unit-tests/cms-toolbar
vxsx Mar 30, 2016
0b99969
Fix sphinx issue
mkoistinen Mar 30, 2016
0136f3d
Merge pull request #5116 from divio/feature/better_cache_control_cleanup
mkoistinen Mar 30, 2016
b1f89f9
Revert "Fixes tests (and functionality) of the recently committed bet…
yakky Mar 30, 2016
8579be0
Refactor request.placeholders to hold both placeholders and current u…
yakky Mar 30, 2016
d030724
Merge pull request #5117 from divio/feature/readd_permission_checking
mkoistinen Mar 31, 2016
391f2ec
Merge pull request #5110 from FinalAngel/feature/unit-tests/cms-toolbar
vxsx Mar 31, 2016
7dad25b
Merge branch 'develop' into feature/unit-tests/cms-sideframe
vxsx Mar 31, 2016
45bcc82
Revert "Fix sphinx issue"
vxsx Mar 31, 2016
eead5e9
Merge pull request #5114 from FinalAngel/feature/unit-tests/cms-sidef…
vxsx Mar 31, 2016
aace197
tests for update
vxsx Mar 31, 2016
8579167
result of $.fn.data can never be null
vxsx Mar 31, 2016
6d8eb40
bundled files
vxsx Mar 31, 2016
6b7eeea
more tests for structureboard
vxsx Mar 31, 2016
4791826
remaining tests for structureboard
vxsx Mar 31, 2016
7f9c095
fix tests in edge
vxsx Mar 31, 2016
41894af
fix linting errors
vxsx Mar 31, 2016
4cd9426
Merge pull request #5120 from FinalAngel/feature/unit-tests/cms-struc…
vxsx Mar 31, 2016
cfa5fd7
Merge branch 'develop' into merge/sane-add-plugin-2
czpython Apr 1, 2016
f96f5ab
fixes conflict in cms/tests/test_cache.py
czpython Apr 1, 2016
eec6bb1
resolve conflicts
vxsx Apr 1, 2016
bea398e
fix behaviour issues
vxsx Apr 1, 2016
5646605
remove newPlugin and fix the tests
vxsx Apr 1, 2016
92e82b3
bundled file
vxsx Apr 1, 2016
cb905ad
remove newPlugin workarounds
vxsx Apr 1, 2016
c6e68ca
fix the tests
vxsx Apr 1, 2016
189f530
bundled files
vxsx Apr 1, 2016
77cab91
fixes for integration tests
vxsx Apr 1, 2016
2c8fd6c
fix history tests
vxsx Apr 1, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ share/
!.jshintrc
cms/static/cms/compass_app_log.txt
!cms/static/cms/js/dist
cms/tests/frontend/coverage
node_modules
.idea
.better_test.db
77 changes: 64 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@ addons:

env:
global:
- secure: NWiSBCHFB6LbTMget2qLIdqZlx0zeu3j+Y7Lsqb8kuYXyT2IUBGFVedcGWuGv/9Mzypb80EQWtVTokA3/3QIbesqr29uG95pMPHiYWLdnTO6UHcLMcNXiSzhBGdRDZ40iHSVv2dDHs4GNwGOH5+UCA0z3j7SWmChuFbNXh+Vsqw=
# coveralls
- secure: GzxbqfktWQkf6QQvz0OMk4zHbGI8QWcThTLUzEtktheInxwivOHnoJ1kQu2jVVrk0ZVPbOedE+Cn3QMfi6Wj+y6CREwIhfyzqZV+BIgYu/MpW7vT1BQGiN2suHjFOt/TJ90G41DlBRDc7FxGLqL1Mq8hsEdE0W+/Yszo3aMbp2w=
# sauce labs username
- secure: RotktnZ0AqeTDYfh2O472pPiolQJ2ZDRPUKGDajYWgnG2n94K7hBd4pnA1H/cd42sOyReC3lmmweWNSbG0DLD9+X+s0fwaqKcWGnYsLAcjOWaNXPMwvvgaivadT34JmS9Wv29zNudPL2A6zNw0CB+YVxUZIA4Cm9984AxbYJGSk=
# sauce labs access token
- secure: CbPfysSncBB2Ue+VOtLDa8xJvwKl73nJO647zt/9UvZ/3PilnZN9aZv2jHxGvCiFXcez+2AddKptMCcx/5EW5UfRkrWUDHrfLCULU2TfOjmufEGM1eOIXhiAun8WQ85LBzTAYy1r9D514cbU3Yzn3xGZwJljPE8JE4cx3MNN/qQ=
# temporary solution until https://github.com/ariya/phantomjs/issues/13953 is resolved
- PHANTOMJS_CDNURL=https://s3.amazonaws.com/aldryn-local-assets
matrix:
- FRONTEND=1 UNIT=1
- FRONTEND=1 LINT=1
- FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=1 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=2 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=3 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- DJANGO=1.9 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
Expand All @@ -30,27 +42,32 @@ env:

before_script:
- pip freeze
- sh -c "if [ '$DATABASE_URL' = 'postgres://postgres@127.0.0.1/djangocms_test' ];
then psql -c 'DROP DATABASE IF EXISTS djangocms_test;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'postgres://postgres@127.0.0.1/djangocms_test' ];
then psql -c 'create database djangocms_test;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'mysql://root@127.0.0.1/djangocms_test' ]; then mysql
-e 'create database IF NOT EXISTS djangocms_test CHARACTER SET utf8 COLLATE utf8_general_ci;';
fi"
- if [ "$DATABASE_URL" == "postgres://postgres@127.0.0.1/djangocms_test" ]; then psql -c "DROP DATABASE IF EXISTS djangocms_test;" -U postgres; fi
- if [ "$DATABASE_URL" == "postgres://postgres@127.0.0.1/djangocms_test" ]; then psql -c "create database djangocms_test;" -U postgres; fi
- if [ "$DATABASE_URL" == "mysql://root@127.0.0.1/djangocms_test" ]; then mysql -e 'create database IF NOT EXISTS djangocms_test CHARACTER SET utf8 COLLATE utf8_general_ci;'; fi

before_install:
- "export DISPLAY=:99.0"
# xvfb is started in this way to ensure the screen size is 1280x1024x8
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/cucumber_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x8"
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip saucelabs\]'; export USE_SAUCE_LABS=$?; true

install:
- pip install -r "test_requirements/django-$DJANGO.txt"
- if [ $DATABASE_URL == 'postgres://postgres@127.0.0.1/djangocms_test' ]; then pip install psycopg2 ; fi
- if [ $DATABASE_URL == 'mysql://root@127.0.0.1/djangocms_test' ]; then pip install mysqlclient ; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ]; then pip install -r "test_requirements/django-$DJANGO.txt"; pip freeze; fi
- if [ "$FRONTEND" == 1 ]; then nvm install 0.12.7 && nvm use 0.12.7; fi
- if [ "$FRONTEND" == 1 ]; then npm install -g npm@2; fi
- if [ "$FRONTEND" == 1 ]; then npm install -g gulp@3.9.0; fi
- if [ "$FRONTEND" == 1 ]; then npm install; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ] && [ "$DATABASE_URL" == 'postgres://postgres@127.0.0.1/djangocms_test' ]; then pip install psycopg2 ; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ] && [ "$DATABASE_URL" == 'mysql://root@127.0.0.1/djangocms_test' ]; then pip install mysqlclient ; fi

script:
- coverage run --parallel-mode manage.py test $MIGRATE_OPTION
- coverage combine
- if [ "$FRONTEND" == 1 ] && [ "$UNIT" == 1 ]; then gulp tests:unit; fi;
- if [ "$FRONTEND" == 1 ] && [ "$LINT" == 1 ]; then gulp lint; fi;
- if [ "$FRONTEND" == 1 ] && [ "$INTEGRATION" == 1 ]; then pip install -e .; pip freeze; sh cms/tests/frontend/integration/run_testserver.sh; sleep 60; gulp tests:integration; fi;
- if [ "$FRONTEND" != 1 ]; then coverage run --parallel-mode manage.py test $MIGRATE_OPTION; fi;
- if [ "$FRONTEND" != 1 ]; then coverage combine; fi;

after_success: coveralls

Expand Down Expand Up @@ -84,6 +101,40 @@ matrix:
- python: 3.3
env: DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='customuserapp.User'

- python: 3.3
env: FRONTEND=1 UNIT=1
- python: 3.3
env: FRONTEND=1 LINT=1
- python: 3.4
env: FRONTEND=1 UNIT=1
- python: 3.4
env: FRONTEND=1 LINT=1
- python: 3.5
env: FRONTEND=1 UNIT=1
- python: 3.5
env: FRONTEND=1 LINT=1

- python: 3.3
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=1 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- python: 3.4
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=1 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- python: 3.5
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=1 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'

- python: 3.3
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=2 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- python: 3.4
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=2 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- python: 3.5
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=2 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'

- python: 3.3
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=3 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- python: 3.4
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=3 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'
- python: 3.5
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=3 DJANGO=1.8 DATABASE_URL='sqlite://localhost/testdb.sqlite' MIGRATE_OPTION='--migrate'

allow_failures:
- python: 2.7
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
* Set the default value of CMSPlugin.position to 0 instead of null
* Refactor language menu to allow for better integration with many languages
* Management commands has been completely refactored for better consistency

* Fix "failed to load resource" for favicon on welcome screen
* ``cms-toolbar-expanded`` class is only added now when toolbar is fully
expanded and not at the beginning of the animation. ``cms-toolbar-expanding``
and ``cms-toolbar-collapsing`` classes are added at the beginning of their
respective animations.
* Added unit tests for CMS JavaScript files
* Added frontend integration tests (written with Casper JS)
* Provides the ability to declare cache expiration periods on a per-plugin basis

=== 3.2.3 (2016-03-09) ===

- Fix the display of hyphenated language codes in the page tree
- Fix a family of issues relating to unescaped translations in the page tree


=== 3.2.2 (2016-03-02) ===
Expand Down
2 changes: 2 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
last 2 versions
> 5%
2 changes: 1 addition & 1 deletion cms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

__version__ = '3.3.0.dev3'
__version__ = '3.3.0.dev4'

default_app_config = 'cms.apps.CMSConfig'
96 changes: 64 additions & 32 deletions cms/cache/page.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# -*- coding: utf-8 -*-

import hashlib

from datetime import timedelta

from django.conf import settings
from django.utils.cache import add_never_cache_headers
from django.utils.cache import add_never_cache_headers, patch_response_headers
from django.utils.encoding import iri_to_uri, force_text
from django.utils.timezone import get_current_timezone_name
from django.utils.timezone import now, get_current_timezone_name

from cms.cache import _get_cache_version, _set_cache_version, _get_cache_key
from cms.constants import EXPIRE_NOW, MAX_EXPIRATION_TTL
from cms.utils import get_cms_setting


Expand All @@ -29,41 +34,68 @@ def _page_cache_key(request):
def set_page_cache(response):
from django.core.cache import cache

if not get_cms_setting('PAGE_CACHE'):
return response
request = response._request
save_cache = True
for placeholder in getattr(request, 'placeholders', []):
if not placeholder.cache_placeholder:
save_cache = False
break
if hasattr(request, 'toolbar'):
if request.toolbar.edit_mode or request.toolbar.show_toolbar:
save_cache = False
if request.user.is_authenticated():
save_cache = False
if not save_cache:
add_never_cache_headers(response)
return response
else:
version = _get_cache_version()
ttl = get_cms_setting('CACHE_DURATIONS')['content']

cache.set(
_page_cache_key(request),
(response.content, response._headers),
ttl,
version=version
)
# See note in invalidate_cms_page_cache()
_set_cache_version(version)

if get_cms_setting("PAGE_CACHE") and (
not hasattr(request, 'toolbar') or (
not request.toolbar.edit_mode and
not request.toolbar.show_toolbar and
not request.user.is_authenticated()
)):

# This *must* be TZ-aware
timestamp = now()

placeholders = [ph for ph, __ in getattr(request, 'placeholders', {}).values()]

# Checks if there's a plugin using the legacy "cache = False"
if all(ph.cache_placeholder for ph in placeholders):
placeholder_ttl_list = [
# get_cache_expiration() always returns:
# EXPIRE_NOW <= int <= MAX_EXPIRATION_IN_SECONDS
ph.get_cache_expiration(request, timestamp)
for ph in placeholders
]

if EXPIRE_NOW not in placeholder_ttl_list:
if placeholder_ttl_list:
min_placeholder_ttl = min(x for x in placeholder_ttl_list)
else:
# Should only happen when there are no placeholders at all
min_placeholder_ttl = MAX_EXPIRATION_TTL
ttl = min(
get_cms_setting('CACHE_DURATIONS')['content'],
min_placeholder_ttl
)

if ttl > 0:
# Adds expiration, etc. to headers
patch_response_headers(response, cache_timeout=ttl)
version = _get_cache_version()
# We also store the absolute expiration timestamp to avoid
# recomputing it on cache-reads.
expires_datetime = timestamp + timedelta(seconds=ttl)
cache.set(
_page_cache_key(request),
(
response.content,
response._headers,
expires_datetime,
),
ttl,
version=version
)
# See note in invalidate_cms_page_cache()
_set_cache_version(version)
return response

add_never_cache_headers(response)
return response


def get_page_cache(request):
from django.core.cache import cache

return cache.get(_page_cache_key(request),
version=_get_cache_version())
return cache.get(_page_cache_key(request), version=_get_cache_version())


def get_xframe_cache(page):
Expand Down
10 changes: 7 additions & 3 deletions cms/cache/placeholder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from django.utils.encoding import force_text
from django.utils.timezone import get_current_timezone_name
from django.utils.timezone import get_current_timezone_name, now
from cms.cache import _get_cache_version, _set_cache_version, _clean_key, _get_cache_key
from cms.utils import get_cms_setting

Expand All @@ -14,14 +14,18 @@ def _placeholder_cache_key(placeholder, lang):
return cache_key


def set_placeholder_cache(placeholder, lang, content):
def set_placeholder_cache(placeholder, lang, content, request):
"""
Caches the rendering of a placeholder
"""
from django.core.cache import cache

cache.set(_placeholder_cache_key(placeholder, lang),
content,
get_cms_setting('CACHE_DURATIONS')['content'],
min(
get_cms_setting('CACHE_DURATIONS')['content'],
placeholder.get_cache_expiration(request, now())
),
version=_get_cache_version())
_set_cache_version(_get_cache_version())

Expand Down
3 changes: 2 additions & 1 deletion cms/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ class AliasPlugin(CMSPluginBase):

def render(self, context, instance, placeholder):
from cms.utils.plugins import downcast_plugins, build_plugin_tree
request = context.get('request', None)
context['instance'] = instance
context['placeholder'] = placeholder
if instance.plugin_id:
plugins = instance.plugin.get_descendants().order_by('placeholder', 'path')
plugins = [instance.plugin] + list(plugins)
plugins = downcast_plugins(plugins)
plugins = downcast_plugins(plugins, request=request)
plugins[0].parent_id = None
plugins = build_plugin_tree(plugins)
context['plugins'] = plugins
Expand Down
4 changes: 2 additions & 2 deletions cms/cms_toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def init_from_request(self):
self.page = get_page_draft(self.request.current_page)

def init_placeholders_from_request(self):
self.placeholders = getattr(self.request, 'placeholders', [])
self.placeholders = getattr(self.request, 'placeholders', {})
self.statics = getattr(self.request, 'static_placeholders', [])

def populate(self):
Expand All @@ -78,7 +78,7 @@ def add_structure_mode(self):
if self.page.has_change_permission(self.request):
return self.add_structure_mode_item()

elif self.placeholders:
elif any([ph for ph, perms in self.placeholders.values() if perms]):
return self.add_structure_mode_item()

for sp in self.statics:
Expand Down
5 changes: 4 additions & 1 deletion cms/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-


TEMPLATE_INHERITANCE_MAGIC = 'INHERIT'
REFRESH_PAGE = 'REFRESH_PAGE'
URL_CHANGE = 'URL_CHANGE'
Expand All @@ -27,3 +26,7 @@
REVISION_INITIAL_COMMENT = "Initial version."

SLUG_REGEXP = '[0-9A-Za-z-_.//]+'

EXPIRE_NOW = 0
# HTTP Specification says max caching should only be up to one year.
MAX_EXPIRATION_TTL = 365 * 24 * 3600
Loading