mirror of https://github.com/zulip/zulip.git
narrow: Extract test for non existing user narrow.
This commit is contained in:
parent
4dcc1b744f
commit
91b2ac27ae
|
@ -157,6 +157,17 @@ function expect_all_pm() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function expect_non_existing_user() {
|
||||||
|
casper.then(function () {
|
||||||
|
casper.waitUntilVisible('#non_existing_user', function () {
|
||||||
|
casper.test.info("Empty feed for non existing user visible.");
|
||||||
|
var expected_message = "\n This user does not exist!" +
|
||||||
|
"\n ";
|
||||||
|
this.test.assertEquals(casper.fetchText('#non_existing_user'), expected_message);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function check_narrow_title(title) {
|
function check_narrow_title(title) {
|
||||||
return function () {
|
return function () {
|
||||||
// need to get title tag from HTML
|
// need to get title tag from HTML
|
||||||
|
@ -193,14 +204,7 @@ function search_silent_user(str, item) {
|
||||||
|
|
||||||
function search_non_existing_user(str, item) {
|
function search_non_existing_user(str, item) {
|
||||||
common.select_item_via_typeahead('#search_query', str, item);
|
common.select_item_via_typeahead('#search_query', str, item);
|
||||||
casper.then(function () {
|
expect_non_existing_user();
|
||||||
casper.waitUntilVisible('#non_existing_user', function () {
|
|
||||||
casper.test.info("Empty feed for non existing user visible.");
|
|
||||||
var expected_message = "\n This user does not exist!" +
|
|
||||||
"\n ";
|
|
||||||
this.test.assertEquals(casper.fetchText('#non_existing_user'), expected_message);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
un_narrow();
|
un_narrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue