FEATURE: Toggle between timeline and TOC (#68)

This commit is contained in:
Kris
2023-12-11 12:53:17 -05:00
committed by GitHub
parent bab2e8f3b9
commit a089aa0289
8 changed files with 250 additions and 52 deletions
+9 -1
View File
@@ -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) {