Commit graph

3882 commits

Author SHA1 Message Date
Andrew Kvalheim
ae00a7f055 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.
2020-04-05 13:15:12 -07:00
Andrew Kvalheim
11a7e056bf 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.
2020-04-05 13:15:04 -07:00
Andrew Kvalheim
3aa32aebe8 Remove redundant code
This functionality is provided by transactional_capybara.
2020-04-05 13:14:55 -07:00
Andrew Kvalheim
75f64508de Work around RuboCop false positive
Details: rubocop-hq/rubocop#7853
2020-04-05 10:24:51 -07:00
Andrew Kvalheim
3142c0f164 Fix bug in logging of screenshots of failed tests
Presumably this was a typo.
2020-04-05 10:24:27 -07:00
Andrew Kvalheim
5b3520801f Use correct loading mode of Bootstrap-Markdown
data-provide="markdown-editable" is intended for inline editing of page
content à la contenteditable. When this is applied to a textarea, the
editor is loaded only after the user clicks on the field. This behavior
breaks focus and is incompatible with keyboard navigation.
2020-04-04 22:09:48 -07:00
Andrew Kvalheim
4182b6fb8f Fix bug in UserDatatable query affecting PostgreSQL
Resolves:

    $ docker-compose run --rm osem bundle exec rspec ./spec/datatables/user_datatable_spec.rb:97
    …
    ActiveRecord::StatementInvalid:
    PG::GroupingError: ERROR:  column "users.id" must appear in the GROUP BY clause or be used in an aggregate function
2020-04-04 10:35:56 -07:00
Andrew Kvalheim
d3e73b103f Document workaround for jbox-web/ajax-datatables-rails#293 2020-04-04 10:35:44 -07:00
Andrew Kvalheim
17c0abb2de Don't clobber RuboCop's default excludes
By default, adding an exclude (faffc49) has the effect of removing the
default excludes. Merge them as described in rubocop-hq/rubocop#6567.
2020-04-03 17:06:36 -07:00
Andrew Kvalheim
faffc49020 Exclude Rails database schema from linting
The schema is automatically generated, so RuboCop's recommendations are
non-actionable; ignore it as in rubocop-hq/rubocop#752.
2020-04-03 16:39:23 -07:00
Andrew Kvalheim
fe2e5febe3 Deconflate organization/conference IDs in role versions
Resolves failing test spec/features/versions_spec.rb:320.
2020-04-03 16:19:36 -07:00
Andrew Kvalheim
79cd1c9fcd Grant permission to read, revert organization_admin version
Without this permission, organization administrators can't see the
history of changes to the organization administrator role on the
Revision History screen.
2020-04-03 15:35:58 -07:00
Andrew Kvalheim
71d9860124 Test access to organization_admin version as organization_admin
This corrects the specification for the behavior of the Revision History
screen; changes to the organization administrator role should be
accessible to organization administrators, not conference organizers.
2020-04-03 15:35:44 -07:00
Andrew Kvalheim
aa61ec9692 Remove unused code 2020-04-03 15:35:25 -07: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
Stella Rouzi
e709d080b4
Merge pull request #2650 from AndrewKvalheim/test-unspecified-order
Decouple tests from unspecified data ordering
2020-03-29 15:55:34 +03: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
Andrew Kvalheim
f37eab88c7 Use Chrome::Options instead of Capabilities
Resolves:

    $ docker-compose run --rm osem bundle exec rspec --tag js
    …
    Selenium::WebDriver::Error::UnknownError:
    unknown error: Chrome failed to start: exited abnormally.
2020-03-28 13:30:45 -07:00
Andrew Kvalheim
d088a4ae17 Add missing Chromium dependencies in base image
Resolves:

    $ docker run --rm osem/base chromium --no-sandbox --headless
    … Check failed: InitDefaultFont(). Could not find the default font
