Commit Graph

38 Commits

Author SHA1 Message Date
Maja Komel 04baddf731 DEV: migrate tests to async/await 2018-07-30 12:21:05 +02:00
Joffrey JAFFEUX 60ff0e9b8c
missing prettified files 2018-06-15 18:42:20 +02:00
Guo Xiang Tan 4319273cf5 UX: Split up group form into smaller sections. 2018-04-09 15:14:50 +08:00
Joffrey JAFFEUX 315b9d796d
select-kit refactoring
* better test helper
* more reliable tests
* more consistent use of data-value/data-name/title/aria-label everywhere: header and rows
2017-12-22 13:08:12 +01:00
Joffrey JAFFEUX c1c31b99ce
Replaces toolbar popup-menu with select-kit 2017-12-13 10:49:32 +01:00
Joffrey JAFFEUX 316d814130
FIX: staff should always be allowed to create polls if they are enabled 2017-12-05 00:03:56 +01:00
Joffrey JAFFEUX 76bc173d47
FEATURE: adds poll_allow_staff_to_create
This setting will bypass poll_minimum_trust_level_to_create if set to true
2017-12-04 18:12:17 +01:00
Joffrey JAFFEUX 63bab32816 FEATURE: introduces minimum trust level for polls (#5391)
* FEATURE: introduces minimum trust level for polls

This commit makes `poll_enabled` less misleading and introduces `poll_minimum_trust_level_to_create`. If poll are enabled they will always be cooked, and if you have the required trust level you can create polls. As a side effect, it also fixes a bug where rebaking a post created by staff member when `poll_enabled=false` would end up not cooking it.

It also adds more tests to ensure settings are respected.

* admins should be whitelisted

* checks for admin in post validation

* test for >= instead of == trust level
2017-12-04 14:47:11 +01:00
Eric Berry ab22c8cad4 FIX: Infinite loop when poll step is zero (#5380)
* Fix infinite loop when poll step is zero

* Add test for step minimum and for breaking test

* Remove trailing spaces (eslint)

* Remove extra space (eslint)

* Removed test call .twice
2017-11-30 17:04:41 +01:00
Joffrey JAFFEUX 9208909b26 tweak icon-library generation 2017-11-23 18:24:26 +01:00
Joffrey JAFFEUX 39f3dbd945
Introduces select-kit
* renames `select-box-kit` into `select-kit`
* introduces `single-select` and `multi-select` as base components
* introduces {{search-advanced-category-chooser}} as a better component for selecting category in advanced search
* improves events handling in select-kit
* recreates color selection inputs using {{multi-select}} and a custom {{selected-color}} component
* replaces category-selector by a component using select-kit and based on multi-select
* improves positioning of wrapper
* removes the need for offscreen, and instead use `select-kit-header` as a base focus point for all select-kit based components
* introduces a formal plugin api for select-kit based components
* introduces a formal pattern for loading and updating select-kit based components:

```
computeValue()
computeContent()
mutateValue()
```
2017-11-21 11:53:09 +01:00
David Taylor ea032d8372 Improve source code linting for continuous integration (#5017)
* Add rubocop linting to docker:test rake task

* Add eslint JS listing to plugin files, and add SKIP_LINT variable

* Fix failing ‘polls’ plugin eslint

Using eslint-disable-line, as is done in core qunit tests such as `acceptance/group-logs-test.js.es6`

* Add plugin test eslint to travis config

* Merge some eslint lines
2017-08-02 11:33:29 +09:00
Robin Ward 5b590b9637 REFACTOR: Replace some `fa-*` uses with helpers 2017-07-27 14:55:41 -04:00
Robin Ward cc525b1a8d Upgrade QUnit to latest version 2017-06-15 10:12:07 -04:00
Rafael dos Santos Silva 3eb125c39b FIX: Fix poll builder qunit tests 2017-04-05 18:07:50 -03:00
Robin Ward e089515dab FIX: Don't try to load avatars in test mode 2017-02-17 16:21:35 -05:00
Guo Xiang Tan 8bd8f07ce0 FIX: Public polls should not make a request per option. 2017-01-31 17:27:43 +08:00
Guo Xiang Tan 288e5faf6b FIX: Sort needs to be stable. 2016-12-22 11:45:41 +08:00
Robin Ward e03d5e2140 Reapply Ember 2.10 for good this time!
This reverts commit ddd299f4aa.
2016-12-19 11:19:10 -05:00
Robin Ward ddd299f4aa Revert "Revert "Revert Ember 2.10+ for a short while""
This reverts commit 76bbc481cb.
2016-12-16 10:29:30 -05:00
Robin Ward 76bbc481cb Revert "Revert Ember 2.10+ for a short while"
This reverts commit 21682fd60b.
2016-12-16 09:52:29 -05:00
Robin Ward 21682fd60b Revert Ember 2.10+ for a short while 2016-12-15 16:43:38 -05:00
Robin Ward 28699e66d8 Revert "REVERT: Ember 2.10 -- it's not building properly"
This reverts commit 600541c623.
2016-12-15 10:28:15 -05:00
Robin Ward 600541c623 REVERT: Ember 2.10 -- it's not building properly 2016-12-12 16:19:05 -05:00
Robin Ward 765e5e9186 Upgrade to Ember 2.9 2016-12-12 14:44:29 -05:00
Robin Ward f07443b488 Migrate Discourse Polls to use vdom instead of embedded ember 2016-12-09 10:42:56 -05:00
Guo Xiang Tan 6b4ef86ac4 Add acceptance test for rendering polls. 2016-12-01 10:58:00 +08:00
Robin Ward 28061316ad Migrate poll plugin to use components 2016-11-21 14:49:46 -05:00
Robin Ward 6a1c05a268 Upgrade ember-qunit 2016-11-08 14:29:50 -05:00
Guo Xiang Tan d970f4d3d8 Fix incorrect test. 2016-07-29 17:05:00 +08:00
Guo Xiang Tan e336e56153 FIX: Incorrect sort for poll results. 2016-07-29 14:42:55 +08:00
Guo Xiang Tan 32c962cfd8 UX: Remove button styles on polls. 2016-07-29 11:09:23 +08:00
Guo Xiang Tan a7f2b2ded6 FEATURE: Allow poll results to be sorted. 2016-07-29 10:37:27 +08:00
Robin Ward 8141e1d9bc FIX: details fixes with extra formatting 2016-07-19 15:14:55 -04:00
Loic Dachary f152900969 FIX: poll builder should ignore empty lines
Although pollOptionsCount skips empty lines, pollOutput inserts empty
lines. Skip them instead.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-07-14 09:27:43 +02:00
Guo Xiang Tan 01c563ca85
FIX: Use internal value for poll builder. 2016-06-20 12:40:44 +08:00
Guo Xiang Tan 4df224bb79
FIX: Trim whitespaces and do a global replace. 2016-06-16 16:35:23 +08:00
Guo Xiang Tan 8d46727d67
FEATURE: Poll UI Builder. 2016-06-15 11:14:24 +08:00