Page MenuHomePhabricator

Flow: logic of edit_existing browser test is broken
Closed, InvalidPublic

Description

The edit_existing browser test is failing on beta2 for chrome; I've noticed other test runs failing on it.

With Chrome,

When I click Edit post

targets class .flow-edit-post-link with topic_index 1, i.e., the second editable post. But this is not necessarily the second topic, it could be anything. (The variable name is wrong, it should be editable_post_index 1; and there might not be anything editable on the board.)

The test succeeds in adding text to this post, successfully.
Then to confirm the saved text works,

And the saved post should contain Post edited

looks for class .flow-post-content with topic_index 1. But that's just the second post on the page, it could be anything -- an anonymous post, some other random thing.

It seems pure coincidence that this works at all!

The short-term fix is to target the same editable_post_index when checking. The Nth editable post remains editable after you edit it.

Longer term, all the Flow content tests need to zero in on a particular topic and post, *remember what it is*, then interact within that and check *within that topic*.


Version: master
Severity: normal

Details

Reference
bz64082

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:16 AM
bzimport set Reference to bz64082.
bzimport added a subscriber: Unknown Object (MLST).

Not coincidence at all, I worked hard on this. :-)

The reason this test fails for Chrome is https://bugzilla.wikimedia.org/show_bug.cgi?id=64378

I'll take it out of the Chrome build for now.

SBisson claimed this task.
SBisson subscribed.

Not relevant anymore with the current state of those tests.