mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Remove flaky inline subscribe button tests.
(imported from commit b7be5827a433d66d02a24349ba2fe299ce9e3d9f)
This commit is contained in:
parent
54ae946061
commit
8efa04437d
@ -42,56 +42,6 @@ casper.then(function () {
|
||||
casper.test.assertTextExists('Error adding subscription', "Can't subscribe to an empty stream name");
|
||||
});
|
||||
|
||||
// Test the inline subscribe and unsubscribe in messages
|
||||
casper.then(function () {
|
||||
casper.click('a[href^="#"]');
|
||||
casper.test.assertExists('#home.tab-pane.active', 'home page is active');
|
||||
});
|
||||
|
||||
// Test an inline subscribe button for an unsubscribed stream
|
||||
common.send_message('stream', {
|
||||
stream: 'Verona',
|
||||
subject: 'Inline subscribe',
|
||||
content: "!_stream_subscribe_button(inline stream)"
|
||||
});
|
||||
|
||||
var new_stream_button = '.inline-subscribe[data-stream-name="inline stream"] .inline-subscribe-button';
|
||||
|
||||
casper.waitUntilVisible(new_stream_button, function () {
|
||||
casper.test.assertSelectorHasText(new_stream_button,
|
||||
'Subscribe to inline stream',
|
||||
'New inline subscribe button starts as subscribe');
|
||||
casper.click(new_stream_button);
|
||||
});
|
||||
|
||||
casper.waitUntilVisible('.narrow-filter[data-name="inline stream"]', function () {
|
||||
casper.test.assertSelectorHasText(new_stream_button,
|
||||
'Unsubscribe from inline stream',
|
||||
'New inline subscribe button becomes unsubscribe');
|
||||
casper.click(new_stream_button);
|
||||
});
|
||||
|
||||
casper.waitWhileVisible('.narrow-filter[data-name="inline stream"]', function () {
|
||||
casper.test.assertSelectorHasText(new_stream_button,
|
||||
'Subscribe to inline stream',
|
||||
'New inline subscribe returns to subscribe on unsubscribe');
|
||||
});
|
||||
|
||||
// Test an inline subscribe button for an subscribed stream
|
||||
common.send_message('stream', {
|
||||
stream: 'Verona',
|
||||
subject: 'Inline subscribe',
|
||||
content: "!_stream_subscribe_button(Denmark)"
|
||||
});
|
||||
|
||||
var existing_stream_button = '.inline-subscribe[data-stream-name="Denmark"] .inline-subscribe-button';
|
||||
|
||||
casper.waitUntilVisible(new_stream_button, function () {
|
||||
casper.test.assertSelectorHasText(existing_stream_button,
|
||||
'Unsubscribe from denmark',
|
||||
'Existing subscribe button starts as unsubscribe');
|
||||
});
|
||||
|
||||
common.then_log_out();
|
||||
|
||||
casper.run(function () {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user