mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Remove redundant success messages from subscriptions page
The fact that the user sees a change (the button changes or a row appears) makes it obvious that the operation was a success. The success messages were only serving to make the page scroll confusingly when you couldn't see the top. (imported from commit 471b9304f71bb8533c98d208b855d4d75c04a886)
This commit is contained in:
parent
df712b7794
commit
2e7d411ef8
@ -295,8 +295,6 @@ function ajaxSubscribe(stream) {
|
||||
ui.report_success("Already subscribed to " + name, $("#subscriptions-status"));
|
||||
} else {
|
||||
name = res.subscribed[0];
|
||||
ui.report_success("Successfully added subscription to " + name,
|
||||
$("#subscriptions-status"));
|
||||
}
|
||||
mark_subscribed(name);
|
||||
},
|
||||
@ -321,8 +319,6 @@ function ajaxUnsubscribe(stream) {
|
||||
$("#subscriptions-status"));
|
||||
} else {
|
||||
name = res.removed[0];
|
||||
ui.report_success("Successfully removed subscription to " + name,
|
||||
$("#subscriptions-status"));
|
||||
}
|
||||
mark_unsubscribed(name);
|
||||
},
|
||||
|
||||
@ -312,9 +312,7 @@ casper.then(function() {
|
||||
casper.waitForText('Waseemio');
|
||||
});
|
||||
casper.then(function() {
|
||||
// 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.assertSelectorHasText('.subscription_name', 'Waseemio', 'Subscribing to a stream');
|
||||
casper.fill('form#add_new_subscription', {stream_name: 'WASeemio'});
|
||||
casper.click('form#add_new_subscription input.btn.btn-primary');
|
||||
casper.waitForText('Already subscribed');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user