Commit Graph

93 Commits

Author SHA1 Message Date
Henne Vogelsang
85149dc837 Drop Organization from specs 2024-06-07 17:42:08 +02:00
Sasi Olin
e85ecede4c Fix the test failures 2022-03-30 12:39:01 +02:00
Andrew Kvalheim
7e9ce60293 Partially revert "Skip some failing specs..."
This reverts the skipping of tests by commit b688d353ac in:

  - `spec/models/user_spec.rb`
  - `spec/controllers/admin/users_controller_spec.rb`
  - `spec/datatables/user_datatable_spec.rb`
2022-03-08 17:18:34 -08:00
Henne Vogelsang
85dae98a76 👋 update_attributes
You served us well...
2022-02-23 14:36:05 +01:00
Andrew Kvalheim
e30880229c Use be_successful instead of be_success
Rails 5.2 warns:

> The `success?` predicate is deprecated and will be removed in Rails 6.0.
> Please use `successful?` as provided by Rack::Response::Helpers.

RSpec correspondingly provides `be_successful`.
2022-01-23 14:06:02 -08:00
Henne Vogelsang
0104671e01 Stop validating factories in specs
We do validate all of them in a before(:suite) already.
2021-08-18 14:03:14 +02: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
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
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
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
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
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
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
43bef689fc Rubocop autocorrections 2018-11-16 09:06:05 -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
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
Michael Klimenko
30ba7b133b Roles order fixed in test is not essential 2018-03-28 08:32:45 -07:00
Michael Klimenko
297447d802 Make factories and tests timezone-friendly 2018-03-28 08:32:45 -07:00
Carlos Coelho
637f6ce765 Add tests for conference withdrawn events 2018-02-19 01:02:30 +02:00
Sidharth
93fcf8893a Fix Style/UnneededInterpolation
Exclusions from .rubocop_todo.yml deleted.
This cop checks for string interpolated expressions. It supports autocorrection.
Fixes #1823
2017-12-04 23:45:37 +05:30
siddhantbajaj
69e30e7ba9 Improving check-in process
mark user as present for the conference when user's registration ticket for that conference is scanned
2017-09-13 22:47:22 +05:30
AEtherC0r3
27fa79a826 Track related refactoring
Add roles as nested routes to track (for the track organizer role)
Allow transition from to_accept to to_reject and backwards
Split Track#valid_dates validation to many independent ones
Show all the confirmed tracks in the conference's splashpage
Add comment in admin/Tracks#toggle_cfp_inclusion
Rewrite admin/TracksController#accept spec
Add feature spec for track requests
Change 'In' to 'Room' in Tracks#index
Rewrite Track#overlapping
Refactor code in ProposalsController
Fix typos
2017-08-27 18:20:16 +03:00
shlok007
16f294f3e8 minor inprovements and included organizations in changelog 2017-08-24 10:24:13 +00:00
Nishanth Vijayan
68788ce9fc Show conference changelog
Use load_and_authorize_resource in versions controlller
Add conference specifc route to revision history page
Users with role can view revision_history only for the versions they have access to
Handle versions where conference_id is not set (records before papertrail was introduced)
2017-08-24 10:24:13 +00:00
shlok007
c596a9fda7 add tests to assign and unassign organization admin role 2017-08-22 12:52:47 +00:00
siddhantbajaj
157c270497 Registration tickets to be set for registration period
Admin must create at least one registration ticket before creating registration period.
2017-08-22 15:20:37 +05:30
Ana María Martínez Gómez
3f324d4e6f Merge pull request #1613 from siddhantbajaj/read-qr
Scan QR code.
2017-08-16 10:05:06 +02:00
siddhantbajaj
1391668c0f Add routes and controller to scan Qr code
Added TicketScanning controller and routes to scan qr code on PhysicalTickets. Added test for the same
2017-08-15 13:16:46 +05:30
AEtherC0r3
b717018b31 Track related fixes
Make the message in admin/Tracks form more visible by making it bold and
adding links to venue and rooms
Make papertrail track changes for all the track's attributes
Add validation to require presence of description for self-organized
tracks
Add ID column to admin/Tracks#index
Make the cfp inclusion column sortable
Show success/error flash messages after toggling cfp inclusion
2017-08-11 16:25:21 +03:00
AEtherC0r3
d9faffc96a Implement track request acceptance
Allow track submitter to request specific dates
Redirect to Tracks#edit if a track doesn't have a room or start/end date
before accepting it

