From 7ca2d21d9785b7ec4a650a2ea17603d109e435fa Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 11 Jan 2017 14:47:14 -0800 Subject: [PATCH] casper: Clean up some line-wrapping. This feels a bit more readable than the original version; noticed it while playing with the comma-dangle linter. --- .../casper_tests/05-subscriptions.js | 24 +++++++------------ frontend_tests/casper_tests/06-settings.js | 18 +++++--------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/frontend_tests/casper_tests/05-subscriptions.js b/frontend_tests/casper_tests/05-subscriptions.js index c68177d738..307c4ac110 100644 --- a/frontend_tests/casper_tests/05-subscriptions.js +++ b/frontend_tests/casper_tests/05-subscriptions.js @@ -47,20 +47,16 @@ casper.waitForSelector("form#stream_creation_form", function () { casper.waitForSelector(".subscriber-list", function () { casper.test.assertEquals(casper.visible('#user-checkboxes [data-email="cordelia@zulip.com"]'), false, - "Cordelia is not visible" - ); + "Cordelia is not visible"); casper.test.assertEquals(casper.visible('#user-checkboxes [data-email="othello@zulip.com"]'), true, - "Othello is visible" - ); + "Othello is visible"); casper.test.assertEquals(casper.visible('#stream-checkboxes [data-stream-name="Scotland"]'), true, - "Scotland is visible" - ); + "Scotland is visible"); casper.test.assertEquals(casper.visible('#stream-checkboxes [data-stream-name="Rome"]'), false, - "Rome is not visible" - ); + "Rome is not visible"); }); casper.then(function () { casper.test.info("Clearing user filter search box"); @@ -69,20 +65,16 @@ casper.then(function () { casper.then(function () { casper.test.assertEquals(casper.visible('#user-checkboxes [data-email="cordelia@zulip.com"]'), true, - "Cordelia is visible again" - ); + "Cordelia is visible again"); casper.test.assertEquals(casper.visible('#user-checkboxes [data-email="othello@zulip.com"]'), true, - "Othello is visible again" - ); + "Othello is visible again"); casper.test.assertEquals(casper.visible('#stream-checkboxes [data-stream-name="Scotland"]'), true, - "Scotland is visible again" - ); + "Scotland is visible again"); casper.test.assertEquals(casper.visible('#stream-checkboxes [data-stream-name="Rome"]'), true, - "Rome is visible again" - ); + "Rome is visible again"); }); casper.waitForSelector('#stream_creation_form', function () { casper.test.assertTextExists('Add New Stream', 'New stream creation panel'); diff --git a/frontend_tests/casper_tests/06-settings.js b/frontend_tests/casper_tests/06-settings.js index 0da36f7ebe..bf4d90e065 100644 --- a/frontend_tests/casper_tests/06-settings.js +++ b/frontend_tests/casper_tests/06-settings.js @@ -94,8 +94,7 @@ casper.then(function () { casper.test.assertMatch( decodeURIComponent(casper.getElementsAttribute('#download_zuliprc', 'href')), regex_zuliprc, - 'Looks like a zuliprc file' - ); + 'Looks like a zuliprc file'); }); }); @@ -129,8 +128,7 @@ casper.then(function () { casper.test.assertMatch( decodeURIComponent(casper.getElementsAttribute(button_sel, 'href')), regex_zuliprc, - 'Looks like a bot ~/.zuliprc file' - ); + 'Looks like a bot ~/.zuliprc file'); }); }); }); @@ -149,20 +147,16 @@ casper.then(function () { // casper.test.assertEqual( // common.get_form_field_value(form_sel + ' [name=bot_name]'), - // 'Bot 1' - // ); + // 'Bot 1'); // casper.test.assertEqual( // common.get_form_field_value(form_sel + ' [name=bot_default_sending_stream]'), - // 'Denmark' - // ); + // 'Denmark'); // casper.test.assertEqual( // common.get_form_field_value(form_sel + ' [name=bot_default_events_register_stream]'), - // 'Rome' - // ); + // 'Rome'); casper.test.assertEqual( common.get_form_field_value(form_sel + ' [name=bot_name]'), - 'Bot 1' - ); + 'Bot 1'); }); });