Commit Graph

47 Commits

Author SHA1 Message Date
Daniel O'Connor
5be0153c74 Activities (#3646)
* Implement activities

* Add activities to timeline

* Add factory

* Add coverage

* Fix misc issues

* Activities display

* Add activities to garden and plantings

* Add activities to garden and plantings

* Add planting

* Add to planting, harvest show

* More CRUD

* More CRUD

* index

* index

* Extract card view

* Permissions

* Add edit

* Remove workaround fro vs code

* Fix title

* CSV

* CSV

* Add RSS, ical

* Extend ical slightly

* Cleanup

* Rubocop

* Remove doubled form

* Change icon

* Fix short description

* Add menus

* Put homepage widget in

* Add activity icon - MIT licenced - https://www.svgrepo.com/svg/336823/plan

* Naming

* Missing files

* Revert VS Code lag induced change

* Update app/views/home/_harvests.html.haml

* Update activities_controller.rb

* Update activities_controller.rb

* Update app/controllers/activities_controller.rb

* Update index.html.haml

* Apply suggestions from code review

* Apply suggestions from code review

* Typo

* Translation

* Apply suggestions from code review

* Update app/views/plantings/index.ics.erb

* Update app/models/activity.rb

* Update plantings_spec.rb

* Update plantings_spec.rb

* We are now rendering an extra event, so check the next one for the old behaviour
2024-03-10 11:36:24 +10:30
Daniel O'Connor
1f0cfa9b6c Add GBIF to our scientific names, so that our crops can associate creative commons photos (#3559)
* Add GBIF cient

* Add lookup

* Add autocomplete for GBIF lookup

* Add extra detail to scientific names

* Autocomplete

* Add routes

* Rmeove mapping

* Add autocomplete

* Update GBIF data on save

* db/schema

* Style

* Extract service

* Add concern

* Add concern

* Save photos

* Initial coverage

* Coverage

* Add coverage

* Shut up, codeclimate

* Shut up, codeclimate

* Unused

* Shut up, codeclimate

* Apply suggestions from code review

* Remove localhost

* Fix rubocop

* Fix rubocop

* Add UI links

* Add rake

* Indent

* Update Gemfile.lock

* Update lib/tasks/gbif.rake

* Update app/views/crops/_scientific_names.html.haml

* Rubocop

* Expand edit photo form

* Fix error

* Add model validations

* Skip photos without backlinks

* Fix tests

* Add photo words

* Allow blank

* Rubocop and handle invalid legacy data

* Apply suggestions from code review

* Update lib/tasks/gbif.rake
2024-01-21 13:22:25 +10:30
Daniel O'Connor
ee45b518ce Rubocop fixes (Stacked PR) (#3454)
* Fix todo

* Rubcop

* Rubocop

* Rubocop

* Rename harvests_routing_spec.rb to harvests_controller_routing_spec.rb

Making codeclimate happier

* Rename for CodeFactor: updates_routing_spec.rb to posts_controller_updates_routing_spec.rb

For codefactor

* Rename for CodeFactor: follows_routing_spec.rb to follows_controller_routing_spec.rb

* Rename for CodeFactor: forums_routing_spec.rb to forums_controller_routing_spec.rb

* Rename spec/routing/roles_routing_spec.rb to spec/routing/admin/roles_controller_routing_spec.rb

* Rename authentications_routing_spec.rb to authentications_controller_routing_spec.rb

* Rename for CodeFactor: plantings_routing_spec.rb to plantings_controller_routing_spec.rb

* Rename for CodeFactor: scientific_names_routing_spec.rb to scientific_names_controller_routing_spec.rb

* Rename for CodeFactor: seeds_routing_spec.rb to seeds_controller_routing_spec.rb

* Rename for CodeFactor: comments_routing_spec.rb to comments_controller_routing_spec.rb

* Rename for CodeFactor: garden_types_routing_spec.rb to garden_types_controller_routing_spec.rb

* Rename for CodeFactor: admin_routing_spec.rb to admin_controller_routing_spec.rb

* Rename for CodeFactor: gardens_routing_spec.rb to gardens_controller_routing_spec.rb

* Rename for CodeFactor: photos_routing_spec.rb to photos_controller_routing_spec.rb

* Rename for CodeFactor: plant_parts_routing_spec.rb to plant_parts_controller_routing_spec.rb

* Rename for CodeFactor: crops_routing_spec.rb to crops_controller_routing_spec.rb

* [CodeFactor] Apply fixes

* Rename

* Code factor bot

---------

Co-authored-by: Cesy <cesy.avon@gmail.com>
Co-authored-by: codefactor-io <support@codefactor.io>
2024-01-07 21:05:59 +10:30
Daniel O'Connor
ea5486ffe1 Swap percy over (#2986)
* Swap percy over

* Swap require over

* Change API

* Update package.json
2022-03-27 11:44:18 +10:30
codefactor-io
6c9a15f95e [CodeFactor] Apply fixes 2020-01-11 21:29:37 +00:00
Brenda Wallace
346e67b8f3 yet more reindexing in tests 2020-01-08 15:42:25 +13:00
Brenda Wallace
a3215d2555 Rubocop fixes 2019-12-31 14:47:15 +13:00
codefactor-io
5eea6d65d0 [CodeFactor] Apply fixes 2019-12-27 19:34:42 +00:00
Brenda Wallace
2185892cf5 Trying a different way to ES reindex in spec helper 2019-12-27 19:52:43 +13:00
Brenda Wallace
ee4aa4dec3 refresh in dex at start of spec run 2019-12-24 22:10:49 +13:00
Brenda Wallace
99a2dfd464 index all models in the spec helper 2019-12-24 09:25:58 +13:00
codefactor-io
e8760f9c38 [CodeFactor] Apply fixes 2019-12-20 03:33:23 +00:00
Brenda Wallace
7c38f7eca6 Pull homepage data directly from elasticsearch (#2316)
* Pull homepage data directly from elasticsearch

* Removing non-elasticsearch options

* [CodeFactor] Apply fixes to commit c46b2e7
2019-12-09 10:03:48 +13:00
Brenda Wallace
3ebd7ede87 Add percy 2019-05-12 22:29:35 +12:00
Brenda Wallace
77d1fc7347 Move crop searching specs from the crop model to the crop search service 2019-04-08 21:39:20 +12:00
Brenda Wallace
e465b6f19c Elastic search spec helper 2019-04-08 21:39:20 +12:00
Brenda Wallace
65b4c7dbc1 Revert "Auto corrected by following Style/StringLiterals"
This reverts commit ab56a3c6b3.
2018-02-09 07:58:47 +13:00
Awesome Code
ab56a3c6b3 Auto corrected by following Style/StringLiterals 2018-02-07 10:20:26 +13:00
Brenda Wallace
a6a7f789a3 Rubocop upgrade (and some style fixes) 2017-12-01 21:07:39 +13:00
Miles Gould
738c0d4e08 Store spec failures, for rspec --only-failures
The list of failing tests is stored in tmp/examples.txt, which is
already gitignored.
2017-02-16 13:24:50 +00:00
Daniel O'Connor
be572b9a53 Upgrade 2016-12-09 11:25:03 +10:30
Brenda Wallace
62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Brenda Wallace
d268d2b09e Fixed indentation on comments 2016-11-26 11:45:25 +13:00
Mackenzie
925027f7f0 add code climate test reporter 2016-05-17 14:02:42 -04:00
Taylor Griffin
fb595de457 edited configuration and dependencies 2014-11-18 22:24:58 +11:00
Taylor Griffin
868e5c2079 upgrade jquery-ui-rails gem and config 2014-11-16 12:41:57 +11:00
Taylor Griffin
7fc886f43c implement custom Sweeper class as stop gap against errors when running specs 2014-11-16 12:01:27 +11:00
Taylor Griffin
8e79199766 wip: upgrading rspec 2014-11-15 22:55:37 +11:00
Skud
8e6a57c442 Attempt at writing tests for planting reminder email
(Test are broken)

OK, so I decided to use the capybara_email gem to write these tests.
It's basically working but there's a problem with the has_link matcher.
Basically the emails sent by ActionMailer have URLs like
http://localhost:8080... whereas the tests asking for planting_url() or
similar are looking for http://example.com...

I don't understand AT ALL why there is this discrepancy, but it looks
like ActionMailer is using the settings from the development
environment, instead of the testing environment.

WHYYYYYY???

I'm pushing this up so that maybe someone else can figure it out,
because I'm stumped.
2014-10-15 15:52:13 +01:00
Skud
b0378fab69 Cleaned up tests a little bit 2014-08-30 17:30:24 +10:00
Skud
d55d2c6409 Ongoing coverage improvements 2014-08-30 17:09:47 +10:00
Skud
082663c885 Show coverage locally and send to coveralls 2014-08-30 17:09:47 +10:00
Taylor Griffin
c282b3b208 abstract crop suggest autocomplete tests into a shared example 2014-08-01 20:18:28 +10:00
Taylor Griffin
b4fdf97056 switch to poltergeist-phantomjs from selenium for js webdriver 2014-07-31 14:48:35 +10:00
Taylor Griffin
a707d9a2ea write feature spec that tests crop suggest functionality in new planting form 2014-07-28 00:15:31 +10:00
Taylor Griffin
1ee79c25f1 set up selenium test but encountering jQuery not defined error 2014-07-27 07:38:56 +10:00
Taylor Griffin
29752e049e remove stray reference to capybara 2014-07-26 20:19:46 +10:00
Taylor Griffin
5df0c9c71a sketch feature test for planting a crop 2014-07-26 08:36:48 +10:00
Taylor Griffin
b940644ef3 add capybara and selenium gems 2014-07-26 07:58:05 +10:00
Miles Gould
1f5c81fdca Filter spec files out of coverage reports. 2013-06-13 20:38:26 +01:00
Miles Gould
033703e9b9 Set up Rails coverage groups. 2013-06-13 20:29:02 +01:00
Miles Gould
66a6f53ae7 Set up Coveralls integration for test coverage. 2013-06-12 13:03:05 +01:00
Miles Gould
6f104b0eeb Death to Spork! Death! Death! 2013-02-12 13:17:14 +00:00
Skud
58e5d04d50 controller tests for plantings now pass 2013-02-01 22:55:48 +11:00
Miles Gould
287a964e87 Post new updates
- always use the ID of the logged-in user
2012-11-08 12:32:07 +00:00
Miles Gould
bb3516b19c Use spork to run spec tests.
Spork initialises rails once and thereafter uses that copy of rails to
run spec tests, leading to much faster test runs. On my machine, testing
index.html.haml takes 2s instead of 7s after this change, and `rake`
takes ~9s instead of ~18s.

Instructions once again taken from
http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html, though I
didn't copy any code for this commit.
2012-09-10 14:54:55 +01:00
Skud
797846ffef added a simple rspec test for index.html.erb 2012-09-03 11:21:07 +01:00