Commit graph

696 commits

Author SHA1 Message Date
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
James Mason
4256cdc06b Adapt serializer specs to the new format 2018-11-20 17:30:56 -08:00
James Mason
0a5246388f Adapt tests to new, pickier Capybara 2018-11-19 15:10:14 -08:00
James Mason
287344e816 Capybara.save_path defaults to tmp/capybara 2018-11-19 15:10:14 -08:00
James Mason
a9e8498abe transactional db support for capybara tests! 2018-11-19 08:40:55 -08:00
James Mason
1b9a12746d Fix up test failures in Chrome & Firefox 2018-11-19 08:40:55 -08:00
James Mason
9eae73c7e4 Goodbye phantomjs, hello (again) selenium. 2018-11-19 08:40:55 -08:00
James Mason
43bef689fc Rubocop autocorrections 2018-11-16 09:06:05 -08:00
James Mason
a3adf8318d Add additional social media fields to contacts
+ YouTube
+ Blog

Simplify logic in the view, and refactor the test #BetterPlace
2018-11-14 15:01:03 +01:00
James Mason
1241d21f93 Provide an opportunity for including conference-specific CSS
There is currently no top-level selector for views that is conference-specific,
so all conferences on one OSEM instance end up sharing all the same CSS.

In order to allow individual conferences to have unique CSS, a class for the
current conference is applied to the <body> tag, and an scss template provided with
an example of conference-specific CSS.
2018-11-06 08:19:01 -08:00
James Mason
8b12b1662d Unlint Rspec/DescibeClass #BetterPlace 2018-11-06 08:19:01 -08:00
James Mason
b11001cdba Every campaign has an end.
Drop ahoy, because it's more trouble than it's worth. This means dropping
visits, campaigns, targets.

Campaigns are better run to analytics, such as:
* https://matomo.org/docs/tracking-campaigns/
* https://matomo.org/docs/tracking-goals-web-analytics/
* https://support.google.com/analytics/answer/1012040?hl=en
2018-10-16 21:34:04 +02:00
Henne Vogelsang
a0b79c7789 Drop knapsack
It constantly fails with "Mysql2::Error: This connection is in use by...".
Might be because of database cleaner? But until we can get this stable,
rip it out again.

Replaced by a matrix based on test type
2018-09-20 00:56:17 +02:00
Henne Vogelsang
f866974b19 Enable FactoryBot/AttributeDefinedStatically
See https://robots.thoughtbot.com/deprecating-static-attributes-in-factory_bot-4-11
2018-09-08 04:29:22 +02:00
Henne Vogelsang
64d8f05bdd Update FactoryBot strings & urls 2018-09-06 00:42:28 +02:00
Henne Vogelsang
0a19418d15 Replace All FactoryGirl Constant References 2018-09-06 00:42:28 +02:00
Henne Vogelsang
fb2612ecaf Simplify set_week callbacks
Changes to :week are already ignored py paper_trail. No need to wrap this in a
`without_versioning`. Also drop the reader in `Registration` and the tests. Why
write this into the DB but never read it again? Why test standard
ruby/activerecord stuff.
2018-09-04 21:12:46 +02:00
James Mason
64ceaf50f4 Update Admin user datatables to use AJAX 2018-08-30 16:50:42 +02:00
Tyrant Davis
d3ce401cba Indicate if spalshpage is marked as public or not. 2018-08-29 21:28:20 -07:00
Stella Rouzi
683f62a27c Add more options for surveys
* Survey period constraints
* Add abilities
* Enforce required questions
* Update survey_submssion updated_at
* Do a full match of possible answer and user reply
2018-07-03 08:46:15 +03:00
Stella Rouzi
c278e547ce Add survey related tests 2018-07-03 08:46:15 +03:00
Stella Rouzi
68a8ec2204 Add task to populate demo data for surveys 2018-07-03 08:46:15 +03:00
Stella Rouzi
9f3c0eff5d Add surveys; custom generated by admins
Available during registration or after conference

Co-authored-by: Shyukri <shshyukriev@suse.com>
Co-authored-by: Henne <hvogel@opensuse.org>
Co-authored-by: Moises <mdeniz@suse.com>
2018-07-03 08:46:15 +03:00
James Mason
1e9765c163 DRY up bootstrapSwitches with default values 2018-06-26 07:10:08 -07:00
James Mason
d8bd269a64 Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
2018-06-01 09:15:57 -07:00
James Mason
806cdbe046 Switch coverage host from coveralls -> codecov
Coveralls seems incapable of cleanly handling parallel results.
2018-05-21 16:24:25 +02:00
James Mason
6d31dfeef4 Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
2018-05-09 06:54:26 -07:00