2020-03-28 11:38:11 -07:00
Andrew Kvalheim
8eb696bb4a Use version range instead of OSEM_RUBY_VERSION 2020-03-28 08:59:16 -07:00
depfu[bot]
0e3e832770
Update json to version 2.3.0 2020-03-19 15:49:52 +00:00
Andrew Kvalheim
38b6486550 Use database password in Docker Compose environment
Addresses docker-library/postgres#681.
2020-03-14 16:33:31 -07:00
depfu[bot]
5c57ccdf5a
Update puma to version 3.12.4 2020-03-03 11:18:54 +00:00
Michael Ball
408f341226 Allow in robots 2020-02-27 02:51:09 -08:00
Michael Ball
55ce5cb5f6 Add messages@snap as a bcc for all snapcon emails 2020-02-20 22:04:09 -08:00
Michael Ball
2ede9f310c Fix sentry-raven gem in the gemfile 2020-02-19 13:36:18 -08:00
Michael Ball
5932e27b85 Add sentry config 2020-02-19 13:16:48 -08:00
depfu[bot]
8598652433
Update sqlite3 to version 1.4.2 2020-02-19 13:11:48 +00:00
Henne Vogelsang
e6f3aa559e
Merge pull request #2636 from openSUSE/depfu/update/nokogiri-1.10.8
🚨 [security] Update nokogiri: 1.10.5 → 1.10.8 (patch)
2020-02-19 14:07:45 +01:00
depfu[bot]
153b825923
Update nokogiri to version 1.10.8 2020-02-11 11:47:10 +00:00
Michael Ball
d3e58f405a
Merge pull request #30 from snap-cloud/admin-ticketing
Admin ticketing
2020-02-06 02:10:30 -08:00
Michael Ball
be991c53d3 Merge branch 'master' of github.com:snap-cloud/snapcon into admin-ticketing
* 'master' of github.com:snap-cloud/snapcon: (22 commits)
  Cleanup some Auth specs and weird haml syntax
  add sentry puma hooks
  fix user model spec
  Tweak Tickets Text
  fix missing ]
  Fix specs for omniauth providers?
  Update stripe mock gem
  remove airbrake
  Add sentry logging
  Update stripe gem
  Cleanup stripe stuff
  Fix the docker init script
  Cleanup specs
  Cleanup config file, ensure providers are set if present
  Fix format spec with new markdown options
  Try to update spec file with image in navbar
  Delint
  Delint helpers
  Lint: Sort gems
  Update user model spec
  ...
2020-02-06 02:02:20 -08:00
Michael Ball
231b2a6d72 Update tickets controller spec for Rails 5 2020-02-06 01:46:21 -08:00
Michael Ball
d06c3ce035 Run db:migrate 2020-02-06 01:41:09 -08:00
Michael Ball
4306fbe636 Merge branch 'master' into admin-ticketing
* master: (61 commits)
  Replace more Commercials with Materials
  Rename more commericals to materials
  UI -- Repalce "Commerials" with "Materials".
  Re-order Conference Associations
  Cleanup CSS add Snap! style block attachments
  hide venue link if there is no venue link
  No dropshadow
  Text with drop shadow for now
  Tidy up the look of lodging panels
  Show reg status for tickets.
  Tweak CSS, fix loding order
  Move the venue description to below the map.
  Update lodging styling. Add description for venu when map is shown.
  CSS tweaks...
  Make the edit form not so wide.
  Support markdown in more fields
  Cleanup CSS ordering, fix coloring for navdropdowns
  dumb...fix order of link_to args
  ARRRGHHH, another typo...same line...
  fix typo
  ...
2020-02-06 01:37:38 -08:00
Michael Ball
7586112f72 Merge master 2020-02-06 01:20:11 -08:00
Michael Ball
1b4132fb19
Merge pull request #28 from snap-cloud/fix-build
Attempt to Unbreak Stuff
2020-02-06 01:12:02 -08:00
Michael Ball
a72633e2d9 Cleanup some Auth specs and weird haml syntax 2020-02-06 00:47:40 -08:00
Michael Ball
cc9a759960 add sentry puma hooks 2020-02-05 23:25:08 -08:00
Michael Ball
142e93bebc fix user model spec 2020-02-05 23:25:00 -08:00
Michael Ball
a6bac93788 Tweak Tickets Text 2020-02-05 23:20:31 -08:00
Michael Ball
9904ee67aa fix missing ] 2020-02-05 10:57:02 -08:00
Michael Ball
37ffc1765d Fix specs for omniauth providers? 2020-02-04 23:50:28 -08:00
Michael Ball
bc6b76fcc3 Update stripe mock gem 2020-02-04 23:42:26 -08:00
Michael Ball
71659ae65f remove airbrake 2020-02-04 22:51:20 -08:00
Michael Ball
b50972213a Add sentry logging 2020-02-04 22:48:58 -08:00
Michael Ball
165fe2b9ca Update stripe gem 2020-02-04 20:50:41 -08:00
Michael Ball
9355114960 Cleanup stripe stuff 2020-02-04 20:49:22 -08:00
Michael Ball
00c8903968 Fix the docker init script 2020-02-04 18:44:32 -08:00