0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00
Commit-Graph

258 Commits

Autor SHA1 Nachricht Datum
Angus McLeod
dd74989562 Remove out of date specs 2022-07-28 20:37:10 +01:00
Angus McLeod
60823cd87a First release candidate 2022-07-27 11:47:50 +01:00
Angus McLeod
1d7d9d1119 Fix failing specs 2022-05-31 13:16:28 +02:00
Angus McLeod
3e2faaa264 Merge branch 'main' into pro-release 2022-05-13 11:42:50 +02:00
Angus McLeod
294c35cf9b COMPATIBILITY: three custom fields were dropped in core
991b62b6f1
2022-05-13 11:40:08 +02:00
Angus McLeod
04f0d34ef3 Fix specs 2022-03-25 17:08:24 +01:00
Angus McLeod
f607863510 Remove more subscription related things and integrate with subscription client 2022-03-25 12:18:54 +01:00
Angus McLeod
d57f260def Cleanup after merge 2022-03-12 15:20:54 +01:00
Angus McLeod
69fd3d451d merge main 2022-03-12 15:08:56 +01:00
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
angusmcleod
4605b23585 Merge branch 'main' into pro-release 2022-01-27 17:51:24 +08:00
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
angusmcleod
853634be27 Fix failing specs 2021-11-17 20:26:44 +08:00
angusmcleod
98061c14e8 Fix spec (mostly) 2021-11-17 20:26:44 +08:00
merefield
c6b8e08e38 Add subscription level logic to back-end validation 2021-11-09 14:57:33 +00:00
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
merefield
0752f8068a fix subscription spec 2021-10-27 14:09:34 +01:00
merefield
791eab6c47 Fix action spec example 2021-10-27 14:02:21 +01:00
merefield
0b8fced879 rubocop changes 2021-10-22 19:04:37 +01:00
angusmcleod
f908e5ec9d Add spec for fix 2021-10-20 21:19:21 +08:00
merefield
487ad3c46d Fix test 2021-10-19 13:09:11 +01: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
Robert Barrow
a13096c8f1 merge in pro-release branch 2021-10-13 14:22:33 +01:00
Robert Barrow
e5fbc408f5 Add failing API call test 2021-10-12 14:49:09 +01:00
angusmcleod
b475e39ee9 Fix specs 2021-10-07 21:19:19 +08:00
angusmcleod
925c8c009a DEV: Add notice specs and UI updates 2021-10-05 20:54:06 +08:00
merefield
31e275668c API: remove byebug 2021-10-05 10:19:47 +01:00
merefield
5a424e8e3d API: add mocked request spec 2021-10-05 10:07:20 +01:00
angusmcleod
084c6f4a7a wip 2021-09-24 17:58:42 +08:00
angusmcleod
270d3bccf5 IMPROVE: translation feature 2021-09-14 11:33:16 +08:00
angusmcleod
7b57e7fcab Apply new table style to wizard logs view 2021-09-09 14:07:12 +08:00
angusmcleod
33824de1d1 Merge branch 'pro-features' of https://github.com/angusmcleod/discourse-custom-wizard into pro-features 2021-09-07 20:13:13 +08:00
angusmcleod
7c9a0ef862 Apply rubocop 2021-09-07 20:11:50 +08:00
Angus McLeod
f4d419cac2
Merge branch 'pro-release' into pro-features 2021-09-07 20:10:12 +08:00
angusmcleod
23c4b45195 Add pro feature specs 2021-09-07 20:06:13 +08:00
Angus McLeod
3383aec37f
Merge pull request #142 from paviliondev/ui_conventions
UX: Update Submissions Admin UI
2021-09-06 22:51:52 +08:00
angusmcleod
5063e3eaeb Merge branch 'ui_conventions' of https://github.com/paviliondev/discourse-custom-wizard into pr/142 2021-09-06 17:26:34 +08:00
angusmcleod
31b9e48c8f Apply rubocop 2021-09-06 17:26:22 +08:00
angusmcleod
f6c3c98d71 Add submission serializer spec 2021-09-06 17:25:08 +08:00
KC Maddever
e34f2b5076 Merge branch 'pro-release' into split_log_messages 2021-09-01 16:51:28 +08:00
angusmcleod
403f063b0f Fix failing specs 2021-09-01 11:10:49 +08:00
angusmcleod
001d116298 Merge branch 'master' into pro-release 2021-09-01 10:37:50 +08:00
KC Maddever
c394656ed8 DEV: update tests for split log fields 2021-08-31 14:34:47 +08:00
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
1a78b44d35 Apply rubocop 2021-07-14 14:06:54 +08:00
angusmcleod
34fee3729c Add pagination to submissions 2021-07-14 14:04:19 +08:00
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
Angus McLeod
ceef3f4bc9
Step and field conditionality (#87)
* Re structure builder logic to allow for step conditionality

Concerns
- Performance. Look at whether the additional build in the steps controller can be reduced
- Does not work if applied to the last step.
- Certain conditions will not work with the first step(?)
- How should this be scoped to known functionality?

* Add indexes and conditions to steps and fields

* Complete and add spec

* Complete backend

* Complete step conditionality and field indexing

* Fix failing spec

* Update coverage

* Apply rubocop

* Apply prettier

* Apply prettier to wizard js

* Fix schema issues created in merge

* Remove setting label for force_final

* Improve client wizard cache naming

* Improve steps controller and spec conditionality

* Improve final step attribute naming

* Fix failing spec

* Linting

* Add one more final step test

* Linting

* Fix eslint issues

* Apply prettier

* Linting, syntax, merge and copy cleanups

* Update wizard-admin.scss

* Fix template linting

* Rubocop fixes
2021-04-20 23:28:19 +05:30
Faizaan Gagan
9ded3602eb Merge branch 'master' into pm-multiple-targets 2021-04-19 11:04:47 +05:30
Faizaan Gagan
b71548427d
Added files used by github actions workflows (#78)
* Added files used by github actions workflows

* added simplecov report for tests workflow

* removed trailing space

* Rubocop fixes

* Update plugin-linting.yml

* Create Gemfile.lock

* Update Gemfile.lock

* Re-add bundler

* Update gitignore

* Limit yarn install to dev

* Update rubocop config and gemfile.lock

* allow strings to be mutated

* Update invites_controller_spec.rb

Co-authored-by: angusmcleod <angus@mcleod.org.au>
2021-04-16 13:37:32 +05:30
Faizaan Gagan
ce222c0c04 modified spec to confirm working for multiple users and groups 2021-04-15 02:15:20 +05:30
Faizaan Gagan
f443840358 FEATURE: allow targetting multiple users/groups when sending a private message 2021-04-14 08:59:12 +05:30
Faizaan Gagan
105fc46774
FEATURE: added liquid based templating (#83)
* FEATURE: added liquid based templating

* templating should be false by default

* added rspec tests for mapper templating

* wrapped templating tests in a context block

* added a custom liquid filter and tests

* ran rubocop on changed files

* DEV: minor variable and naming changes

* minor code formatting

* improved overall structure and tightened spec for custom filter

* added a spec template: false

* define method at the top of spec file

* naming convention

* removed extra space
2021-04-09 11:04:42 +05:30
angus
3bb244be79 Add .jpeg to list of default upload extensions 2021-03-12 21:12:26 +11:00
angus
e7a1472a1c Handle when permitted is set as "everyone" 2021-03-12 21:02:42 +11:00
Angus McLeod
4edb40e526
Apply rubcop and get tests pass (#76) 2021-03-11 12:00:15 +05:30
Angus McLeod
065bc17929
Update plugin_helper.rb (#75) 2021-03-11 11:08:12 +05:30
Faizaan Gagan
6754d744f0 renamed setting's copy to Max Topic Age 2021-02-25 17:10:02 +05:30
Faizaan Gagan
bc2cc85804 rename n_value to time_n_value 2021-02-25 15:59:42 +05:30
Faizaan Gagan
c54273b94a implemented a relative time based filtering for similar topics 2021-02-25 15:36:43 +05:30
angusmcleod
5794349244 Ensure url field validates properly and accepts empty inputs 2021-02-20 17:59:41 +11:00
angus
1a175b4d2b Ensure prompt completion works as intended
- Users who have completed should never see prompt
- Add rspec test for this case
2021-02-19 17:10:59 +11:00
angusmcleod
13525261ad Fix out of date open composer spec 2021-02-18 14:44:14 +11:00
angusmcleod
5e09d067bc Display category badge if similar topics is scoped to category 2021-02-18 14:40:59 +11:00
angusmcleod
8d72aee4fc Fix failing test (not RV related) 2021-02-17 14:40:04 +11:00
angusmcleod
4036313e75 Fix relative path 2021-02-17 14:36:54 +11:00
Faizaan Gagan
d68967c63f added plugin helper 2021-02-17 00:15:48 +05:30
Faizaan Gagan
c1b04eaaec added tests for required_params 2021-02-16 23:43:16 +05:30
Faizaan Gagan
40a2380775 added specs for CustomWizard::RealtimeValidationsController 2021-02-16 21:54:42 +05:30
Faizaan Gagan
47019664b1 removed context block 2021-02-16 20:06:05 +05:30
Faizaan Gagan
c5ad11c0a4 added tests for CustomWizard::RealtimeValidation::SimilarTopics class 2021-02-16 19:59:23 +05:30
Faizaan Gagan
c196c4fee7 added tests for CustomWizard::RealtimeValidation class 2021-02-16 19:58:43 +05:30
Angus McLeod
b5a6d15c9d Add wizard field tabindex relative to field order 2021-01-19 18:50:37 +11:00
Angus McLeod
909f82095f Encode each query param seperately using Addressable 2020-12-19 10:16:12 +11:00
Angus McLeod
2177f8e837
Merge pull request #63 from paviliondev/max-length
FEATURE: added max length setting for text type fields
2020-12-14 21:47:45 +11:00
Faizaan Gagan
efaa0c5915 FIX: broke down the max length test into different cases 2020-12-14 12:16:32 +05:30
Faizaan Gagan
e12faad1f5 added positive test for max length check 2020-12-08 13:29:36 +05:30
Faizaan Gagan
4f7d18d193 FEATURE: added max length setting for text type fields 2020-12-08 12:44:37 +05:30
Angus McLeod
cb3821c7d8 Update locale spec to reflect new non_access handling 2020-12-08 13:30:44 +11:00
Angus McLeod
be204c1cb6 Clean up tests 2020-12-04 18:06:33 +11:00
Angus McLeod
d453d97df3 Add custom-wizard-specific caching system
Initially for use with registered custom fields
2020-12-04 18:05:56 +11:00
Angus McLeod
8a2a143ea8 Invalidate cache before checking enabled? 2020-12-04 09:45:28 +11:00
Angus McLeod
39ce7248a8 Add enabled? wrapper for CustomField extensions 2020-12-01 18:20:02 +11:00
Angus McLeod
f6f77547d7 Use explicit file loading for tests coverage 2020-12-01 08:20:10 +11:00
Angus McLeod
f31054f75d Isolate and specify template and update validation 2020-11-26 14:05:50 +11:00
Angus McLeod
80080e0cf1 Use dynamic time in after_time tests 2020-11-23 11:40:46 +11:00
Angus McLeod
63a3115dda Return wizard locales according to wizard permissions 2020-11-23 11:11:13 +11:00
Angus McLeod
e066ee4b00 Revert "Remove unused ExtraLocaleController extension"
This reverts commit 37c18ff324.
2020-11-23 10:11:45 +11:00
Angus McLeod
542195a0e0
Merge pull request #60 from OrbitalOwen/bug-fix/min-length-composer
Add composer to valid text fields for min length option
2020-11-13 13:02:03 +11:00
Angus McLeod
5a7d8ea355 Add spec to ensure min_length applied to all text fields 2020-11-13 11:39:59 +11:00
Angus McLeod
b383538a6b Move to individual custom field saving 2020-11-10 11:56:11 +11:00
Angus McLeod
097af63090 Add preloading to custom field implementation 2020-11-09 17:50:17 +11:00
Angus McLeod
066eef4ef8 FEATURE: Wizard Manager
The "Transfer" UI has been upgraded into a full wizard manager, adding additional import/export features and bulk-delete functionality
2020-11-09 14:32:36 +11:00
Angus McLeod
37c18ff324 Remove unused ExtraLocaleController extension 2020-11-08 14:27:13 +11:00
Angus McLeod
3da4d546b2 Add custom field spec and improve custom field structure 2020-11-08 14:24:20 +11:00
Angus McLeod
1f1f2c5726 Don't require fields on a step update 2020-11-06 16:39:26 +11:00
Angus McLeod
fc7c5b9b34 Complete tests 2020-11-03 11:24:20 +11:00
Angus McLeod
b726d40a0c working builder and action specs 2020-10-31 18:05:50 +11:00
Angus McLeod
8fdd263d8e wip 2020-10-20 10:15:03 +11:00
Angus McLeod
ab18769820 various 2020-04-13 22:17:22 +10:00
Angus McLeod
d8fd5cb258 various 2020-04-11 16:22:12 +10:00
Angus McLeod
3c8dc540c8 wip 2020-04-10 17:57:49 +10:00
Angus McLeod
7b3ed54f29 various 2020-04-05 11:37:09 +10:00
Angus McLeod
b8369146c7 remove preset dropdown 2020-03-19 18:58:45 +11:00
Angus McLeod
3b9488cacb Fix spec for CI 2020-02-05 18:20:39 +11:00
Angus McLeod
79dcacf451 tweak 2019-12-12 15:47:59 +11:00
Angus McLeod
4d1ee9007b Improve custom wizard serialization and add spec 2019-12-12 15:43:11 +11:00