mirror of
https://github.com/discourse/DiscoTOC.git
synced 2026-10-13 10:41:56 -04:00
FEATURE: Toggle between timeline and TOC (#68)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import topicFixtures from "discourse/tests/fixtures/topic";
|
||||
import {
|
||||
@@ -66,6 +66,14 @@ acceptance("DiscoTOC - main", function (needs) {
|
||||
"heading gets an ID even when it has no Latin characters"
|
||||
);
|
||||
});
|
||||
|
||||
test("TOC can be toggled to reveal timeline", async function (assert) {
|
||||
await visit("/t/internationalization-localization/280");
|
||||
assert.ok(exists(".d-toc-timeline-toggle"), "TOC toggle exists");
|
||||
|
||||
await click(".d-toc-timeline-toggle");
|
||||
assert.ok(exists(".topic-timeline"), "The timeline is shown on toggle");
|
||||
});
|
||||
});
|
||||
|
||||
acceptance("DiscoTOC - off", function (needs) {
|
||||
|
||||
Reference in New Issue
Block a user