mirror of
https://github.com/discourse/discourse.git
synced 2025-06-22 15:01:46 +08:00
Upgrade QUnit to latest version
This commit is contained in:
@ -1,22 +1,22 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("Topic - Anonymous");
|
||||
|
||||
test("Enter a Topic", () => {
|
||||
QUnit.test("Enter a Topic", assert => {
|
||||
visit("/t/internationalization-localization/280/1");
|
||||
andThen(() => {
|
||||
ok(exists("#topic"), "The topic was rendered");
|
||||
ok(exists("#topic .cooked"), "The topic has cooked posts");
|
||||
assert.ok(exists("#topic"), "The topic was rendered");
|
||||
assert.ok(exists("#topic .cooked"), "The topic has cooked posts");
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter without an id", () => {
|
||||
QUnit.test("Enter without an id", assert => {
|
||||
visit("/t/internationalization-localization");
|
||||
andThen(() => {
|
||||
ok(exists("#topic"), "The topic was rendered");
|
||||
assert.ok(exists("#topic"), "The topic was rendered");
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter a 404 topic", assert => {
|
||||
QUnit.test("Enter a 404 topic", assert => {
|
||||
visit("/t/not-found/404");
|
||||
andThen(() => {
|
||||
assert.ok(!exists("#topic"), "The topic was not rendered");
|
||||
@ -24,7 +24,7 @@ test("Enter a 404 topic", assert => {
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter without access", assert => {
|
||||
QUnit.test("Enter without access", assert => {
|
||||
visit("/t/i-dont-have-access/403");
|
||||
andThen(() => {
|
||||
assert.ok(!exists("#topic"), "The topic was not rendered");
|
||||
@ -32,10 +32,10 @@ test("Enter without access", assert => {
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter with 500 errors", assert => {
|
||||
QUnit.test("Enter with 500 errors", assert => {
|
||||
visit("/t/throws-error/500");
|
||||
andThen(() => {
|
||||
assert.ok(!exists("#topic"), "The topic was not rendered");
|
||||
assert.ok(exists(".topic-error"), "An error message is displayed");
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user