12-toggle-message-editing: Add wait before flaky test.

This commit is contained in:
Umair Khan 2017-11-23 11:06:19 +05:00 committed by Tim Abbott
parent 49f4c33a57
commit f70b36a5a9
1 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,12 @@ casper.then(function () {
// Check that edit link has changed to "View source" in the popover menu // Check that edit link has changed to "View source" in the popover menu
// TODO: also check that the edit icon no longer appears next to the message // TODO: also check that the edit icon no longer appears next to the message
casper.then(function () {
// This somehow makes the "View source" test deterministic. It seems that
// we are waiting on a wrong condition somewhere.
casper.wait(1000);
});
casper.then(function () { casper.then(function () {
casper.waitUntilVisible('.message_row'); casper.waitUntilVisible('.message_row');
// Note that this could have a false positive, e.g. if all the messages aren't // Note that this could have a false positive, e.g. if all the messages aren't