Commit Graph

66 Commits

Author SHA1 Message Date
David Taylor
9248ad1905 DEV: Enable Style/SingleLineMethods and Style/Semicolon in Rubocop (#6717) 2018-12-04 11:48:13 +08:00
David Taylor
404acef6e3 DEV: Move run-qunit.js out of the vendor directory 2018-12-03 16:16:37 +00:00
Sam
7ba681383d DEV: run plugin tests in autospec 2018-11-23 11:27:08 +11:00
Sam
d3b4f24ced DEV: correct watcher for controller specs 2018-08-22 14:35:57 +10:00
Sam
cc3fc87dd7 DEV: handle termination cleanly in autospec 2018-06-19 16:13:36 +10:00
Sam
db23e10efa DEV: watch plugin.rb in autospec 2018-05-21 15:19:10 +10:00
Matt Palmer
1ce8b7def8 Run a plugin's integration tests via autospec when anything changes 2018-05-09 12:33:12 +10:00
Sam
6a0aeae91b DEV: clean up JavaScript testing
- Unify runner for autospec and qunit:test
- Report on slowest 30 tests
- Use async await instead of promise tower
2018-04-23 14:43:04 +10:00
Guo Xiang Tan
6a4f391e38 Switch to chrome headless mode instead of phantomjs. 2017-12-19 16:00:43 +08:00
Sam
8eb00984ea improve plugin autospec watcher 2017-10-23 10:49:42 +11:00
Sam
70bb2aa426 FEATURE: allow specifying s3 config via globals
This refactors handling of s3 so it can be specified via GlobalSetting

This means that in a multisite environment you can configure s3 uploads
without actual sites knowing credentials in s3

It is a critical setting for situations where assets are mirrored to s3.
2017-10-06 16:20:01 +11:00
Bianca Nenciu
1c079bec33 Remove Spork dependency. 2017-08-10 22:54:52 +01:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Sam
e9fcd348f2 allow watcher to re-trigger specs on markdown change 2017-06-30 12:16:20 -04:00
Sam
234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00
Sam
435d4d51a4 add support for controller tests 2017-05-30 17:33:01 -04:00
Sam
3aa3c915e7 detect dead qunit 2017-05-24 12:24:34 -04:00
Sam
f5f4c36795 Increase autospec qunit timeout to 600 seconds
Correct it so it refocuses on correct runner after running a test
JS tests can not focus on line so skip in vim mode
2017-05-02 16:02:14 -04:00
Sam
556ef4cfbd FIX: case sensitive unconditional add of exact match in user search 2017-05-01 14:37:16 -04:00
Sam
a5fc51a967 improve QUNIT support for autospec 2017-05-01 13:50:28 -04:00
Sam Saffron
dafc4ec906 qunit runner in autospec has been a mess, opening moves to get it working 2017-04-30 19:45:29 -04:00
Sam Saffron
f04fbf911a FEATURE: in vim dev you can focus on spec line in autospec
instructions in bin/notify_file_change
2017-04-25 09:13:29 -07:00
Sam
2bc3aa7ed4 remove no digest refs
the digestless special dev behavior is no longer needed
2017-04-18 17:05:33 -04:00
Sam
2d636406dc FIX: in some case bundle exec fails from spawn
there is some bundler magic in here, prefer bin stubs anyway
cause they are a bit faster
2017-04-13 17:24:58 -04:00
Sam
22214f5e5c Upgrade the Listen gem 2017-04-13 10:39:36 -04:00
Sam
a3e8c3cd7b FEATURE: Native theme support
This feature introduces the concept of themes. Themes are an evolution
of site customizations.

Themes introduce two very big conceptual changes:

- A theme may include other "child themes", children can include grand
children and so on.

- A theme may specify a color scheme

The change does away with the idea of "enabled" color schemes.

It also adds a bunch of big niceties like

- You can source a theme from a git repo

- History for themes is much improved

- You can only have a single enabled theme. Themes can be selected by
    users, if you opt for it.

On a technical level this change comes with a whole bunch of goodies

- All CSS is now compiled using a custom pipeline that uses libsass
    see /lib/stylesheet

- There is a single pipeline for css compilation (in the past we used
    one for customizations and another one for the rest of the app

- The stylesheet pipeline is now divorced of sprockets, there is no
   reliance on sprockets for CSS bundling

- CSS is generated with source maps everywhere (including themes) this
    makes debugging much easier

- Our "live reloader" is smarter and avoid a flash of unstyled content
   we run a file watcher in "puma" in dev so you no longer need to run
   rake autospec to watch for CSS changes
2017-04-12 10:53:49 -04:00
Sam
58c2389a7b FEATURE: in dev use #focus to focus on failing test
(comment should be just above the def line)
2016-07-08 12:58:30 +10:00
Sam
29f6d960c6 FIX: autospec not monitoring correctly 2015-12-17 13:17:57 +11:00
Andy Waite
3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam
ad3dd161e7 FEATURE: first class group mentions built in
If you allow a group to be mentioned it can be mentioned with the @ symbol.

Keep in mind as a safety mechanism max_users_notified_per_group_mention is set to 100
2015-11-30 17:08:43 +11:00
Sam
eaae72c3e4 improve watching logic 2015-11-02 13:24:24 +11:00
Régis Hanol
e7e96eb8af fix the run-qunit scripts with backward compatible syntax 2015-08-25 17:37:36 +02:00
Régis Hanol
294669c856 FIX qunit test runner for phantomjs 2.0 2015-08-25 10:42:19 +02:00
Sam
374f951c65 fix live css changes on mobile 2015-06-22 14:35:11 +10:00
Sam
0681d8f150 qunit is opt in now 2015-05-22 11:22:12 +10:00
Sam
b0306fd613 DEV: make autospec compatible with rspec 3 2015-05-14 11:24:48 +10:00
Sam
bb20f64cb2 use standard error so its easier to catch 2015-03-23 12:20:50 +11:00
Sam
b916108927 be a bit more forgiving with reloader 2015-02-27 17:19:30 +11:00
Robin Ward
d0fb8bbcfc Instead of .js.handlebars use .hbs for handlebars templates 2014-09-26 15:23:15 -04:00
Akshay
6301a43d57 Not initializing variable for looping if unused in loop 2014-08-15 03:24:55 +05:30
Neil Lalonde
a644947119 FIX: live reload of css 2014-06-03 10:16:59 -04:00
Neil Lalonde
c4d3aa3d47 Theming: a UI to choose some base colors that are applied to all the site css. CSS compiled outside of asset pipeline. 2014-05-14 10:18:12 -04:00
Nick Schonning
3782fbed2b JSHint run-qunit.js
- Turn on devel for console and phantom for the phantomjs globals
- Remove unnecessary semicolons
- Use strict comparisons
- Add missing var statements used by for…in
2014-03-11 03:10:55 -04:00
Neil Lalonde
617a605ca2 NO_QUNIT=1 disables qunit in autospec 2013-11-28 11:04:53 -05:00
Régis Hanol
e45ab7d4a8 fix rspec reloaders 2013-11-05 14:53:35 +01:00
Régis Hanol
eb9c1f28ed add debug mode to autospec 2013-11-05 11:01:17 +01:00
Régis Hanol
b56b11d96a add qunit to autospec 2013-11-01 23:57:50 +01:00
Sam
b40d15f81d correct runner so you can run it in non-spork mode 2013-10-24 13:34:38 +11:00
Sam
1357f16563 add a simple runner for autospec 2013-10-24 12:08:03 +11:00
Sam
5bf26ec34e large refactor, ship a few columns from the user table into user_stats 2013-10-07 15:04:59 +11:00