Commit graph

244 commits

Author SHA1 Message Date
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
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
Henne Vogelsang
b688d353ac
Skip some failing specs... 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
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
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
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
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
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
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
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
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
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
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
James Mason
98defe2d0f Use role caching for Rolify to avoid N+1 queries
Resolves #2018

See https://github.com/RolifyCommunity/rolify#cached-roles-to-avoid-n1-issue
2018-04-04 07:36:29 -07:00
Michael Klimenko
58cb62dd6d Fix tickets turnover calculation 2018-03-27 07:52:25 -07:00
ViditChitkara
33d32b9294 currency of a single ticket could be updated now
closes #1913

fixed travis faliures

minor changes

removed empty file

added tests regarding currency updation
2018-03-15 13:19:59 +02:00
namangupta01
7326bd132f Ability of user to create registration is fixed Closes #1628
Speaker's ability to create registration and corresponding tests are improved
2018-02-10 19:19:02 +02:00
Naman Gupta
6eb8c8d6ae Added tests for program#any_event_for_this_date? 2017-12-21 21:17:00 +02:00
ViditChitkara
83053f4626 added email presence validation to openid
closes #1658

added test for openid

fixed robocup offences

written tests for email presence validation

minor changes

shifted omniauth callback tests to rspec controllers

fixed linting bug

minor changes

minor changes
2017-12-15 23:07:03 +02:00
Ana María Martínez Gómez
952e8ac316
Merge pull request #1834 from bear454/fix-speaker-registration-issues
Fix speaker registration issues
2017-12-13 10:15:36 +01:00
Naman Gupta
ac8b187f1f Speaker is also able to see the proposal and able to modify it 2017-12-12 18:57:12 +02:00
James Mason
e01d849374 Add a picture format for conference tickets 2017-12-11 17:11:15 -08:00
AEtherC0r3
efaf07178f Upgrade to Rails 5
Update config with rails app:update
Update schema.rb rails db:migrate
Add puma
Make jobs and models inherit from ApplicationJob and ApplicationRecord
Update acts_as_list to 0.9.7 in order to fix
"undefined method `sanitize_sql_hash_for_conditions'" error
Update web-console to 2.3.0 to fix a 500 internal server error
Replace before_filter with before_action
Add rails-controller-testing gem
Add prepend: :true to protect_from_forgery in ApplicationController to
avoid ActionController::InvalidAuthenticityToken exceptions
Remove activeuuid
Update formtastic to 3.1.5 to fix deprecation warnings and issues
with the Input class
Update ahoy_matey to 1.6.0
Update cancancan to 2.0.0 to fix issues with malformed sql queries
Fix program spec
Fix issue with the picture being nil in admin/Organizations#new and #edit
and Organizations#show
Fix ActiveRecord::Base.raise_in_transactional_callbacks= deprecation
warning by removing an unnecessary line in application.rb
Fix failing versions specs
2017-12-11 20:58:04 +02:00
Naman Gupta
d0dbb7d29e tests are fixed 2017-11-09 02:39:41 +05:30
Naman Gupta
94de2e813c test is fixed 2017-11-08 01:41:42 +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
siddhantbajaj
27bf79996d One user one registration ticket
A user cannot have more than one registration ticket per conference.
2017-09-04 03:14:24 +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
AEtherC0r3
7eea930269 Implement track scheduling
Add track association to schedule
Show schedules in admin sidebar to track organizers
Allow track organizers to manage the schedules of their tracks
Don't allow self-organized track events to be dragged or unscheduled in
a conference schedule
Make scheduled events of self-organized tracks appear semitransparent in
conference schedules
Make the rooms of confirmed self_organized tracks appear semitransparent
and don't allow events to be scheduled to it in the conference schedules
during the dates of its track
Create admin/SchedulesController#new action
Add a button in admin/Schedules#index to create schedules for tracks
Add self_organized scope to Track
Modify Schedules#show to handle track schedules and show a unified
schedule
Allow track organizers to create new schedules for their tracks
Correctly identify scheduled and unscheduled events in Schedules#events
Fix Event#room and Event#time for when the event is scheduled in a track
schedule
Modify Program#selected_event_schedules to include the event_schedules
of selected track schedules
Modify Track#revoke_role_and_cleanup to destroy the track's schedules
and revert its events' state to new
Add tabs for conference and track schedules in admin/Schedules#index
Add button to Create/Show a tracks schedule in Tracks#index and #show
Fix concurrent_events in application_helper because of changes in
Program#selected_event_schedules
Do not take into account cfp_active in Event#valid_track
Modify EventsController#get_tracks accordingly
Enforce cfp_active of track to be enabled for proposals in
ProposalsController#create and #update
Add support for multiple schedules per track
Add selected_schedule_id to Track
Load EventSchedules of selected track schedules for conference schedules
in admin/SchedulesController#show
Modify SchedulesController#show to take into account only the selected
track schedules
Create Event#selected_schedule_id and use it in Event#scheduled? and
Event#time
Validate that an EventSchedule for an event of a self-organized track
belongs to one of the track's schedules
Add 'Manage' button in Tracks#index, #show that sends you to the admin
side of things
Add admin/TracksController#update_selected_schedule to update the
selected_schedule_id of tracks
2017-08-26 00:31:44 +03:00
AEtherC0r3
af7efdb6fe Allow the track organizer to manage events
He/She can manage the events of his/her tracks and their commercials
2017-08-26 00:31:44 +03:00
AEtherC0r3
c4eec6a3de Validate room and start_time for EventSchedule
Don't allow an event to be scheduled outside of it's track's room and
time slot
2017-08-26 00:31:44 +03:00
AEtherC0r3
7067803cb9 Validate that tracks don't overlap
Also, add scope for accepted tracks
2017-08-26 00:31:44 +03:00
Ana María Martínez Gómez
5985daf677 Merge pull request #1643 from rahul2240/fix-rspec
Fix warning in rspec
2017-08-24 08:57:40 +02:00
rahul
48accd02ae Fix warning in rspec 2017-08-22 21:42:56 +05:30
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
divyanshumehta
b4be83e3a6 Removed delete action from abiltiy.rb and other places
There was no delete action defined for proposals, but it was there in ability.rb So the ability was deleted. Fixes #1608
2017-08-11 18:10:25 +03:00
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
2ff4c6d6b2 Add relevance field for track requests
The requester can now provide more info about the track and himself
2017-08-11 16:25:21 +03:00
AEtherC0r3
3d250ecf75 UI/UX changes related to tracks
Add confirmed and cfp_active scopes to Track
Render markdown in track's description
Make the views more similar to the proposal/events views
Change the sequence of columns in admin/Tracks#index
Remove the short_name column from the index views
Add button "My Tracks" in the user menu
Fix track count in proposals
Add details of track in admin/Tracks#show
Use tabs to show track details and events
2017-08-11 16:25:21 +03:00
AEtherC0r3
f9903eba16 Change Cfp scopes to class methods
When no record matches the requested criteria a scope will return all
the records
In this case, if no record can be found we want the result to be nil

Also, make some readability fixes in specs
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