Kaitlyn Crawford
d5e89d374b
Remove unnecessary imports
2018-01-25 19:51:50 +02:00
Kaitlyn Crawford
5b39e82f80
Fixed test for adding user counter to segment
2018-01-25 18:42:38 +02:00
Kaitlyn Crawford
fbcebb43a4
Store record count on a segment when it is created
2018-01-25 15:14:19 +02:00
Kaitlyn Crawford
ef271587ec
Test count_matching_users method
2018-01-25 13:26:05 +02:00
Kaitlyn Crawford
a00929846e
Set query rule to be static
2018-01-18 16:17:30 +02:00
Alex Muller
e3488e87ad
Enable and fix lint
2018-01-08 09:08:11 +00:00
Alex Muller
808aa6d202
Add tests for exclude_variants
2018-01-08 09:07:15 +00:00
Todd Dembrey
23b1456438
Add tests which cover anonymous users
2017-11-01 17:10:03 +00:00
Todd Dembrey
1f4a4536ab
Make the static elements tracked users only
...
We cannot track anonymous users as the session expires after 10 minutes of
inactivity. This also avoids an issue where there is an error when the user's
session has expired and they navigate a page
2017-11-01 16:43:22 +00:00
Todd Dembrey
7cf22d05f6
Tidy up the logic checks and remove the frozen property
2017-10-26 10:55:13 +01:00
Todd Dembrey
9e0fc8e6fd
Make the static segments work with match_any and fix bug in visit count
2017-10-24 10:50:05 +01:00
Todd Dembrey
a116b14d57
Update to use the save method on the form to populate the segments
2017-10-23 15:46:34 +01:00
Todd Dembrey
44cc95617e
Use a form to clean the instance
2017-10-23 15:00:31 +01:00
Todd Dembrey
c6ff2801c5
Update to use a post_init signal to populate the segment
2017-10-20 17:33:47 +01:00
Todd Dembrey
cf41be4b76
Add clean method to ensure mixed static segments are valid
2017-10-20 10:57:19 +01:00
Todd Dembrey
f339879907
Ensure that mixed static and dynamic segments are not populated at runtime
2017-10-20 09:53:18 +01:00
Todd Dembrey
8c96fffd4e
Ensure that the session is checked correctly
2017-10-17 17:35:57 +01:00
Todd Dembrey
675d219f1f
Add the logic for static segments
2017-10-17 16:57:07 +01:00
Michael van Tellingen
281086a159
Rename variations to variants
2017-06-02 15:31:46 +02:00
Michael van Tellingen
537dfb12a6
Fix test
2017-06-02 15:16:59 +02:00
Michael van Tellingen
6f96f2f172
Add more tests for wagtail_hooks
2017-06-02 11:23:39 +02:00
Michael van Tellingen
559d3c5356
Add unittest for serving a regular page
...
See #150
2017-06-02 10:32:41 +02:00
Michael van Tellingen
5aa754dd80
Rename PersonalisablePageMixin.personalisable_metadata
...
Use PersonalisablePageMixin.personalisation_metadata instead to mirror
the package name
2017-06-02 10:23:46 +02:00
Michael van Tellingen
282baa4787
Add tests for the wagtail_hooks.serve_variaton
2017-06-02 10:19:32 +02:00
Michael van Tellingen
35c22cb6af
Use correct filenames for the tests (and split some)
2017-06-02 10:11:46 +02:00
Michael van Tellingen
6c5ab9c6ae
Merge HomePage/SpecialPage to ContentPage in the tests
...
No need to create separate models with the same functionality
2017-06-02 09:30:04 +02:00
Michael van Tellingen
7076973fc8
Refactor personalisable pages
...
Instead of working with django model mixins it now uses a separate
model entity to keep track of the personalized pages (metadata).
The current downside of this approach is that the segment of an existing
variant is no longer easily adjustable for now.
2017-05-31 21:31:40 +02:00
Paul J Stevens
d4421eebcb
minor cleanup
2017-05-31 17:58:25 +02:00
Bertrand Bordage
38a18f80a4
Merge pull request #146 from LabD/simplifications+optimisations
...
Handles both Python 2 & 3, and multiple optimisations & simplifications.
2017-05-31 17:50:56 +02:00
Bertrand Bordage
85613db363
Merge branch 'simplifications+optimisations' of github.com:LabD/wagtail-personalisation into simplifications+optimisations
2017-05-31 17:43:18 +02:00
Bertrand Bordage
f88722c827
Further simplifications.
2017-05-31 17:38:51 +02:00
Michael van Tellingen
e6fac5f7fb
Fix templatetag tests
2017-05-31 17:19:24 +02:00
blurrah
82f2dd460e
adds tests for templatetag
2017-05-31 17:19:24 +02:00
Paul J Stevens
99d2e4a347
support multiple uses of the mixin class ( #140 )
2017-05-31 16:50:56 +02:00
Michael van Tellingen
63d5de9803
Optimize query for the segment visits
2017-05-31 16:37:10 +02:00
Michael van Tellingen
5eefa21699
Add test for sessionadapter.refresh when segment is disable
2017-05-31 16:19:09 +02:00
Michael van Tellingen
03073eb004
Add unittests for the session adapter
2017-05-31 16:13:30 +02:00
Paul J Stevens
ebef7f8785
refactor and add tests
2017-05-31 15:59:09 +02:00
Paul J Stevens
623af1a06a
start using correct model in tests
2017-05-31 15:59:09 +02:00
Michael van Tellingen
7436384471
Move visit count logic to the segment adapter
...
This makes the code also a bit simpler and updates the tests
2017-05-31 13:57:19 +02:00
Michael van Tellingen
3eac2cd4dd
Codestyle fixes (flake8)
...
This also adds the flake8 dependencies to the test extras for
installation.
2017-05-28 09:13:08 +02:00
Jasper Berghoef
ebde527ae9
Renames the module from ‘personalisation’ to ‘wagtail_personalisation’
2017-05-26 16:31:54 +02:00
Jasper Berghoef
5f1c52c93c
Fixes persistent rule persisting
2017-05-24 21:21:24 +02:00
Michael van Tellingen
02e18491bb
Fix test dependencies and skip one test for now
2017-05-24 17:05:34 +02:00
blurrah
ec7b00c318
adds a few docblocks and isorts
2017-05-03 15:04:52 +02:00
Jasper Berghoef
6640bf8d74
Splits test factories and updates documentation
2017-04-25 16:15:33 +02:00
Jasper Berghoef
d468c68970
Changes reference to rule models in adapter and tests
2017-04-19 11:40:21 +02:00
Michael van Tellingen
8e754fef07
Use wagtail-factories for testing
2017-02-18 22:46:51 +01:00
Jasper Berghoef
597c0a50f0
Device detection and accompanying rule
...
Signed-off-by: Jasper Berghoef <jasper.berghoef@gmail.com >
2017-01-11 15:28:40 +01:00
Jasper Berghoef
a7b477d71f
Day rule and accompanying tests
...
Signed-off-by: Jasper Berghoef <jasper.berghoef@gmail.com >
2017-01-10 15:36:25 +01:00