discourse/test/javascripts/acceptance/user-test.js.es6

34 lines
890 B
Plaintext
Raw Normal View History

import { acceptance } from "helpers/qunit-helpers";
2014-07-31 01:27:14 +08:00
2015-04-22 02:36:46 +08:00
acceptance("User", {loggedIn: true});
2014-07-31 01:27:14 +08:00
test("Invites", () => {
2017-03-29 02:27:54 +08:00
visit("/u/eviltrout/invited/pending");
andThen(() => {
ok($('body.user-invites-page').length, "has the body class");
});
});
test("Messages", () => {
2017-03-29 02:27:54 +08:00
visit("/u/eviltrout/messages");
andThen(() => {
ok($('body.user-messages-page').length, "has the body class");
});
});
test("Notifications", () => {
2017-03-29 02:27:54 +08:00
visit("/u/eviltrout/notifications");
andThen(() => {
ok($('body.user-notifications-page').length, "has the body class");
});
});
test("Root URL - Viewing Self", () => {
2017-03-29 02:27:54 +08:00
visit("/u/eviltrout");
andThen(() => {
2017-03-08 01:36:31 +08:00
ok($('body.user-activity-page').length, "has the body class");
equal(currentPath(), 'user.userActivity.index', "it defaults to activity");
2016-11-11 03:35:53 +08:00
ok(exists('.container.viewing-self'), "has the viewing-self class");
});
});