Don't allow the submitter or the track organizers to edit the request
after it has been accepted or confirmed

Restrict track selection in proposals and move track selection from
Proposals form to events helper

Mark cfp_active of the tracks table as not null and fill in true if nil
2017-08-11 16:25:21 +03:00
AEtherC0r3
0f154d07c9 Mark track state as not null and add default value
The regular tracks are marked as 'confirmed'
2017-08-11 16:25:21 +03:00
nasia
32c5af2a17 Add booths to non admin 2017-08-08 16:18:07 +03:00
nasia
c6b0a1f52e Add tests for booth controller 2017-07-21 17:34:05 +03:00
rahul
d4d1512c61 Updated rspec-rails and guard rspec
Updated this gem to fix nomethoderror old version of rspec use last_comment method which is deprecated in latest versions
2017-07-16 22:43:56 +05:30
AEtherC0r3
e3b51dfc2b Add TrackControllers specs 2017-07-14 12:38:53 +03:00
shlok007
8839a928ed mending failing tests 2017-06-28 06:55:30 +05:30
shlok007
ad3d6f2f95 modify admin/conference_controller_spec and not authorized error messages 2017-06-28 06:55:30 +05:30
AEtherC0r3
a1124546f1 Fix rspec tests because of the changes to the cfp
Remove redundant association
Note: a conference created with :full_conference already has a cfp
2017-06-27 21:16:46 +03:00
Ana María Martínez Gómez
905f8954d0 Fix broken test in Admin::EventsController
We are using `paper_trail` gem, which saves data in database table
versions. It has a native way to search in the versions records,
using `where_object()` and `where_object_changes()`. They are broken,
under certain conditions. We changed them to a manual `where()`.

To test this case we need: an Event with ID 1, an Event with ID 2, and
a commercial with ID 1, for event with ID 2 - obviously the numbers
could be different as long as there is this matching of IDs. Before
this was made wit ha expect, which would make the test fail if this is
not the case. But this is actually the test case, not what we want to
test, so I moved to the `let`.

This was also the case why one of the test was broken after we change
how the database is cleaned in:

https://github.com/openSUSE/osem/pull/1541

I also remove the feature test, as this should be tested in a
controller test.
2017-06-26 15:35:05 +02:00
shlok007
6cf9ddbdea fix failing test 2017-06-12 19:43:44 +05:30
shlok007
521c05af61 skip failing tests 2017-06-12 19:43:44 +05:30
shlok007
3fb316482c suggested changes 2017-06-12 19:43:44 +05:30
shlok007
8edf896d86 introduce organizations 2017-06-12 19:43:44 +05:30
Siddhant Bajaj
1c12200003 Fixed paper trail inconsistent results for numeric values
There is a known issue in paper_trail that whenever we Query the
'versions.object' column it evaluates inconsistent results for numeric
values due to limitations of SQL wildcard matchers against the
serialized objects. So to fix this issue I have manually formed the where
query instead of using where_object and where_object_changes. I have
also added test for the same.
Fixes #1307
2017-05-11 14:01:52 +03:00
Eugene Dubinin
93404d543f implement user creation by admin 2017-05-08 22:54:02 +03:00
Siddhant Bajaj
95d459f058 Added validation in EventSchedule model and test in event_schedule_spec
EventSchedule start time should be in hours range of the conference.Therefore it adds validation on start_time attribute of event schedule model. It also adds test for the same.
2017-04-22 01:20:05 +05:30
Sunny
03fa299058 enable style/dotposition rubocop cop 2017-04-06 23:19:58 -04:00
richiethomas
daf1f805bd Rename 'ConferenceController' to 'ConferencesController', and 'ProposalController' to 'ProposalsController' 2016-09-30 18:49:44 -04:00