mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -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');
 | 
			
		||||
 
 | 
			
		||||
@@ -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');
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user