From de957be1deb051aaddbfc2bc2dd73b7bf5e116a3 Mon Sep 17 00:00:00 2001 From: Brian Austin <13002992+brianjaustin@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:59:48 -0500 Subject: [PATCH 1/4] AO3-6605 Add Reviewdog for Rubocop check (#4631) * AO3-6605 Add Reviewdog for Rubocop check * Fix checkout version * Remove rubocop from Hound * Explicitly disable Hound * Efficiency improvement * Remove unneeded lines --------- Co-authored-by: Bilka --- .github/workflows/reviewdog.yml | 19 +++++++++++++++++++ .hound.yml | 3 +-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 7e65dbd8a8c..dd46beec8ef 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -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 diff --git a/.hound.yml b/.hound.yml index 42909ccedb6..236f7f409ba 100644 --- a/.hound.yml +++ b/.hound.yml @@ -6,5 +6,4 @@ jshint: ignore_file: .jshintignore rubocop: - version: 1.22.1 - config_file: .rubocop.yml + enabled: false From 1477313cc8465af95e73d05cbf913946b1039c79 Mon Sep 17 00:00:00 2001 From: Bilka Date: Mon, 13 Nov 2023 04:05:15 +0100 Subject: [PATCH 2/4] AO3-6601 Fix flaky orphan work tests (#4656) --- features/other_a/orphan_work.feature | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/features/other_a/orphan_work.feature b/features/other_a/orphan_work.feature index 54a8723cd56..070ed1dc6f1 100644 --- a/features/other_a/orphan_work.feature +++ b/features/other_a/orphan_work.feature @@ -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" @@ -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" @@ -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" From 2fd1aaf478d808395b0d116d46524f8949ac469d Mon Sep 17 00:00:00 2001 From: Bilka Date: Mon, 13 Nov 2023 04:25:38 +0100 Subject: [PATCH 3/4] AO3-6633 Fix flaky series co-creator test (#4657) --- features/other_b/series.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/other_b/series.feature b/features/other_b/series.feature index 88b2078109d..f1208224c8c 100644 --- a/features/other_b/series.feature +++ b/features/other_b/series.feature @@ -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" From 99be16ccad1ed49dac068a2d976d7e97386f1fe7 Mon Sep 17 00:00:00 2001 From: Bilka Date: Mon, 13 Nov 2023 11:43:55 +0100 Subject: [PATCH 4/4] AO3-6632 Fix flaky collection anonymity tests (#4660) --- features/collections/collection_anonymity.feature | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/features/collections/collection_anonymity.feature b/features/collections/collection_anonymity.feature index 25340d74de8..071ece51849 100755 --- a/features/collections/collection_anonymity.feature +++ b/features/collections/collection_anonymity.feature @@ -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 @@ -160,6 +162,8 @@ 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 @@ -167,6 +171,8 @@ Feature: Collection 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 @@ -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" @@ -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" @@ -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"