mirror of https://github.com/zulip/zulip.git
tests: Be more robust about detecting when the subscriptions page has loaded.
We apparently cannot rely on Iago to consistently be subscribed to "Denmark", so make this determination some other way. (imported from commit 2a75b345c2d82097ab44538942af89536aac09ed)
This commit is contained in:
parent
8c2a9617e7
commit
d2a7d06dea
|
@ -285,10 +285,12 @@ casper.then(function() {
|
|||
casper.click('a[href^="#subscriptions"]');
|
||||
casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/#subscriptions/, 'URL suggests we are on subscriptions page');
|
||||
casper.test.assertExists('#subscriptions.tab-pane.active', 'Subscriptions page is active');
|
||||
casper.waitForText('Denmark'); // subscriptions need to load
|
||||
// subscriptions need to load; if they have *any* subs,
|
||||
// the word "Unsubscribe" will appear
|
||||
casper.waitForText('Unsubscribe');
|
||||
});
|
||||
casper.then(function() {
|
||||
casper.test.assertTextExists('Denmark', 'Initial subscriptions loaded');
|
||||
casper.test.assertTextExists('Unsubscribe', 'Initial subscriptions loaded');
|
||||
casper.fill('form#add_new_subscription', {streams: 'Waseemio'});
|
||||
casper.click('form#add_new_subscription input.btn.btn-primary');
|
||||
casper.waitForText('Waseemio');
|
||||
|
|
Loading…
Reference in New Issue