AO3-5937 "Save" button visible on bookmarks when logged out and on a tag's bookmarks page#4757
AO3-5937 "Save" button visible on bookmarks when logged out and on a tag's bookmarks page#4757forceofcalm wants to merge 31 commits intootwcode:masterfrom
Conversation
|
Could you add an integration test covering this fix? |
brianjaustin
left a comment
There was a problem hiding this comment.
I think these should help with the ERB lint warning (I have not had a chance to test locally though, so some further nudges may be required)
Co-authored-by: Brian Austin <13002992+brianjaustin@users.noreply.github.com>
Co-authored-by: Brian Austin <13002992+brianjaustin@users.noreply.github.com>
|
I'm writing the integration test for this now (or at least, trying to), and I've noticed that the |
|
Hi! I have no fucking idea what RuboCop wants from me. I've tried a ton of different indents and it is still upset. |
brianjaustin
left a comment
There was a problem hiding this comment.
If rubocop and/or erblint is giving me trouble, I usually will run
rubocop -A path/to/file.rb
# or
erblint -A path/to/file.html.erbThat will often do a lot more than we need, so I also use git add -p to selectively add lines to my commit, and then run git checkout path/to/file.rb to avoid changing a bunch of things at once. I sympathise with fighting erblint/rubocop though, so I've pushed what ERB lint seems to want to brianjaustin@6f6f854
|
I've flipped the label back to action needed since the comment about the test still needs addressing |
| assert orig_cache_key == bookmark.cache_key, "Cache key #{orig_cache_key} does not match #{bookmark.cache_key}." | ||
| end | ||
|
|
||
| When "I go to the bookmarks for the tag {string}" do |tag| |
There was a problem hiding this comment.
The tests don't actually use this step, instead they use the generic "I go to ":
otwarchive/features/step_definitions/web_steps.rb
Lines 27 to 29 in 7474fad
This means the tests go to the overall bookmarks index instead of the tag's index and don't fail even if the change in this PR is reverted. If you define this path in paths.rb instead then it should work correctly
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-5937
Purpose
Wraps the "save" and "saved" actions for bookmarks in a
logged_in?check.Testing Instructions
I have left a comment for clarification on the JIRA ticket.
Credit
calm (they/them)