Skip to content

Commit

Permalink
chore(deps): bump unist-util-visit from 4.1.2 to 5.0.0 (#2524)
Browse files Browse the repository at this point in the history
* chore(deps): bump unist-util-visit from 4.1.2 to 5.0.0

Bumps [unist-util-visit](https://github.com/syntax-tree/unist-util-visit) from 4.1.2 to 5.0.0.
- [Release notes](https://github.com/syntax-tree/unist-util-visit/releases)
- [Commits](syntax-tree/unist-util-visit@4.1.2...5.0.0)

---
updated-dependencies:
- dependency-name: unist-util-visit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* tests: add regression tests around docs instance cross-linking

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Steven Hicks <[email protected]>
Co-authored-by: Steven Hicks <[email protected]>
  • Loading branch information
3 people authored Sep 1, 2023
1 parent 1ccc6fd commit 365ad85
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 38 deletions.
102 changes: 67 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-player": "^2.11.0",
"unist-util-visit": "^4.1.2"
"unist-util-visit": "^5.0.0"
},
"browserslist": {
"production": [
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const config: PlaywrightTestConfig = {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
baseURL: "https://docs.camunda.io",
baseURL: "http://localhost:3000",
// baseURL: "https://docs.camunda.io",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
Expand Down
32 changes: 32 additions & 0 deletions spec/regression/versionMapping.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { test, expect } from "@playwright/test";

test("main docs cross-link to optimize docs", async ({ page }) => {
await page.goto("/docs/components/");

await expect(page).toHaveTitle(
/Overview Components \| Camunda Platform 8 Docs/
);

// This is a link known to cross over to $optimize$.
await page
.getByRole("article")
.getByRole("link", { name: "Optimize" })
.click();

// The `$optimize$` should be transformed to `optimize` in the target URL.
await expect(page.url()).toContain("/optimize/components/what-is-optimize/");
});

test("optimize docs cross-link to main docs", async ({ page }) => {
await page.goto(
"/optimize/apis-tools/optimize-api/optimize-api-authorization/"
);

await expect(page).toHaveTitle(/Authorization \| Camunda Platform 8 Docs/);

// This is a link known to cross over to $docs$.
await page.getByRole("link", { name: "building your own client" }).click();

// The `$docs$` should be transformed to `docs` in the target URL.
await expect(page.url()).toContain("/docs/apis-tools/build-your-own-client/");
});

0 comments on commit 365ad85

Please sign in to comment.