discourse/test/javascripts/acceptance/login-required-test.js.es6

22 lines
611 B
Plaintext
Raw Normal View History

import { acceptance } from "helpers/qunit-helpers";
acceptance("Login Required", {
2014-07-31 18:07:04 -04:00
settings: {
login_required: true
}
});
QUnit.test("redirect", async assert => {
await visit("/latest");
assert.equal(currentPath(), "login", "it redirects them to login");
2014-07-31 18:07:04 -04:00
await click("#site-logo");
assert.equal(currentPath(), "login", "clicking the logo keeps them on login");
2014-07-31 18:07:04 -04:00
await click("header .login-button");
assert.ok(exists(".login-modal"), "they can still access the login modal");
await click(".modal-header .close");
assert.ok(invisible(".login-modal"), "it closes the login modal");
2018-06-15 11:03:24 -04:00
});