Commit Graph

38 Commits

Author SHA1 Message Date
Javi Martín
2cd4696244 Don't include unneeded helpers in tests
Including them might lead to conflicts since two methods might have the
same name. For example, we're getting some exceptions when taking
screenshots of a failing test, because the method `image_path` from
`ActionView::Helpers::AssetUrlHelper` has the same name as a method used
to save the screenshot.

Besides, we were including all helpers in places were only the `dom_id`
method is used, and in other places where no helper methods were used at
all. So we can just invoke `ActionView::RecordIdentifier.dom_id`
directly.
2020-04-16 12:08:09 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
78c6f6f7e9 Use the same key for "signin" and "signup" texts
We were using the same texts in several places
2019-10-05 14:07:23 +02:00
Javi Martín
91c21b0982 Remove instance variables in RSpec
Instance variables might lead to hard-to-detect issues, since using a
nonexistent instance variable will return `nil` instead of raising an
error.
2019-09-30 16:43:10 +02:00
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
decabeza
6b85ed8747 Add show and collapse text on comments tree 2019-05-31 11:40:57 +02:00
decabeza
0154bc556d Add link to comment path on comment date 2019-05-31 11:40:53 +02:00
Javi Martín
307cf24846 Use describe on feature tests
The `type: :feature` is automatically detected by RSpec because these
tests are inside the `spec/features` folder. Using `feature` re-adds a
`type: :feature` to these files, which will result in a conflict when we
upgrade to Rails 5.1's system tests.

Because of this change, we also need to change `background` to `before`
or else these tests will fail.
2019-05-28 16:36:54 +02:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Angel Perez
4ddc869441 Mitigate recurrent flaky specs for voting comments 2018-07-13 22:42:41 +02:00
Angel Perez
b3ce674ffc Enable previously disabled test scenarios 2018-03-27 14:47:50 -04:00
Angel Perez
38af45d450 Replace deprecated .trigger('click') API with .click 2018-03-27 14:47:49 -04:00
Bertocq
34bb9d65b1 Enable RSpec/NotToNot cop and fix all issues
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
2018-01-07 17:39:48 +01:00
Bertocq
e4e78c8f16 Rubocop autocorrections 2017-09-14 15:08:35 +02:00
iagirre
1356ea217b Erased extra empty HTML for comments without replies. Added .gitignore rules for Netbeans projects
Cambios para hacer commit:
	modificado:    .gitignore
	modificado:    app/assets/javascripts/comments.js.coffee
	modificado:    app/views/comments/_comment.html.erb
	modificado:    spec/features/comments/debates_spec.rb
2017-09-13 13:30:37 +02:00
Bertocq
69f4e1c683 Fix all rubocop Metrics/LineLength issues (140+) 2017-07-10 13:22:49 +02:00
Bertocq
f6fe9cc7d2 Fix all Layout/SpaceAroundOperators rubocop issues and remove file list from rubocop_todo list 2017-06-26 18:04:20 +02:00
kikito
f0b8cfd4a2 Time.now -> Time.current 2016-11-23 19:19:19 +01:00
Alberto Garcia Cabeza
702cfe13d1 Fixes specs 2016-07-06 14:47:09 +02:00
Juanjo Bazán
91199cda77 removes capybara warning messages 2016-04-25 11:44:33 +02:00
kikito
171c4dde13 forces capybara to wait after pushing a button by adding an extra expectation 2016-02-24 11:25:37 +01:00
Juanjo Bazán
f849f30e13 fixes flaky spec 2016-02-17 13:12:18 +01:00
Juanjo Bazán
3bd767e36f collapsable comments on proposals/debates 2016-02-10 19:27:15 +01:00
rgarcia
816a95b7b7 adds comment show view 2016-01-07 15:18:28 +01:00
Jakub
8974276681 Spec: Ensure that the submit button is disabled when clicked 2015-11-27 14:44:12 +01:00
kikito
73c306a673 Adds 3 orders for comments: most_voted, newest, oldest 2015-11-02 14:01:55 +01:00
kikito
2fab210ac8 merges with master and fixes conflicts 2015-10-31 17:09:52 +01:00
kikito
ddc8097e7d adds feature tests for the descendant comment sorting 2015-10-30 20:28:06 +01:00
kikito
50fdd005a4 Implements comment sorting in proposals and debates 2015-10-28 18:40:32 +01:00
kikito
26a9ca58cd Fixes failing tests which failed due to a new form existing now 2015-10-28 17:35:59 +01:00
Alberto Garcia Cabeza
2bf6603207 Merges master and fixes conflicts 2015-10-28 12:51:23 +01:00
Alberto Garcia Cabeza
abad54d01a Updates tests with new texts 2015-10-28 12:47:51 +01:00
Sergio Arbeo
12ec1fe6f6 Update comments count when commenting on a debate or proposal 2015-10-27 01:02:39 +01:00
Sergio Arbeo
fe55c0bdc2 Fix feature tests 2015-10-26 01:35:21 +01:00
kikito
314dabc2e4 deactivating randomly failing scenario which required clicking twice in the same button 2015-10-23 13:06:00 +02:00
kikito
2bfd012369 fixes some random test failures 2015-10-23 12:49:51 +02:00
kikito
6c5d1faa90 Uses the new field, erased_at, for erased users 2015-10-21 14:28:21 +02:00
Juanjo Bazán
a63ca9fce2 renames missing specs 2015-09-15 22:34:43 +02:00