Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into AO3-3471
Browse files Browse the repository at this point in the history
  • Loading branch information
ceithir committed Nov 16, 2023
2 parents 3ea98ed + bba3552 commit 091b0f1
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ permissions:
checks: write

jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: rubocop
uses: reviewdog/action-rubocop@e70b014b8062c447d6b515ee0209f834ea93e696
with:
use_bundler: true
reporter: github-pr-check
skip_install: true

erb-lint:
name: ERB Lint runner
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ jshint:
ignore_file: .jshintignore

rubocop:
version: 1.22.1
config_file: .rubocop.yml
enabled: false
13 changes: 12 additions & 1 deletion features/collections/collection_anonymity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Feature: Collection
And all emails have been delivered
When I am logged in as "first_user"
And I post the work "First Snippet" to the collection "Hidden Treasury" as a gift for "third_user"
# Delay before posting to make sure first work is clearly older
And it is currently 1 second from now
And I post the work "Second Snippet" to the collection "Hidden Treasury" as a gift for "fourth_user"
And subscription notifications are sent
Then 0 emails should be delivered
Expand Down Expand Up @@ -160,13 +162,17 @@ Feature: Collection
And the user "third_user" allows gifts
And I am logged in as "first_user"
And I post the work "First Snippet" to the collection "Anonymous Hugs" as a gift for "third_user"
# Delay before posting to make sure first work is clearly older
And it is currently 1 second from now
And I post the work "Second Snippet" to the collection "Anonymous Hugs" as a gift for "not a user"
When subscription notifications are sent
Then "second_user" should not be emailed
When I am logged in as "moderator"
And I view the approved collection items page for "Anonymous Hugs"
# items listed in date order so checking the second will reveal the older work
And I uncheck the 2nd checkbox with id matching "collection_items_\d+_anonymous"
# Delay before submitting to make sure the cache is expired
And it is currently 1 second from now
And I submit
Then the author of "First Snippet" should be publicly visible
When subscription notifications are sent
Expand Down Expand Up @@ -388,6 +394,8 @@ Feature: Collection
When I am logged in as the owner of "Anonymous Collection"
And I go to "Anonymous Collection" collection edit page
And I follow "Delete Collection"
# Delay before deleting to make sure the cache is expired
And it is currently 1 second from now
And I press "Yes, Delete Collection"
And I go to creator's works page
Then I should see "Secret Work"
Expand Down Expand Up @@ -418,6 +426,8 @@ Feature: Collection
When I am logged in as the owner of "Anonymous Collection"
And I view the approved collection items page for "Anonymous Collection"
And I check "Remove"
# Delay before submitting to make sure the cache is expired
And it is currently 1 second from now
And I submit
And I go to creator's works page
Then I should see "Secret Work"
Expand Down Expand Up @@ -451,8 +461,9 @@ Feature: Collection

When I edit the work "Secret Work"
And I fill in "Collections" with "Holidays,Fluffy"
# Delay before posting to make sure the cache is expired
And it is currently 1 second from now
And I press "Post"
And all indexing jobs have been run
And I go to my works page
Then I should see "Secret Work"

Expand Down
4 changes: 4 additions & 0 deletions features/other_a/orphan_pseud.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Feature: Orphan pseud
When I follow "Back To Pseuds"
Then I should see "orphanpseud"
And I should see "2 works"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Works"
Then I should see "Orphan All Works by orphanpseud"
When I choose "Take my pseud off as well"
Expand All @@ -44,6 +46,8 @@ Feature: Orphan pseud
When I follow "Back To Pseuds"
Then I should see "orphanpseud"
And I should see "2 works"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Works"
Then I should see "Orphan All Works by orphanpseud"
When I choose "Leave a copy of my pseud on"
Expand Down
6 changes: 6 additions & 0 deletions features/other_a/orphan_work.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Feature: Orphan work
When I follow "Edit"
Then I should see "Edit Work"
And I should see "Orphan Work"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Work"
Then I should see "Read More About The Orphaning Process"
When I choose "Take my pseud off as well"
Expand All @@ -46,6 +48,8 @@ Feature: Orphan work
When I follow "Edit"
Then I should see "Edit Work"
And I should see "Orphan Work"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Work"
Then I should see "Read More About The Orphaning Process"
When I choose "Leave a copy of my pseud on"
Expand Down Expand Up @@ -131,6 +135,8 @@ Feature: Orphan work
And I should see "Glorious"
And I should see "Excellent"
And I should not see "Lovely"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Works Instead"
Then I should see "Orphaning a work removes it from your account and re-attaches it to the specially created orphan_account."
When I press "Yes, I'm sure"
Expand Down
2 changes: 2 additions & 0 deletions features/other_b/series.feature
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ Feature: Create and Edit Series
Then I should see "Work was successfully updated."
And "moon" should be a creator of the series "Ponies"
And "son" should be a creator on the series "Ponies"
# Delay to make sure the cache is expired
And it is currently 1 second from now
When I follow "Remove Me As Co-Creator"
Then I should see "You have been removed as a creator from the series and its works."
And "moon" should not be the creator of the series "Ponies"
Expand Down
2 changes: 2 additions & 0 deletions features/tags_and_wrangling/tag_wrangling.feature
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ Feature: Tag wrangling
When I edit the tag "Child"
And I check the 1st checkbox with id matching "MetaTag"
And I fill in "tag_meta_tag_string" with "Grandparent"
# Ensure a new cache key will be used
And it is currently 1 second from now
And I press "Save changes"
Then I should see "Tag was updated"
And I should see "Grandparent" within "#parent_MetaTag_associations_to_remove_checkboxes"
Expand Down
9 changes: 6 additions & 3 deletions features/users/user_delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Scenario: Allow a user to orphan their works when deleting their account
When I try to delete my account as orphaner
Then I should see "What do you want to do with your works?"
When I choose "Change my pseud to "orphan" and attach to the orphan account"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
And I press "Save"
Then I should see "You have successfully deleted your account."
And 0 emails should be delivered
Expand All @@ -66,16 +68,17 @@ Scenario: Delete a user with a collection
When I try to delete my account as moderator
Then I should see "You have 1 collection(s) under the following pseuds: moderator."
When I choose "Change my pseud to "orphan" and attach to the orphan account"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
And I press "Save"
Then I should see "You have successfully deleted your account."
And 0 emails should be delivered
And I should be logged out
And a user account should not exist for "moderator"
When I go to the collections page
Then I should see "fake"
# TODO: And a caching bug is fixed...
# And I should see "orphan_account"
# And I should not see "moderator"
And I should see "orphan_account"
And I should not see "moderator"

Scenario: Delete a user who has coauthored a work
Given the following activated users exist
Expand Down

0 comments on commit 091b0f1

Please sign in to comment.