Skip to content

Commit

Permalink
Fix version switcher smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mheap committed May 6, 2022
1 parent 7e67899 commit 4073dee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/sidebar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ test.describe("Version Switcher", () => {
[
{
title: "links to the same page if it exists in previous versions",
page: "/enterprise/2.5.x/deployment/installation/docker/",
selector: 'a[data-version-id="2.1.x"]',
href: "/enterprise/2.1.x/deployment/installation/docker/",
page: "/gateway/2.8.x/install-and-run/docker/",
selector: 'a[data-version-id="2.6.x"]',
href: "/gateway/2.6.x/install-and-run/docker/",
},
{
title:
"links to the root page if the page does not exist in previous versions",
page: "/enterprise/2.5.x/deployment/installation/docker/",
selector: 'a[data-version-id="0.34-x"]',
href: "/enterprise/0.34-x",
page: "/gateway/2.8.x/admin-api/consumer-groups/examples/",
selector: 'a[data-version-id="2.6.x"]',
href: "/gateway/2.6.x",
},
].forEach((t) => {
test(t.title, async ({ page }) => {
Expand Down Expand Up @@ -80,7 +80,7 @@ test.describe("Outdated version documentation", () => {
});

test("links to the root when the page no longer exists", async ({ page }) => {
await page.goto(`/enterprise/0.31-x/postgresql-redhat/`);
await page.goto(`/enterprise/2.1.x/studio/download-install/`);
const s = await page.locator(oldVersionSelector);
await expect(await s.count()).toBe(1);
await expect(await s.getAttribute("href")).toEqual(
Expand Down

0 comments on commit 4073dee

Please sign in to comment.