Commit Graph

796 Commits

Author SHA1 Message Date
Henne Vogelsang
1bae545332 Also clear ENV when manipulating it 2025-08-13 11:21:23 +02:00
Henne Vogelsang
ddcd8dfc69 Drop Rails.application.secrets usage
That feature is gone and we already use environment variables...

https://github.com/rails/rails/pull/47801
2025-08-12 17:27:25 +02:00
Henne Vogelsang
988b3bf689 Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
Henne Vogelsang
14535d89ac Remove shared examples that are not shared... 2025-08-06 13:23:29 +02:00
Henne Vogelsang
df0b9ab356 Replace flash helper with "within"
So we can't forget to find "#flash" on the page ever again...
2025-08-06 13:11:48 +02:00
Henne Vogelsang
eb16282a01 Make spec thread safe...
Something(???) has changed that Github Actions has become *so* fast that those hit now...
2025-08-05 18:34:52 +02:00
Henne Vogelsang
4b833840fd Remove superflous PaperTrail::Version.where tests
I think it's a bit overkill to test this line from Admin::VersionsController 30 times.

```
PaperTrail::Version.where(conference_id: @conference.id).accessible_by(current_ability)
```

Let's do it once...
2025-08-05 16:50:35 +02:00
Henne Vogelsang
9ca7421daf Log example name in test.log for easier debugging 2025-01-21 16:50:50 +01:00
Henne Vogelsang
50d6f5b3d5 Remove superflous spec for User.registered/attended
There is no logic involved, just a map on the title...
2024-12-09 16:42:42 +01:00
Henne Vogelsang
a447ad90c4 Autocorrect Rails/RootPathnameMethods 2024-12-02 13:17:05 +01:00
Henne Vogelsang
68e8203f27 Autocorrect
- Lint/SafeNavigationConsistency
- Capybara/NegationMatcher
2024-12-02 11:43:43 +01:00
Henne Vogelsang
f6049d8af4 Allow more chromium URLs in webmock 2024-09-30 16:27:50 +02:00
Henne Vogelsang
e873c99b2a Skip broken ticket purchase spec
We are going to drop this feature soon, no idea why it fails.
2024-09-30 16:18:02 +02:00
Henne Vogelsang
559c2b9ab0 Allow more Webdrivers update URLs in spec
Follow advise from the webdrivers wiki
2024-06-24 15:51:32 +02:00
Henne Vogelsang
85149dc837 Drop Organization from specs 2024-06-07 17:42:08 +02:00
Henne Vogelsang
dc1a6a4363 Drop Organization abilities 2024-06-07 16:16:02 +02:00
Henne Vogelsang
30fdc2d796 Replace all datepickers with date input
Nowadays all browsers have reasonable date input support...
2024-06-07 14:09:12 +02:00
Henne Vogelsang
07bfff8fa1 Replace registration-period datepickers with date input
Nowadays all browsers have reasonable date input support...
2024-06-07 13:16:44 +02:00
Henne Vogelsang
10f8c46119 Update rubocop-rails to version 2.24.1 2024-04-16 13:27:34 +02:00
Henne Vogelsang
ac38359141 ENV is not a constant... 2024-03-26 17:11:25 +01:00
Andrew Kvalheim
9f72c5b75b Add test of conference organizer adding a proposal
Fails with:

    1) Event as an conference organizer create a proposal
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::EventsController#new is missing a template for request formats: text/html

re #2975
2023-05-01 18:34:55 -07:00
Andrew Kvalheim
694f397857 Add test of admin editing a user
Fails with:

    1) User admin behaves like admin ability edits a user
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::UsersController#edit is missing a template for request formats: text/html

re #2975
2023-05-01 18:34:55 -07:00
Henne Vogelsang
749115e507 Merge pull request #3090 from AndrewKvalheim/api-time-zone
Correct time zone of API dates
2023-04-19 13:36:12 +02:00
Henne Vogelsang
04b45adbe5 Merge pull request #3096 from AndrewKvalheim/api-urls
Add URLs to API responses
2023-04-19 13:26:44 +02:00
Henne Vogelsang
86b8990d71 Merge pull request #3130 from AndrewKvalheim/vote-cache-expiration
Expire voting fragment caches
2023-04-19 13:23:05 +02:00
Henne Vogelsang
8b909a95c9 Merge pull request #3131 from AndrewKvalheim/nofollow
Set `nofollow` on user-generated links
2023-04-19 13:19:34 +02:00
Henne Vogelsang
3aaf86076f Merge pull request #3133 from AndrewKvalheim/thead-tr
Correct invalid table markup
2023-04-19 13:14:34 +02:00
Andrew Kvalheim
cdee712d07 Display track description on proposal form
Tracks are otherwise undocumented for CfP respondents.
2023-03-11 13:51:02 -08:00
Andrew Kvalheim
e5ab9b4db1 Test select help text
Incidentally fulfills the same need as #2662
2023-03-11 10:47:32 -08:00
Andrew Kvalheim
1f31c1c80d Correct invalid table markup
- Add required <tr> within <thead>
  - Add implicit <tbody> after <thead>
