1
0
Fork 0
Commit-Graph

118 Commits

Autor SHA1 Nachricht Datum
Angus McLeod
46c86cda58 Move to new coverage approach 2022-03-12 14:00:07 +01:00
Angus McLeod
dd067768fd FIX: use request_store properly 2022-02-09 10:30:46 +11:00
Faizaan Gagan
f0580d2bba
FEATURE: allow tags from tag field to be confined to a tag group (#175)
* FEATURE: allow tag field to be confined to a tag group

* fixed linting

* bump minor version

* moved monkeypatch to a separate module

* use snake case for variable names

* added specs
2022-02-07 11:10:52 +05:30
Faizaan Gagan
51553bc71d
FEATURE: validate liquid templates on wizard save (#156)
* DEV: validate liquid templates on wizard save

* minor fix

* code improvements and spec

* version bump

* fixed failing specs

* FIX: handle displaying backend validation errors on frontend

* fixed linting

* improved error display

* validate raw description for steps

* refactor conditional

* Identify attribute with liquid template error and pass syntax error

Co-authored-by: angusmcleod <angus@mcleod.org.au>
Co-authored-by: Angus McLeod <angusmcleod@users.noreply.github.com>
2022-01-31 15:11:14 +05:30
Angus McLeod
5e5b5e67ee
FIX: Cache valid directs and only allow one type in a template (#176)
* Cache valid directs and only allow one type in a template

* Add spec

* Bump version

* Bump version

* Exclude current wizard from other_after_signup
2022-01-31 14:48:04 +05:30
Faizaan Gagan
f5a35baa1b simplified logic 2022-01-31 12:50:20 +05:30
Faizaan Gagan
5d882d69a2 merged 'main' and resolved conflicts 2022-01-31 09:47:12 +05:30
Faizaan Gagan
00682fb4c2
FIX: field validation was not working in backend (#165)
* FIX: field validation was not working in backend

* added tests
2021-12-07 14:20:34 +05:30
Faizaan Gagan
dec5f5b5ce added more specs and fixed formatting 2021-10-30 16:03:30 +05:30
Faizaan Gagan
c1481e2ad4 Merge branch 'main' into wizard-permissions 2021-10-30 14:29:32 +05:30
angusmcleod
f908e5ec9d Add spec for fix 2021-10-20 21:19:21 +08:00
Faizaan Gagan
687c3530b3 WIP 2021-10-19 09:05:55 +05:30
Faizaan Gagan
d9d4c7d8fa WIP 2021-10-14 18:27:18 +05:30
Faizaan Gagan
e260241dea group specs related to skip functionality in a context 2021-08-13 18:58:41 +05:30
Faizaan Gagan
61c92ec768 FIX: reset user's progress on wizard skip 2021-08-13 17:49:31 +05:30
Faizaan Gagan
249cda4de6 Merge branch 'master' into maybe_later_bug 2021-08-12 19:57:38 +05:30
Faizaan Gagan
973cffee26
FIX: disable string caching in Oj gem while running specs (#139) 2021-08-12 19:56:17 +05:30
Faizaan Gagan
89f733ae32 added spec to verify functionality 2021-08-12 17:11:58 +05:30
Faizaan Gagan
f00d01c50f
FIX: ensure single incomplete submission existence (#136)
* created method to fetch incomplete submissions

* added new field 'updated_at' to submission schema

* Revert "created method to fetch incomplete submissions"

This reverts commit 15c65236e7.

* added logic to cleanup redundant incomplete submissions

* logic improvements and spec

* simplified the cleanup logic

* simplified the logic further

* early return to improve performance

* consolidated cleanup logic

* perform cleanup in wizard.update

* fixed issue

* minor fix

* use consistent naming
2021-08-02 13:01:49 +05:30
Faizaan Gagan
998757f857
FIX: apply text length validations for non-empty fields only (#137)
* apply text length validations for non-empty fields only

* consolidated logic

* fixed formatting

* fix formatting

* calculate length only for string type values

* fix assignment

* added specs
2021-07-30 16:03:48 +05:30
angusmcleod
d602281a6a Fix failing test 2021-07-12 16:39:37 +08:00
angusmcleod
20c8ec1202 Merge branch 'master' into pr/125 2021-07-12 14:05:02 +08:00
Faizaan Gagan
e4df646022
FIX: clear site model cache to prevent spec failure (#132) 2021-07-08 13:04:03 +05:30
Faizaan Gagan
6d1958d772 Merge branch 'master' into submission_improvements 2021-06-28 13:54:03 +05:30
Faizaan Gagan
28400ee24e Merge branch 'master' into sprockets-fix 2021-06-26 13:30:37 +05:30
Angus McLeod
f80f40d6b3
Apply consistent date validation on the server (using v8) (#124)
* Apply consistent date validation on the server (using v8)

* Variable fix

* added specs to verify date/time field validation

* minor text change

Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
2021-06-26 13:15:33 +05:30
angusmcleod
098e8418fb Apply rubocop 2021-06-23 16:15:17 +10:00
angusmcleod
e441588aa3 Fix specs and tighten conditional handling 2021-06-23 16:13:58 +10:00
angusmcleod
d3c6733e59 Abstract and improve submission handling 2021-06-17 17:50:22 +10:00
Faizaan Gagan
7b9a54590b Merge branch 'master' into sprockets-fix 2021-06-16 14:28:55 +05:30
angusmcleod
dc7e43b6d7 Force second step build to overcome can_access? check
The can_access? check will fail if the wizard does not allow multiple submissions. This means that on the second build of the wizard on the final step of a single submission wizard, the wizard instance will have no steps, and an error will be thrown when logic assumes it does.
2021-06-16 16:21:24 +10:00
angusmcleod
33df6f9fbc Add test for skip when cant access 2021-06-16 14:24:07 +10:00
Angus McLeod
58b3bc13c9
FIX: Ensure user_email and user_option attributes are handled properly (#119) 2021-06-15 11:48:17 +05:30
Angus McLeod
af3e61fe75
Add custom field improvements (#115)
* Add custom field improvements

This PR does a few things to improve our support of custom fields
1. Adds custom fields added by other plugins to the list in admin/wizards/custom-fields and the custom field list in the mapper selector
2. Adds support for json custom fields in the wizard actions

* Make eslint happy

* Make prettier happy

* Make rubocop happy

* Make ember template lint happy

* Don't assume we have the context in the selector

* Ensure custom fields don't require optional attributes (with tests)
2021-06-08 17:09:49 +05:30
Angus McLeod
522d4e9489
IMPROVE: ensure redirect_to_wizard is cleaned up even if sidekiq is not working (#116)
* Add test of redirect_to_wizard when wizard is removed

* Make clear_user_wizard_redirect a synchronous operation
2021-06-07 18:45:41 +05:30
Faizaan Gagan
61ff018244 added spec 2021-05-30 18:30:51 +05:30
angusmcleod
0c4eb02038 Exclude gems from simplecov 2021-05-17 19:57:09 +12:00
Faizaan Gagan
ff14570d64 FIX: exclude conditional fields while saving step submission 2021-05-12 18:15:55 +05:30
Faizaan Gagan
a4adeecf5f Revert "Revert "DEV: add new sprockets directive to require discourse folders" (#111)"
This reverts commit ca125a2a8a.
2021-05-12 06:14:09 +05:30
Faizaan Gagan
ca125a2a8a
Revert "DEV: add new sprockets directive to require discourse folders" (#111) 2021-05-12 02:58:12 +05:30
Angus McLeod
edbba891f6
Merge pull request #86 from paviliondev/sprockets-fix
DEV: add new sprockets directive to require discourse folders
2021-05-10 19:07:32 +12:00
Faizaan Gagan
5f24882ef6 DEV: raise plugin specific errors on failure 2021-05-08 23:15:06 +05:30
Faizaan Gagan
56268823c5 confine exclusion to wizard fields 2021-05-07 03:28:16 +05:30
Faizaan Gagan
cdb9ec6c3e remove the directory after spec run 2021-05-03 04:19:27 +05:30
Faizaan Gagan
77dd879f80 minor formatting 2021-05-03 03:43:47 +05:30
Faizaan Gagan
13eabe0695 added specs 2021-05-03 03:42:26 +05:30
Faizaan Gagan
f05d859007
Enable templating (#102)
* enabled templating for create topic action

* enabled templating for step and field descriptions

* FIX: don't run pretty text on step description

* FIX: step description should be cooked post template parsing
2021-04-23 17:21:41 +05:30
Faizaan Gagan
eb93169f86 use option multiple and aggregate the result 2021-04-23 12:22:04 +05:30
Faizaan Gagan
be1eab6092 minor formatting 2021-04-22 23:52:38 +05:30
Faizaan Gagan
2a8a4367d8 added specs 2021-04-22 23:50:54 +05:30