2015-04-07 02:14:00 +08:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("Badges");
|
2014-08-01 06:44:32 +08:00
|
|
|
|
2017-06-15 01:57:58 +08:00
|
|
|
QUnit.test("Visit Badge Pages", assert => {
|
2014-08-01 06:44:32 +08:00
|
|
|
visit("/badges");
|
2015-03-19 19:22:56 +08:00
|
|
|
andThen(() => {
|
2017-06-15 01:57:58 +08:00
|
|
|
assert.ok($('body.badges-page').length, "has body class");
|
|
|
|
assert.ok(exists('.badge-groups .badge-card'), "has a list of badges");
|
2014-08-01 06:44:32 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
visit("/badges/9/autobiographer");
|
2015-03-19 19:22:56 +08:00
|
|
|
andThen(() => {
|
2017-06-15 01:57:58 +08:00
|
|
|
assert.ok(exists('.badge-card'), "has the badge in the listing");
|
|
|
|
assert.ok(exists('.user-info'), "has the list of users with that badge");
|
|
|
|
assert.ok(!exists('.badge-card:eq(0) script'));
|
2014-08-01 06:44:32 +08:00
|
|
|
});
|
2017-06-15 01:57:58 +08:00
|
|
|
});
|