mirror of https://github.com/zulip/zulip.git
Add test for subscribing to a stream.
(imported from commit e006bcfa5f4c5bbabda839470904689ed1ca5a2b)
This commit is contained in:
parent
9ecbff26f8
commit
65a474c37c
|
@ -285,6 +285,18 @@ casper.then(function() {
|
||||||
casper.click('a[href^="#subscriptions"]');
|
casper.click('a[href^="#subscriptions"]');
|
||||||
casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/#subscriptions/, 'URL suggests we are on subscriptions page');
|
casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/#subscriptions/, 'URL suggests we are on subscriptions page');
|
||||||
casper.test.assertExists('#subscriptions.tab-pane.active', 'Subscriptions page is active');
|
casper.test.assertExists('#subscriptions.tab-pane.active', 'Subscriptions page is active');
|
||||||
|
casper.waitForText('Denmark'); // subscriptions need to load
|
||||||
|
casper.test.assertTextExists('Denmark', 'Initial subscriptions loaded');
|
||||||
|
});
|
||||||
|
casper.then(function() {
|
||||||
|
casper.fill('form#add_new_subscription', {streams: 'waseemio'});
|
||||||
|
casper.click('form#add_new_subscription input.btn.btn-primary');
|
||||||
|
});
|
||||||
|
casper.then(function() {
|
||||||
|
casper.waitForText('waseemio');
|
||||||
|
// TODO: Make this more robust.
|
||||||
|
// I tried to do it with assertSelectorHasText, but it wasn't quite working.
|
||||||
|
casper.test.assertTextExists('Successfully added subscription to waseemio', 'Subscribing to a stream');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Settings page tests
|
// Settings page tests
|
||||||
|
|
Loading…
Reference in New Issue