This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/acceptance/sidebar-anonymous-user-test.js
Alan Guo Xiang Tan 0f0ea75a21
DEV: Display Sidebar template for anonymous user (#17962)
Setup the stage for the sidebar which will be shown to anonymous users.
2022-08-17 16:17:36 +08:00

27 lines
630 B
JavaScript

import { test } from "qunit";
import { visit } from "@ember/test-helpers";
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
acceptance("Sidebar - Anonymous User", function (needs) {
needs.settings({
enable_experimental_sidebar_hamburger: true,
enable_sidebar: true,
});
test("sidebar is displayed", async function (assert) {
await visit("/");
assert.ok(
document.body.classList.contains("has-sidebar-page"),
"adds sidebar utility class to body"
);
assert.ok(
exists(".sidebar-container"),
"sidebar exists for anonymouse user"
);
});
});