From 7f114ac76491f7a98ad70bbd56b1539ab098ca1e Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Tue, 5 Mar 2024 06:21:43 -0500 Subject: [PATCH 1/2] Move API docs to apidoc folder --- example_docs/docs/{sphinx_guide => apidoc}/inline_classes.rst | 0 .../docs/{sphinx_guide/autodoc.rst => apidoc/module.rst} | 0 example_docs/docs/index.rst | 4 ++-- tests/js/tests.js | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) rename example_docs/docs/{sphinx_guide => apidoc}/inline_classes.rst (100%) rename example_docs/docs/{sphinx_guide/autodoc.rst => apidoc/module.rst} (100%) diff --git a/example_docs/docs/sphinx_guide/inline_classes.rst b/example_docs/docs/apidoc/inline_classes.rst similarity index 100% rename from example_docs/docs/sphinx_guide/inline_classes.rst rename to example_docs/docs/apidoc/inline_classes.rst diff --git a/example_docs/docs/sphinx_guide/autodoc.rst b/example_docs/docs/apidoc/module.rst similarity index 100% rename from example_docs/docs/sphinx_guide/autodoc.rst rename to example_docs/docs/apidoc/module.rst diff --git a/example_docs/docs/index.rst b/example_docs/docs/index.rst index d23fc817..77911bf8 100644 --- a/example_docs/docs/index.rst +++ b/example_docs/docs/index.rst @@ -19,8 +19,8 @@ A site to test out styling for qiskit-sphinx-theme. :caption: API :maxdepth: 2 - Autodoc - Inline classes + Autodoc + Inline classes .. toctree:: :caption: Special elements diff --git a/tests/js/tests.js b/tests/js/tests.js index f2510fde..f17a5253 100644 --- a/tests/js/tests.js +++ b/tests/js/tests.js @@ -69,7 +69,7 @@ test.describe("left side bar", () => { test.describe("api docs", () => { test("module page", async ({ page }) => { - await page.goto("sphinx_guide/autodoc.html"); + await page.goto("apidoc/autodoc.html"); const content = page.locator("div.article-container"); await expect(content).toHaveScreenshot(); }); @@ -87,7 +87,7 @@ test.describe("api docs", () => { }); test("inline classes", async ({ page }) => { - await page.goto("sphinx_guide/inline_classes.html"); + await page.goto("apidoc/inline_classes.html"); const content = page.locator("div.article-container"); await expect(content).toHaveScreenshot(); }); From 8902b5a62703bd2970c441c919ba959e13af6bb5 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Tue, 5 Mar 2024 06:31:32 -0500 Subject: [PATCH 2/2] Actually fix tests --- tests/js/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/js/tests.js b/tests/js/tests.js index f17a5253..af235a67 100644 --- a/tests/js/tests.js +++ b/tests/js/tests.js @@ -45,7 +45,7 @@ test("right side bar is not broken by our page layout", async ({ page }) => { test.describe("left side bar", () => { test("renders correctly", async ({ page }) => { // Go to a top-level page so that we can see how the expanded side bar looks. - await page.goto("sphinx_guide/autodoc.html"); + await page.goto("apidoc/module.html"); const leftToC = page.locator(".sidebar-drawer"); await expect(leftToC).toHaveScreenshot(); }); @@ -69,7 +69,7 @@ test.describe("left side bar", () => { test.describe("api docs", () => { test("module page", async ({ page }) => { - await page.goto("apidoc/autodoc.html"); + await page.goto("apidoc/module.html"); const content = page.locator("div.article-container"); await expect(content).toHaveScreenshot(); });