casper: Fix flake in drafts tests.

On some developer machines, casper was having trouble clicking on
a hidden button. Added a step to make sure the button was visible
before being clicked on.

Also removed an unnecessary log line.
This commit is contained in:
Sampriti Panda 2017-06-25 01:01:43 +05:30 committed by showell
parent 7ccdc319c7
commit 7ac90ad925
1 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,6 @@ casper.then(function () {
casper.click('body');
casper.page.sendEvent('keypress', "c");
casper.waitUntilVisible('#stream-message', function () {
casper.test.info('Creating Private Message Draft');
casper.fill('form#send_message_form', {
stream: 'all',
subject: 'tests',
@ -195,8 +194,11 @@ casper.then(function () {
casper.click("#drafts_table .message_row.private-message .restore-draft");
waitWhileDraftsVisible(function () {
casper.test.assertVisible('#private-message');
casper.click("#enter_sends");
casper.waitUntilVisible('#compose-send-button', function () {
casper.click('#compose-send-button');
});
});
});
casper.then(function () {