Last modified: 2014-11-15 02:58:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74993, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72993 - Flow: "Deleting a topic" browser test is confused by Locked topic
Flow: "Deleting a topic" browser test is confused by Locked topic
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-05 00:01 UTC by spage
Modified: 2014-11-15 02:58 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2014-11-05 00:01:08 UTC
"Scenario: Deleting a topic" in features/moderation.feature occasionally fails with

    Then the top post should be marked as deleted                    # features/step_definitions/moderation_steps.rb:41
      expected "This topic was locked by Selenium user" to match "This topic has been deleted" (RSpec::Expectations::ExpectationNotMetError)
      ./features/step_definitions/moderation_steps.rb:42:in `/^the top post should be marked as deleted$/'
      features/moderation.feature:17:in `Then the top post should be marked as deleted'


This happens if a Locked topic is in the top few topics on the Flow board.

The newly-created top topic (<- note the terminology "top post" is wrong!) does show
  "This topic has been deleted.  Undo"
as expected, but the test is somehow picking up the moderation text of the locked topic further down on the Flow board.
Comment 1 spage 2014-11-05 04:17:15 UTC
After the failure, the first
  div(:flow_first_topic_moderation_msg, css: "div.flow-topic-titlebar div.flow-moderated-topic-title")

does contain "This topic has been deleted". So the test should work regardless of what else is on the page.

My guess is this test needs to wait for the page to "settle down" before calling first_topic_moderation_msg_element.when_present, which may immediately find an existing "This topic was locked" lower down the page.  As a start the test should wait for "AND the API action completes", e.g. when_not_present class='.flow-api-inprogress' away or check that the cursor is no longer a wait cursor.

I wonder if lots of tests need "AND the API action completes".
Comment 2 spage 2014-11-15 02:58:04 UTC
Gerrit change #171221 (why isn't Gerrit Notification Bot doing this?)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links