Commit Graph
53 Commits
Author SHA1 Message Date
Brenda WallaceandClaude Opus 5 bff166510a Update the specs for the tidied planting page
Mostly copy and flow changes from the tidy-up, but two real bugs came out
of running them.

Bugs fixed:
- planting_actions_props didn't pass planted_at or today, which
  MarkFinishedModal needs to decide whether "today" may be offered and
  where the date box starts. Without them the dialog threw while
  rendering, and with no error boundary React tore down the whole island,
  so the actions menu vanished entirely.
- The dialogs reloaded the page from inside the save callback, tearing
  the page down while the dialog was still finishing its own update. They
  now close first and reload on the next tick.

Menu items are lower-cased in CSS, as the garden cards already do it,
rather than by calling downcase on the shared button translations. That
was mangling labels other pages show in sentence case.

Specs:
- Menu, dialog and section-heading flows updated: the actions menu opens
  dialogs rather than navigating, so recording a harvest, marking a
  planting finished, editing and transplanting all drive the dialog.
- Copy: "grows this in", "day 14 of 50", "Planned" for a future planting,
  "4 of 5", the new harvest-months wording, and the add-photo dialog
  naming what it adds to.
- The parent-seed example asserted a link to the planting, which came
  from the breadcrumb; the last crumb is the page you are on, so it is
  plain text now and the example checks the seed link instead.
- Removed spec/features/shared_examples/append_date.rb. It drove the old
  datepicker finish flow and had one caller.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 12:57:46 +12:00
google-labs-jules[bot]andCloCkWeRX 6c7903c2a5 Fix RSpec/ExpectInHook offenses
- Move expectations from `before` hooks to `it` blocks.
- Ensure controller actions are called after expectations are set in controller specs.
- Replace synchronization expectations in hooks with Capybara `find` calls.
- Remove RSpec/ExpectInHook from .rubocop_todo.yml.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-04-25 18:39:43 +00:00
Daniel O'Connor 5d112e9134 Rubocop: Capybara/RSpec/HaveSelector (#4539)
* Rubocop: Capybara/RSpec/HaveSelector

