This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/test/javascripts/acceptance/login-required-test.js.es6
T
2020-03-25 16:13:43 -04:00

22 lines
611 B
JavaScript

import { acceptance } from "helpers/qunit-helpers";
acceptance("Login Required", {
settings: {
login_required: true
}
});
QUnit.test("redirect", async assert => {
await visit("/latest");
assert.equal(currentPath(), "login", "it redirects them to login");
await click("#site-logo");
assert.equal(currentPath(), "login", "clicking the logo keeps them on login");
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");
});