2023-03-04 14:33:08 -08:00
Andrew Kvalheim
e01fd2d721 Add URLs to API responses
Resolves inability of API consumers to provide links to OSEM.
2023-03-04 10:15:56 -08:00
Andrew Kvalheim
80d7ac545c Set nofollow on links in Markdown content
To disincentivize spamdexing, links in user-generated content should be
disavowed by annotation with `rel="nofollow"` attributes:

  - https://en.wikipedia.org/wiki/Nofollow

Automated spam has already targeted OSEM in the wild:

  - https://github.com/SeaGL/organization/issues/274

Ideally link annotation would be performed during Markdown rendering or
a single sanitization pass, but this is currently an unresolved issue:

  - https://github.com/vmg/redcarpet/issues/720
2023-03-03 17:16:53 -08:00
Andrew Kvalheim
c54a8a1238 Add tests of HTML sanitization 2023-03-03 16:50:20 -08:00
Andrew Kvalheim
4df59d85e2 Add test of voting 2023-03-01 11:17:39 -08:00
Andrew Kvalheim
5b89f64eaf Set default URL host
Setting the default host resolves:

    Missing host to link to! Please provide the :host parameter, set
    default_url_options[:host], or set :only_path to true

Configuring RSpec to use the default host resolves:

    Expected response to be a redirect to <http://test.host/…>
    but was a redirect to <http://localhost/…>.
2023-02-28 11:06:24 -08:00
Andrew Kvalheim
6ce2e66f14 Correct time zone of API dates
Prior to this change, the API returned incorrect dates in UTC instead of
the conference time zone.
2022-09-28 13:22:15 -07:00
Andrew Kvalheim
397341a324 Use JSON date serializer
Effective API changes:

  - nil serializes to null, not empty string
  - dates serialize to IETF RFC 3339 with millisecond precision, not
    second precision surrounded by spaces
2022-09-28 09:34:01 -07:00
Andrew Kvalheim
b60257ef59 Add test of EventScheduleSerializer 2022-09-28 09:29:12 -07:00
Andrew Kvalheim
57e9135287 Use CSS-compatible row IDs in datatables
In CSS IDs may not begin with a number:

  - https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
2022-09-13 11:06:22 -07:00
Sasi Olin
d31233c033 Migrate to fontawesome 6 2022-05-18 06:33:47 +02:00
Henne Vogelsang
36b23ce25d Make use of ENV.fetch 2022-05-06 14:53:57 +02:00
Henne Vogelsang
200d188af2 Remove superfluous specs
Neither `if` nor `ENV` need to be tested by us...
2022-05-06 14:26:51 +02:00
Sasi Olin
e85ecede4c Fix the test failures 2022-03-30 12:39:01 +02:00
Henne Vogelsang
85cae7d093 Merge pull request #2970 from AndrewKvalheim/safe_links_only
Correct use of Redcarpet’s `safe_links_only` flag
2022-03-29 15:11:58 +02:00
Andrew Kvalheim
685d79e44b Correct use of Redcarpet’s safe_links_only flag 2022-03-17 17:03:30 -07:00
Andrew Kvalheim
a281110b29 Add test of markdown link protocol sanitization 2022-03-17 16:44:27 -07:00
Andrew Kvalheim
e486ce55d7 Remove test of implementation details 2022-03-17 16:13:47 -07:00
Andrew Kvalheim
51e65003bd Add failing tests for survey creation and response
Removes optional attributes from default survey factory.
2022-03-16 13:37:00 -07:00
Henne Vogelsang
ed8a2696bb Merge pull request #2968 from AndrewKvalheim/unskip-tests
Re-enable skipped tests
2022-03-15 17:14:45 +01: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