We're updating the issue view to help you get more done.Learn more

Intermittent test failure when removing self as co-author of series or work

Series

We see the an intermittent failure in the following scenario from other_b/series.feature on Codeship (and possibly Travis):

  Scenario: Removing self as co-author from co-authored series
    Given I am logged in as "sun"
      And I set up the draft "Sweetie Bell" as part of a series "Ponies"
      And I add the co-author "moon"
      And I post the work without preview
    When I view the series "Ponies"
      And I follow "Remove Me As Author"
    Then I should see "You have been removed as an author from the series and its works."
      And I should see "by moon"
      And I should not see "by moon, sun"
    When I go to my works page
    Then I should not see "Sweetie Bell"

The failure is

(::) failed steps (::)

expected #has_no_content?("by moon, sun") to return true, got false (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/web_steps.rb:194:in `block (2 levels) in <top (required)>'
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:192:in `/^(?:|I )should not see "([^"]*)"(?: within "([^"]*)")?$/'
features/other_b/series.feature:192:in `And I should not see "by moon, sun"'

Failing Scenarios:
cucumber features/other_b/series.feature:183 # Scenario: Removing self as co-author from co-authored series

Work

I haven't actually seen this fail in recent memory, but because it's a test that is checking to make sure a byline updates properly after a co-author was removed, it is almost certainly going to happen, so let's be pro-active and fix it now. This is in works/work_edit.feature:

  Scenario: You can remove yourself as coauthor from a work
    Given the following activated users exist
        | login          |
        | coolperson     |
        | ex_friend      |
      And I coauthored the work "Shared" as "coolperson" with "ex_friend"
      And I am logged in as "coolperson"
    When I view the work "Shared"
    Then I should see "coolperson, ex_friend" within ".byline"
    When I edit the work "Shared"
      And I follow "Remove Me As Author"
    Then I should see "You have been removed as an author from the work"
    When I view the work "Shared"
    Then I should see "ex_friend" within ".byline"
      And I should not see "coolperson" within ".byline"

The failure would be on the last step, which is checking to make sure the user "coolperson" was removed from the byline.

General info

What should happen
The tests should consistently pass

How to test
No manual testing required

Status

Assignee

Sarken

Reporter

Sarken