2014-07-31 01:27:14 +08:00
|
|
|
integration("User");
|
|
|
|
|
|
|
|
function hasStream() {
|
2015-03-19 19:22:56 +08:00
|
|
|
andThen(() => {
|
2014-07-31 01:27:14 +08:00
|
|
|
ok(exists('.user-main .about'), 'it has the about section');
|
|
|
|
ok(count('.user-stream .item') > 0, 'it has stream items');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function hasTopicList() {
|
2015-03-19 19:22:56 +08:00
|
|
|
andThen(() => {
|
2014-07-31 01:27:14 +08:00
|
|
|
equal(count('.user-stream .item'), 0, "has no stream displayed");
|
|
|
|
ok(count('.topic-list tr') > 0, 'it has a topic list');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2015-03-19 19:22:56 +08:00
|
|
|
test("Filters", () => {
|
2014-07-31 01:27:14 +08:00
|
|
|
expect(14);
|
|
|
|
|
|
|
|
visit("/users/eviltrout");
|
|
|
|
hasStream();
|
2015-03-19 19:22:56 +08:00
|
|
|
|
2014-07-31 01:27:14 +08:00
|
|
|
visit("/users/eviltrout/activity/topics");
|
|
|
|
hasTopicList();
|
2015-03-19 19:22:56 +08:00
|
|
|
|
2014-07-31 01:27:14 +08:00
|
|
|
visit("/users/eviltrout/activity/posts");
|
|
|
|
hasStream();
|
2015-03-19 19:22:56 +08:00
|
|
|
|
2014-07-31 01:27:14 +08:00
|
|
|
visit("/users/eviltrout/activity/replies");
|
|
|
|
hasStream();
|
2015-03-19 19:22:56 +08:00
|
|
|
|
2014-07-31 01:27:14 +08:00
|
|
|
visit("/users/eviltrout/activity/likes-given");
|
|
|
|
hasStream();
|
2015-03-19 19:22:56 +08:00
|
|
|
|
2014-07-31 01:27:14 +08:00
|
|
|
visit("/users/eviltrout/activity/likes-received");
|
|
|
|
hasStream();
|
2015-03-19 19:22:56 +08:00
|
|
|
|
2014-07-31 01:27:14 +08:00
|
|
|
visit("/users/eviltrout/activity/edits");
|
|
|
|
hasStream();
|
|
|
|
});
|