* Rubocop: Capybara/RSpec/HaveSelector
2026-04-23 22:45:58 +09:30
Daniel O'Connor 81060cccf7 Ruby 3.2: Rubocop - Lint/* and Style/* (#3786)
* Rubocop - Layout/*
* Rubocop - Lint and Style
2024-07-13 15:38:37 +09:30
Daniel O'Connor 8b4f0771c5 Ruby 3.2: Rubocop - Fix Negation matcher (#3780)
* Ruby 3.2/Bundler 2.4

* Fix creation

* Upgrade to js-routes 2. Put all js routes into a global namespace.

* Remove js-routes

* Remove

* Adjust ownership

* Appease codeclimate for the nth time

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Swap to will paginate successor for bootstrap

* Update app/views/members/show.html.haml

* Update app/views/plantings/index.rss.haml

* Update .env

* Update .devcontainer/.env

* Fix spec

* Update spec

* Fix spec

* Pin to 2.4.22

* 3 space indent

* Regenerate

* Update rubocop

* Rubocop

* More rubocop

* Regenerate

* Fix Capybara/NegationMatcher
2024-07-13 15:20:11 +09:30
Daniel O'Connor 7d63234841 Upgrade to bootstrap 5 (#3605)
* Upgrade boostrap

* Remove deprecated bootstrap toggles

* Migrate other details

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Fix spec

* Fix spec, where the size of the screen has gone to a partial breakpoint/you can't click on your own name in tablet view

* Fix spec

* Cleanup

* Cleanup
2024-03-10 11:49:22 +10:30
Daniel O'Connor d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Daniel O'Connor 2db3d1bacc Various corrections 2022-11-08 00:21:23 +10:30
Daniel O'Connor 34af93cfc2 Rubocop 2022-11-08 00:19:52 +10:30
Brenda 7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace b0c8b11246 📝 Inline editing and display tidy ups (#2200)
* Inline editing and display tidy ups
2019-10-08 11:06:53 +13:00
Brenda Wallace 756cf1fe3a Removing unused code in specs 2019-08-18 14:51:24 +12:00
Brenda Wallace 3d11dac718 Fixing harvest specs 2019-06-08 18:21:15 +12:00
Brenda Wallace 628a7e3ae1 Fix planting specs 2019-06-08 17:02:59 +12:00
Brenda Wallace 1eea251f95 Merge branch 'dev' into plantings-show 2019-04-19 10:39:26 +12:00
Brenda Wallace 32a88b4482 Merge remote-tracking branch 'origin/plantings-show' into plantings-show 2019-04-19 09:16:01 +12:00
Brenda Wallace a2e2362594 Linter fix ups 2019-04-19 09:15:41 +12:00
Brenda Wallace 0ae33d9b03 Merge branch 'dev' into plantings-show 2019-04-13 21:02:56 +12:00
Brenda Wallace 01a3654d41 Working without elastic search too 2019-04-08 21:39:20 +12:00
Brenda Wallace e5c0edb0d0 Tidy up specs 2019-04-08 21:39:20 +12:00
Brenda Wallace bd797a4d8e Change call to reindex crops in specs 2019-04-08 21:39:20 +12:00
Brenda Wallace 495002d8b9 Change "background" to "before" 2019-04-01 23:02:50 +13:00
Brenda Wallace 43bb606a2b Cleaning up small screen presentation 2019-03-29 15:48:47 +13:00
Brenda Wallace 830b554dc9 Test updates 2019-03-29 11:28:17 +13:00
Brenda Wallace bab9c01bf5 Updating tests 2019-03-29 10:25:30 +13:00
Awesome Code ad470ede1d Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace 2019-03-13 17:23:33 +13:00
Awesome Code f90cc792bb Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace 2019-03-13 11:42:27 +13:00
Brenda Wallace 0c78791d01 Remove unnecesary whitesapce in specs 2018-12-30 13:22:42 +13:00
Brenda Wallace 0a65e57d53 Fixed up text in spec 2018-10-16 12:42:15 +13:00
Brenda Wallace 05da2de7e4 Fix up text in checking appended date 2018-10-08 09:48:49 +13:00
Brenda Wallace 5031b37232 Adding \n into specs, because our output has it now 2018-09-29 15:51:35 +12:00
Awesome Code 273e4c07d8 Auto corrected by following RSpec/NotToNot 2018-01-13 22:49:49 +00:00
Brenda Wallace a46b8ebe76 Fix up all UnneededInterpolation 2017-02-16 12:26:47 +13:00
Brenda Wallace be2426c99f Use timezone when creating dates 2017-02-10 21:53:18 +13:00
Brenda Wallace 6bd9bd98d9 Removed extra blank lines, & added a end of file 2016-11-16 12:52:48 +13:00
Daniel O'Connor 4b4e0cf69a $ rubocop --only HashSyntax --auto-correct
483 files inspected, 2018 offenses detected, 2018 offenses corrected
2016-05-19 15:53:11 -04:00
Anthony Atkinson 5a35a3da01 Initial rendition of feature test upgrade to Ruby 2.x and Rspec 3.x syntax. 2015-07-22 19:48:41 -04:00
Skud d0f856d389 Fixed various problems with search matching 2015-02-17 19:20:25 +11:00
Shiho Takagi 018b2b4711 elasticsearch to be turned off as a default in dev and test 2015-01-21 16:47:22 +11:00
Taylor Griffin f62fd8484a get rid of annoying warning about doubly loaded files when running tests 2014-12-15 21:13:22 +11:00
Taylor Griffin c83b01bbb7 catch up with dev 2014-11-18 22:59:43 +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 af9aa690ba Merge branch 'dev' of https://github.com/Growstuff/growstuff into finish-plantings-javascript 2014-11-11 18:37:30 +11:00
Miles Gould b989168887 Fix "shared example group previously defined" warning
We were getting the warning

```
WARNING: Shared example group 'crop suggest' has been previously defined
at:
  /Users/miles/src/growstuff/spec/features/shared_examples/crop_suggest_spec.rb:3
...and you are now defining it at:
  /Users/miles/src/growstuff/spec/features/shared_examples/crop_suggest_spec.rb:3
The new definition will overwrite the original one.
```

Following the suggestion at
https://github.com/rspec/rspec-core/issues/828#issuecomment-38789977,
I've renamed crop_suggest_spec.rb to crop_suggest.rb, which made the
error go away without reducing the number of tests run. RSpec must
have thought it was a spec file and loaded it directly, then loaded it
again when it was first required by an actual spec file.
2014-11-02 22:57:29 +00:00
Taylor Griffin 0ccd6e843a implement confirm without date functionality on appty on append date js 2014-10-23 22:43:38 +11:00
Taylor Griffin 9b10a7c3ce write shared example group for append date 2014-10-23 22:18:52 +11:00
catfriend b0ee83bc3e added test for adding placeholder text 2014-09-05 16:23:33 -07:00
Taylor Griffin 7fa05d81e9 fix tests to match new implementation of of auto_suggest 2014-08-29 07:38:55 +10:00
Taylor Griffin fd651de7ea implement auto suggest on new seed page 2014-08-24 12:02:53 +10:00
Taylor Griffin d038ac6d8a test that input value is not affected by auto suggest 2014-08-24 10:53:24 +10:00