mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
A few more subscription-related tests.
(imported from commit 4d2b47d124bdf0e483363fb7852061bd690d0064)
This commit is contained in:
parent
65a474c37c
commit
055652e16d
@ -289,14 +289,32 @@ casper.then(function() {
|
||||
casper.test.assertTextExists('Denmark', 'Initial subscriptions loaded');
|
||||
});
|
||||
casper.then(function() {
|
||||
casper.fill('form#add_new_subscription', {streams: 'waseemio'});
|
||||
casper.fill('form#add_new_subscription', {streams: 'Waseemio'});
|
||||
casper.click('form#add_new_subscription input.btn.btn-primary');
|
||||
});
|
||||
casper.then(function() {
|
||||
casper.waitForText('waseemio');
|
||||
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');
|
||||
casper.test.assertTextExists('Successfully added subscription to Waseemio', 'Subscribing to a stream');
|
||||
});
|
||||
|
||||
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('Already subscribed');
|
||||
casper.test.assertTextExists('Already subscribed', "Can't subscribe twice to a stream");
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
casper.fill('form#add_new_subscription', {streams: ' '});
|
||||
casper.click('form#add_new_subscription input.btn.btn-primary');
|
||||
});
|
||||
casper.then(function() {
|
||||
casper.waitForText('Error adding subscription');
|
||||
casper.test.assertTextExists('Error adding subscription', "Can't subscribe to an empty stream name");
|
||||
});
|
||||
|
||||
// Settings page tests
|
||||
|
||||
Loading…
Reference in New Issue
Block a user