Commit Graph

24 Commits

Author SHA1 Message Date
Javi Martín
5cbd160f11 Move login_as after creating data for a test
It doesn't really affect the tests, but it helps isolate useless
assignments, and we already did it this way 94% of the time.
2019-09-25 12:43:44 +02:00
Javi Martín
2ec176a2a8 Remove redundant feature settings enabled in tests
These settings are enabled by default.

It could be argued explicitely enabling the features makes tests more
consistent, because they'll work if we change the default setting. It
could also be argued that it makes tests more expressive because it
makes the reader realize certain things will only work if a setting is
enabled.

However, we were only doing so in a few tests. The truth is, thousands
of our tests depend on certain features being enabled. So IMHO we should
be consistent and either set them on every test, or not at all. I'm
choosing the latter option for simplicity.
2019-09-23 15:15:51 +02:00
Javi Martín
da121ebc53 Remove redundant setting resets in after blocks
Settings are stored in the database, and so any changes to the settings
done during the tests are automatically rolled back between one test and
the next one.

There were also a few places where we weren't using an `after` block but
changing the setting at the end of the test.
2019-09-23 13:47:45 +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
Javi Martín
e252d82cdb Apply IndentationWidth rubocop rule 2019-09-10 20:02:15 +02:00
Senén Rodero Rodríguez
5eb5f02cbe Fix budget investment specs
After adding investment translatable fields to forms, they will be
generated with nested translations names and ids so we can no longer
use standard id locator.

Using input label text to fill in fields works with both types of forms.
2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
78c2f54c5d Fix proposal specs
After adding proposal translatable fields to forms, they will be generated with nested translations names and ids so we can no longer
use standard id locator.

Using input label text to fill in fields works with both types of forms.
2019-06-27 09:19:36 +02:00
decabeza
f40787561d Remove all references to question and external_url fields 2019-04-30 16:42:07 +02:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Javi Martín
5ae7a5512d Skip spec before doing any requests
Skipping a spec in the middle of it, particularly after doing some
requests, caused Capybara to keep using the same driver in the following
spec.

Since the current spec uses the JavaScript driver, the next test would
also use the JavaScript driver, causing apparently random failures if
that test was supposed to use the Rack driver.
2018-10-11 17:14:53 +02:00
Angel Perez
7b95f4c320 Correct typos on nested documentable/imageable 2018-09-10 11:45:48 -04:00
Angel Perez
0fce8ca787 Fix incorrect assertion for nested imageable example
The example tests if a certain selector is hidden after adding
one image but the assertion expected said selector to be visible,
which made the scenario to fail at random
2018-03-27 14:47:51 -04:00
Angel Perez
ceb38739c7 Use absolute paths for fixtures 2018-03-27 14:47:49 -04:00
decabeza
1d6877b797 adds setting allow_images to specs 2017-12-06 20:59:34 +01:00
Bertocq
ce0a7f6fad Rubocop autocorrections 2017-10-17 22:00:00 +02:00
rgarcia
9a31c97a20 fixes image specs 2017-10-06 14:01:03 +02:00
rgarcia
6327bcb343 adds specs for answer's gallery 2017-10-05 19:15:17 +02:00
rgarcia
52b68aa0df removes extra space 2017-10-04 23:58:36 +02:00
rgarcia
1cf9bc4ad1 adds images to anwers 2017-10-04 23:56:09 +02:00
Senén Rodero Rodríguez
f8d78ec4ab Remove new_nested action from images controller. Use cocoon gem to manage new nested fields creation on images. 2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
baf9ce90a9 Obfuscate documentable and imageable file names. 2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
966ff4dc03 User new direct uploads controllers action on imageable. 2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
314b7d73f7 Remove sleep from nested imageable shared feature specs. Use matchers able to wait new content to appear. 2017-09-26 13:55:03 +02:00
Senén Rodero Rodríguez
3310089208 Add nested imageable shared spec to check nested images behavior at imageable any recipients. 2017-09-26 13:55:03 +02:00