From 41f0069a08a329b0048b4f08a95d54af3658c403 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 26 Mar 2020 17:06:20 +0000 Subject: [PATCH] casper: Remove left-arrow message-edit tests. These tests have been notoriously brittle over time. I think the problem here was knowing whether the compose box was open or not. --- frontend_tests/casper_tests/08-edit.js | 57 -------------------------- 1 file changed, 57 deletions(-) diff --git a/frontend_tests/casper_tests/08-edit.js b/frontend_tests/casper_tests/08-edit.js index ae781fb201..e3b8f67ea5 100644 --- a/frontend_tests/casper_tests/08-edit.js +++ b/frontend_tests/casper_tests/08-edit.js @@ -99,63 +99,6 @@ casper.then(function () { }); }); -// test editing last own message -// 37 is left arrow key code -casper.then(function () { - casper.test.assertNotVisible('form.message_edit_form', 'Message edit box not visible'); - casper.waitUntilVisible(".message_edit_notice", function () { - common.keypress(37); - }); -}); - -casper.then(function () { - casper.waitUntilVisible(".message_edit_content", function () { - var fieldVal = common.get_form_field_value('.message_edit_content'); - casper.test.assertEquals(fieldVal, "test edited pm", "Opened editing last own message"); - casper.click('.message_edit_cancel'); - }); -}); - -casper.then(function () { - casper.waitWhileVisible('.message_edit', function () { - casper.click('body'); - casper.page.sendEvent('keypress', "c"); - }); -}); - -casper.then(function () { - casper.waitUntilVisible('#compose', function () { - casper.evaluate(function () { - $('#compose-textarea').expectOne().focus(); - $('#compose-textarea').trigger($.Event('keydown', { which: 37 })); - }); - }); -}); - -casper.then(function () { - casper.waitUntilVisible(".message_edit_form", function () { - casper.echo("Opened editing last own message"); - casper.click('.message_edit_cancel'); - }); -}); - -casper.then(function () { - casper.waitWhileVisible('.message_edit', function () { - casper.click('body'); - casper.page.sendEvent('keypress', "c"); - }); -}); - -casper.then(function () { - casper.waitUntilVisible('#compose', function () { - casper.evaluate(function () { - $('#compose-textarea').expectOne().focus().val('test'); - $('#compose-textarea').trigger($.Event('keydown', { which: 37 })); - }); - casper.test.assertNotVisible('form.message_edit_form', "Last own message edit doesn't open if the compose box not empty"); - }); -}); - casper.run(function () { casper.test.done(); });