Commit graph

722 commits

Author SHA1 Message Date
Henne Vogelsang
7f1d3b923a
Merge pull request #2662 from AndrewKvalheim/issue-2661-workaround
Fix bug in test of animated form
2021-03-06 20:02:04 +01:00
Henne Vogelsang
0729c6f6fe
Merge pull request #2659 from AndrewKvalheim/transactional-tests
Use Rails transactional tests
2021-03-06 20:01:47 +01:00
Andrew Kvalheim
07f1323eff
Fix bug in test of animated form
The help text for the event type field is animated using a technique
unaffected by `Capybara.disable_animation`. Wait for the animation.

Resolves: #2356
Works around: #2661
2021-03-06 19:43:35 +01:00
Andrew Kvalheim
c3e02c20b9
Use Rails transactional tests
As of Rails 5.1:

  - Rails has built-in support for running tests within database
    transactions, so Database Cleaner is no longer needed for this.
  - Rails automatically shares the database connection across threads,
    so transactional_capybara is no longer needed.

Changes:

  - Enable `use_transactional_tests`.
  - Remove transactional_capybara.
  - Remove the Database Cleaner test wrapper.

This resolves:

  - transactional_capybara mismanages the shared database connection,
    causing the connection to falsely report as idle after the first
    test. At 6 minutes (idle_timeout + reaping_frequency) into testing,
    the connection is closed, causing e.g. `PG::ConnectionBad` errors.
2021-03-06 19:41:06 +01:00
Andrew Kvalheim
310fc8dc68
Fix bug in test database preparation
Presumably the intent of this was to clear the database and repopulate
it with seed data. `transaction` isn't the right strategy for this; it
just rolls back any existing transactions.
2021-03-06 19:41:06 +01:00
Andrew Kvalheim
2c8521a2e5
Remove redundant code
This functionality is provided by transactional_capybara.
2021-03-06 19:41:05 +01:00
Andrew Kvalheim
c0913ab723
Work around RuboCop false positive
Details: rubocop-hq/rubocop#7853
2021-03-06 19:38:47 +01:00
Andrew Kvalheim
0df16e4773
Fix bug in logging of screenshots of failed tests
Presumably this was a typo.
2021-03-06 19:38:47 +01:00
Espartaco Palma
5d79049e59
Linters gonna lint
I was not aware the linting was also applied to specs
2021-03-06 19:09:38 +01:00
Espartaco Palma
fd2635509f
Introducing delegation for city and country name (Conference - Venue
Using ActiveSupport delegate macro.
2021-03-06 19:06:36 +01:00
Henne Vogelsang
2b0a257090
Set cobertura as simplecove formatter in github actions 2021-03-06 18:37:04 +01:00
Stella Rouzi
cb7519f7a4
Check CfP existence in proposal form 2021-03-06 12:38:02 +01:00
Henne Vogelsang
823f41427f
Merge pull request #2591 from openSUSE/remove-travel-schedule
Remove travel schedule from registration
2021-03-06 05:04:07 +01:00
James Mason
7a04f3582f
Remove travel schedule from registration
(cherry picked from commit d18cc02f0185df39bb4213d8a63a955dfb433dcb)
Re: https://github.com/openSUSE/osem/issues/2333
2021-03-06 04:09:02 +01:00
Emily Gonyer
77accc1100
removed-gendered-terms 2021-03-06 03:27:38 +01:00
Henne Vogelsang
b688d353ac
Skip some failing specs... 2021-03-06 02:41:07 +01:00
Henne Vogelsang
634bc832e3
Remove pry requires from spec 2021-03-06 02:41:07 +01:00
Hiroshi SHIBATA
ae98ac1430
Fixed some typos (#2695)
* Fix typos
2020-10-30 11:06:43 +02:00
Thomas Schmidt
f5ac859b9b
The "chromeOptions" key in chrome capabilities changed to "goog:chromeOptions".
But I'm rather switching to the 'option' array here for readability and alignment with Firefox options.
2020-09-29 00:02:18 +02:00
Tymm Schmitke
40036899b3 Add empty line at end of file 2020-05-19 23:18:05 -04:00
Tymm Schmitke
aa99f909a6 Add uniqueness tests for Event scope on Vote model with User association 2020-05-19 22:24:37 -04:00
Andrew Kvalheim
a179a38fae Minor refactor 2020-04-01 08:53:46 -07:00
Andrew Kvalheim
10f0edac20 Decouple tests from unspecified data ordering
These tests have been passing with SQLite, but don't reflect guaranteed
behavior and with PostgreSQL failed intermittently.
2020-03-29 09:06:47 -07:00
Andrew Kvalheim
a7006a4edd Decouple tests from unspecified data ordering
These tests have been passing with SQLite, but don't reflect guaranteed
behavior and with PostgreSQL failed intermittently.
2020-03-28 15:15:01 -07:00
Stella Rouzi
8cf9c15a46 Revert change of active user definition
Closes #2560

Active users are needed for selectize, and the active definition changed to show recent users in #2297

This reverts that change, and provides
* active scope (user not disabled)
* recent scope (for use in #2297 changes, ie user distribution)
2019-10-24 18:34:12 +03:00
Rahul
bf7a7932ba add booth in alias
Booth can be replaced with any alias by replacing it in alias.en.yml.
2019-08-10 21:40:25 +05:30
Ana María Martínez Gómez
9e1b214c60
Disable capybara animation
Turn off jquery animation to avoid tests with animations to fail and make
tests easy to debug.

Co-authored-by: Stephan Kulow <coolo@suse.de>
2019-07-17 00:16:41 +02:00
Henne Vogelsang
04616a9b24
Switch to webdrivers, chromedriver-helper is no more
While we're at it let's also update capybara.

Co-authored-by: Ana María Martínez Gómez <anamaria@martinezgomez.name>
2019-07-16 23:59:17 +02:00
Ana María Martínez Gómez
d1180e2767
Use keyword arguments in tests
Raisl 5.1 removes support for non-keyword arguments in `#process`,
`#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head` for the
`ActionDispatch::IntegrationTest` and `ActionController::TestCase`
classes. This means we have to add `params` everywhere in the controller
tests.
2019-05-14 14:10:36 +02:00
Ana María Martínez Gómez
32764d9498
Create roles when not found in test
Otherwise the test fails at least some times.
2019-05-05 09:40:49 +02:00
Rishabh Singh
0785b5c7e0 Add condition for missing_speakers in a track
A user should be able to see the missing speakers of
only those events that are accessible to him.

Fixes #1942
2019-04-06 20:58:43 +05:30
cyrille
35ec178beb Create a factory for organizer
Refactor organizer user creation in tests

Fixes https://github.com/openSUSE/osem/issues/2398
2019-03-18 23:16:15 +01:00
Henne Vogelsang
0197ed3c46
Merge pull request #2436 from Ana06/screenshot
Store screenshot when feature test fails
2019-03-18 16:18:16 +01:00
Ana María Martínez Gómez
f4caf79218
Store screenshot when feature test fails
This is useful when debugging a failing test.

Co-authored-by: Stephan Kulow <stephan@kulow.org>
2019-03-15 22:13:40 +01:00
Ana María Martínez Gómez
52d0ff3b3e
Fix flickering submit valid proposal test
The `find` was added to try to fix the flickering test: ac3337b

`find` and `fill_in` have the same `default_max_wait_time`, so didn't
change the problem.

The reason why this fails sometimes is that the Javascript for the
description (for the text editor) moves the 'Do you require something
special?' link a bit down. This causes that the link is not actually
clicked if capybara found it before it moved. Ensuring that the link is
searched after the description has been introduced solves the problem.

Finally fixes https://github.com/openSUSE/osem/issues/2356

Co-authored-by: Stephan Kulow <stephan@kulow.org>
2019-03-15 14:49:36 +01:00
Rahul
51b6606279 Fix test for picktime
Fix tests for https://github.com/openSUSE/osem/pull/2391
2019-03-09 01:47:33 +05:30
Ana María Martínez Gómez
ae53fe86f1
Replace cfps feature tests by controller tests
It doesn't make sense to test this with a feature test as it is just
testing that the controller actions work properly. Moreover, there are
problems with updating datapickers in feature tests. I reported those
problems upstream:

https://github.com/TrevorS/bootstrap3-datetimepicker-rails/issues/66
https://github.com/akarzim/capybara-bootstrap-datepicker/issues/14
2019-03-07 12:09:14 +01:00
Henne Vogelsang
9c098e600b Install chrome in the development env
To be able to run feature tests against it.
2019-02-20 17:45:07 +01:00
Henne Vogelsang
918eb91549 Adopt spec to changes in the messages 2019-02-19 21:57:20 +01:00
Henne Vogelsang
bec13df131 Adopt more specs to the shoulda-matchers update 2019-02-19 20:50:09 +01:00
Ana María Martínez Gómez
b778459e17 Skip test due to a bug in Shoulda Matchers 3
Skip test until bug is solved:
https://github.com/thoughtbot/shoulda-matchers/issues/814

It is also needed to use the new qualifier `ignoring_case_sensitivity`
to `validate_uniqueness_of` introduced in Shoulda Matchers 3.1.0
2019-02-19 20:50:09 +01:00
Ana María Martínez Gómez
d7dd85bcc0 Add Shoulda Matchers 3 configuration
From version 3.0.0 it is needed to specfied which test framework you're
using and which portion of the matchers you want to use in
`rails_helper.rb` (or the old `spec_helper.rb` in our case).
2019-02-19 20:50:09 +01:00
James Mason
072116fffe Enable registration to proceed without requiring a ticket.
Requiring a ticket after registration is convoluted; while it may be neccesary
for some workflows, it definitely isn't for others, and the core of osem
doesn't need it... so let's make it optional.
2019-02-16 00:53:40 +01:00
James Mason
516e53d9df Use chartkick globally
* Clean up legacy charting imports
* Update existing donut and line charts
* Create helpers for parsing out existing chart data
* Move chart partials to a more common path
2018-12-30 16:57:22 -08:00
James Mason
03f7951676 Add a switch for allowing registration on events (proposals) 2018-12-19 13:18:24 -08:00
James Mason
e518431b8e Rename 'Call for Papers' to 'Calls for Content' 2018-12-19 13:18:24 -08:00
James Mason
21c5b842b1 Unlint CfP views #BetterPlace 2018-12-19 13:18:24 -08:00
James Mason
41c2995cff test for missing logo 2018-12-19 12:30:45 -08:00
James Mason
b4c7c8d5a4 Provide primitive test coverage of the ticket pdf 2018-12-19 12:30:45 -08:00
James Mason
ac3337bd1e Fix up a flappy test 2018-11-30 14:09:10 -08:00