diff --git a/.github/actions/setup-build-cache/action.yml b/.github/actions/setup-build-cache/action.yml new file mode 100644 index 00000000..06b96e2f --- /dev/null +++ b/.github/actions/setup-build-cache/action.yml @@ -0,0 +1,14 @@ +name: Setup Build Cache +description: Restores the build cache from GitHub Actions cache + +runs: + using: composite + steps: + - name: Restore build cache + uses: actions/cache@v4 + with: + path: .build-cache + key: build-cache-v2-${{ runner.os }}-${{ github.sha }} + restore-keys: | + build-cache-v2-${{ runner.os }}- + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0731170f..c61d05f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,12 @@ on: workflow_dispatch: jobs: - test: - name: Test Build + lint: + name: Lint & Checks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -23,13 +24,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Restore build cache - uses: actions/cache@v4 - with: - path: .build-cache - key: build-cache-v1-${{ runner.os }}-${{ hashFiles('openapi/**/*.yaml', 'changelog/entries/**/*.md', 'package.json', 'pnpm-lock.yaml', 'scripts/**/*.{mjs,ts}', 'docs/**/*.{md,mdx}', 'src/**/*.{ts,tsx,js,jsx}', 'docusaurus.config.ts', 'sidebars.ts') }} - restore-keys: | - build-cache-v1-${{ runner.os }}- + - name: Setup build cache + uses: ./.github/actions/setup-build-cache - name: Install dependencies run: pnpm install --frozen-lockfile @@ -45,5 +41,45 @@ jobs: echo "No usage of support@glean.com found" fi - - name: Test build website - run: pnpm build + build: + name: Build Site + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up mise + uses: jdx/mise-action@v2 + with: + cache: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup build cache + uses: ./.github/actions/setup-build-cache + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build website + run: pnpm build + env: + VERBOSE: "true" + + - name: Upload build artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: build + path: build/ + retention-days: 1 + + visual-regression: + name: Visual Regression Tests + needs: build + if: github.event_name == 'pull_request' + uses: ./.github/workflows/visual-regression.yml + with: + commit-sha: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/update-visual-snapshots.yml b/.github/workflows/update-visual-snapshots.yml new file mode 100644 index 00000000..d33a5ae5 --- /dev/null +++ b/.github/workflows/update-visual-snapshots.yml @@ -0,0 +1,47 @@ +name: Update Visual Snapshots + +on: + workflow_dispatch: + +permissions: + contents: write + +jobs: + update-snapshots: + name: Update Visual Regression Snapshots + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up mise + uses: jdx/mise-action@v2 + with: + cache: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Install Playwright browsers + run: pnpm exec playwright install --with-deps chromium + + - name: Build the website + run: pnpm build + + - name: Update snapshots + run: pnpm test:visual:update + + - name: Commit snapshots + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add tests/visual-regression/__snapshots__/ + git diff --staged --quiet || git commit -m "Update visual regression snapshots [skip ci]" + git push origin HEAD:${{ github.ref_name }} + diff --git a/.github/workflows/visual-regression.yml b/.github/workflows/visual-regression.yml new file mode 100644 index 00000000..4316d7a5 --- /dev/null +++ b/.github/workflows/visual-regression.yml @@ -0,0 +1,104 @@ +name: Visual Regression Testing + +on: + workflow_dispatch: + workflow_call: + inputs: + commit-sha: + description: "Commit SHA" + type: string + required: false + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + check-paths: + name: Check Visual File Changes + runs-on: ubuntu-latest + outputs: + should-run: ${{ steps.filter.outputs.visual == 'true' || github.event_name != 'workflow_call' }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check if visual files changed + if: github.event_name == 'workflow_call' + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + visual: + - 'src/**' + - 'docs/**' + - 'static/**' + - 'docusaurus.config.ts' + - 'sidebars.ts' + - 'tests/visual-regression/**' + - 'playwright.config.ts' + - '.github/workflows/visual-regression.yml' + + visual-regression: + name: Visual Regression Tests + runs-on: ubuntu-latest + timeout-minutes: 60 + needs: [check-paths] + if: needs.check-paths.outputs.should-run == 'true' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up mise + uses: jdx/mise-action@v2 + with: + cache: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Restore build cache from CI + uses: actions/cache/restore@v4 + with: + path: .build-cache + key: build-cache-v2-${{ runner.os }}-${{ inputs.commit-sha || github.event.pull_request.head.sha || github.sha }} + restore-keys: | + build-cache-v2-${{ runner.os }}- + + - name: Try to download build artifact from CI + id: download-artifact + if: inputs.commit-sha || github.event.pull_request.head.sha + continue-on-error: true + uses: dawidd6/action-download-artifact@v6 + with: + workflow: ci.yml + name: build + path: build/ + commit: ${{ inputs.commit-sha || github.event.pull_request.head.sha }} + search_artifacts: true + if_no_artifact_found: warn + + - name: Build the website + if: steps.download-artifact.outcome != 'success' + run: pnpm build + + - name: Install Playwright browsers + run: pnpm exec playwright install --with-deps chromium + + - name: Run visual regression tests + run: pnpm test:visual + + - name: Upload test results on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: playwright-test-results + path: | + playwright-report/ + test-results/ + retention-days: 7 diff --git a/.gitignore b/.gitignore index 1cb20722..9ccb969b 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,7 @@ __pycache__/ # Environment variables .env + +# Playwright +test-results/ +playwright-report/ diff --git a/package.json b/package.json index 49523523..c0c82db0 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "build:legacy": "pnpm run changelog:aggregate && pnpm run generate:rss && docusaurus build", "cache:clear": "node scripts/build/cache.mjs clear", "cache:stats": "node scripts/build/cache.mjs stats", + "cache:prune": "node scripts/build/cache.mjs prune", + "cache:size": "node scripts/build/cache.mjs size", "cache:validate": "node scripts/build/validate.mjs", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", @@ -31,6 +33,8 @@ "test": "vitest run", "test:ui": "vitest --ui", "test:coverage": "vitest run --coverage", + "test:visual": "playwright test", + "test:visual:update": "playwright test --update-snapshots", "format:check": "prettier --check .", "openapi:regenerate:all": "pnpm run openapi:clean:before:all && pnpm run openapi:transform:all && pnpm run openapi:generate:all && pnpm run openapi:clean:after:all", "openapi:regenerate:client": "pnpm run openapi:clean:before:client && pnpm run openapi:transform:client && pnpm run openapi:generate:client && pnpm run openapi:clean:after:client", @@ -103,24 +107,27 @@ "zod": "^4.1.11" }, "devDependencies": { - "@types/node": "^22.9.0", - "@types/nock": "^10.0.2", "@docusaurus/faster": "^3.9.2", "@docusaurus/module-type-aliases": "^3.9.2", "@docusaurus/theme-mermaid": "^3.9.2", "@docusaurus/tsconfig": "^3.9.2", "@docusaurus/types": "^3.9.2", + "@playwright/test": "^1.56.1", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.8.0", "@testing-library/react": "^16.3.0", "@testing-library/user-event": "^14.6.1", + "@types/nock": "^10.0.2", + "@types/node": "^22.9.0", "@types/xml2js": "^0.4.14", "@vitejs/plugin-react": "^5.0.4", "@vitest/ui": "^3.2.4", "chalk": "^5.6.2", + "cheerio": "^1.1.2", "fast-levenshtein": "^3.0.0", "inquirer": "^12.9.6", "jsdom": "^26.1.0", + "nock": "^14.0.0", "npm-run-all": "^4.1.5", "open": "^10.1.2", "prettier": "^3.6.1", @@ -130,8 +137,7 @@ "tsx": "^4.20.6", "typescript": "~5.9.2", "vitest": "^3.2.4", - "xml2js": "^0.6.2", - "nock": "^14.0.0" + "xml2js": "^0.6.2" }, "browserslist": { "production": [ diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 00000000..ef95ea3c --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,46 @@ +import { defineConfig, devices } from '@playwright/test'; + +export default defineConfig({ + testDir: './tests/visual-regression', + + fullyParallel: true, + + forbidOnly: !!process.env.CI, + + retries: process.env.CI ? 2 : 0, + + workers: process.env.CI ? 4 : undefined, + + reporter: process.env.CI + ? [ + ['github'], + ['html'], + ['list', { printSteps: false }], + ] + : 'html', + + use: { + baseURL: 'http://localhost:3000', + trace: 'on-first-retry', + }, + + webServer: { + command: 'pnpm serve', + url: 'http://localhost:3000', + reuseExistingServer: !process.env.CI, + timeout: 120000, + }, + + projects: [ + { + name: 'chromium', + use: { + ...devices['Desktop Chrome'], + viewport: { width: 1280, height: 720 }, + }, + }, + ], + + snapshotPathTemplate: '{testDir}/__snapshots__/{testFilePath}/{arg}{ext}', +}); + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7b6cfbb..a0d4cc9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,6 +120,9 @@ importers: '@docusaurus/types': specifier: ^3.9.2 version: 3.9.2(@swc/core@1.13.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@playwright/test': + specifier: ^1.56.1 + version: 1.56.1 '@testing-library/dom': specifier: ^10.4.1 version: 10.4.1 @@ -150,6 +153,9 @@ importers: chalk: specifier: ^5.6.2 version: 5.6.2 + cheerio: + specifier: ^1.1.2 + version: 1.1.2 fast-levenshtein: specifier: ^3.0.0 version: 3.0.0 @@ -2121,6 +2127,11 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@playwright/test@1.56.1': + resolution: {integrity: sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==} + engines: {node: '>=18'} + hasBin: true + '@pnpm/config.env-replace@1.1.0': resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} @@ -3459,6 +3470,10 @@ packages: resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} engines: {node: '>= 6'} + cheerio@1.1.2: + resolution: {integrity: sha512-IkxPpb5rS/d1IiLbHMgfPuS0FgiWTtFIm/Nj+2woXDLTZ7fOT2eqzgYbdMlLweqlHbsZjxEChoVK+7iph7jyQg==} + engines: {node: '>=20.18.1'} + chevrotain-allstar@0.3.1: resolution: {integrity: sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==} peerDependencies: @@ -4254,6 +4269,9 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} + encoding-sniffer@0.2.1: + resolution: {integrity: sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==} + enhanced-resolve@5.18.3: resolution: {integrity: sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==} engines: {node: '>=10.13.0'} @@ -4579,6 +4597,11 @@ packages: fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -4876,6 +4899,9 @@ packages: webpack: optional: true + htmlparser2@10.0.0: + resolution: {integrity: sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==} + htmlparser2@6.1.0: resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==} @@ -6312,6 +6338,9 @@ packages: parse5-htmlparser2-tree-adapter@7.1.0: resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} + parse5-parser-stream@7.1.2: + resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} + parse5@6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} @@ -6422,6 +6451,16 @@ packages: pkg-types@2.3.0: resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==} + playwright-core@1.56.1: + resolution: {integrity: sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==} + engines: {node: '>=18'} + hasBin: true + + playwright@1.56.1: + resolution: {integrity: sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==} + engines: {node: '>=18'} + hasBin: true + pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -7942,6 +7981,10 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + undici@7.16.0: + resolution: {integrity: sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==} + engines: {node: '>=20.18.1'} + unicode-canonical-property-names-ecmascript@2.0.1: resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==} engines: {node: '>=4'} @@ -11258,6 +11301,10 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@playwright/test@1.56.1': + dependencies: + playwright: 1.56.1 + '@pnpm/config.env-replace@1.1.0': {} '@pnpm/network.ca-file@1.0.2': @@ -12668,6 +12715,20 @@ snapshots: parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 + cheerio@1.1.2: + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.2.2 + encoding-sniffer: 0.2.1 + htmlparser2: 10.0.0 + parse5: 7.3.0 + parse5-htmlparser2-tree-adapter: 7.1.0 + parse5-parser-stream: 7.1.2 + undici: 7.16.0 + whatwg-mimetype: 4.0.0 + chevrotain-allstar@0.3.1(chevrotain@11.0.3): dependencies: chevrotain: 11.0.3 @@ -13532,6 +13593,11 @@ snapshots: encodeurl@2.0.0: {} + encoding-sniffer@0.2.1: + dependencies: + iconv-lite: 0.6.3 + whatwg-encoding: 3.1.1 + enhanced-resolve@5.18.3: dependencies: graceful-fs: 4.2.11 @@ -13948,6 +14014,9 @@ snapshots: fs.realpath@1.0.0: {} + fsevents@2.3.2: + optional: true + fsevents@2.3.3: optional: true @@ -14446,6 +14515,13 @@ snapshots: '@rspack/core': 1.5.2 webpack: 5.101.3(@swc/core@1.13.5) + htmlparser2@10.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.2 + entities: 6.0.1 + htmlparser2@6.1.0: dependencies: domelementtype: 2.3.0 @@ -16334,6 +16410,10 @@ snapshots: domhandler: 5.0.3 parse5: 7.3.0 + parse5-parser-stream@7.1.2: + dependencies: + parse5: 7.3.0 + parse5@6.0.1: {} parse5@7.3.0: @@ -16424,6 +16504,14 @@ snapshots: exsolve: 1.0.7 pathe: 2.0.3 + playwright-core@1.56.1: {} + + playwright@1.56.1: + dependencies: + playwright-core: 1.56.1 + optionalDependencies: + fsevents: 2.3.2 + pluralize@8.0.0: {} points-on-curve@0.2.0: {} @@ -18197,6 +18285,8 @@ snapshots: undici-types@6.21.0: {} + undici@7.16.0: {} + unicode-canonical-property-names-ecmascript@2.0.1: {} unicode-emoji-modifier-base@1.0.0: {} diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs index 1f973efa..88b27470 100644 --- a/scripts/build/build.mjs +++ b/scripts/build/build.mjs @@ -57,8 +57,10 @@ async function buildWithCache() { const buildTarget = 'docusaurus:build'; const buildDir = path.join(ROOT_DIR, 'build'); - if (!cache.shouldRebuild(buildTarget, buildInputs)) { - console.log('Restoring from cache...'); + const cacheCheck = cache.shouldRebuild(buildTarget, buildInputs); + + if (!cacheCheck.shouldRebuild) { + console.log('✓ Cache valid, restoring from cache...'); if (cache.restoreBuildOutput(buildTarget, buildDir)) { const endTime = Date.now(); @@ -72,10 +74,11 @@ async function buildWithCache() { process.exit(0); } else { - console.log('Cache restore failed, rebuilding...'); + console.log('✗ Cache restore failed, rebuilding...'); } } else { - console.log('Cache invalid, rebuilding...'); + console.log(`⚠ Cache invalid: ${cacheCheck.reason}`); + console.log('Building from scratch...'); } console.log('Building site...'); @@ -92,10 +95,15 @@ async function buildWithCache() { console.log('Caching build output...'); cache.storeBuildOutput(buildTarget, buildDir, buildInputs); + console.log('Pruning stale cache entries...'); + cache.pruneStaleEntries(7); + const endTime = Date.now(); const duration = ((endTime - startTime) / 1000).toFixed(2); + const cacheSize = cache.getCacheSize(); + const cacheSizeMB = (cacheSize / 1024 / 1024).toFixed(2); - console.log(`✓ Build completed in ${duration}s`); + console.log(`✓ Build completed in ${duration}s (cache size: ${cacheSizeMB} MB)`); if (verbose) { cache.printStats(); diff --git a/scripts/build/cache.mjs b/scripts/build/cache.mjs index 6fccd077..f29e57d1 100644 --- a/scripts/build/cache.mjs +++ b/scripts/build/cache.mjs @@ -76,19 +76,21 @@ export class BuildCache { shouldRebuild(targetName, currentInputs) { if (this.disabled) { - return true; + return { shouldRebuild: true, reason: 'Cache disabled' }; } const target = this.lockfile.targets[targetName]; if (!target) { + const reason = 'No cache entry found (first build or cache cleared)'; this.log(`Cache miss: ${targetName} (not in lockfile)`); - return true; + return { shouldRebuild: true, reason }; } if (!target.inputs) { + const reason = 'Cache entry corrupted (no inputs recorded)'; this.log(`Cache miss: ${targetName} (no inputs recorded)`); - return true; + return { shouldRebuild: true, reason }; } const inputKeys = Object.keys(currentInputs).sort(); @@ -96,16 +98,18 @@ export class BuildCache { if (inputKeys.length !== cachedInputKeys.length || !inputKeys.every((key, index) => key === cachedInputKeys[index])) { + const reason = 'Input keys changed (build configuration modified)'; this.log(`Cache miss: ${targetName} (input keys changed)`); - return true; + return { shouldRebuild: true, reason }; } for (const key of inputKeys) { if (currentInputs[key] !== target.inputs[key]) { + const reason = `${key} changed`; this.log(`Cache miss: ${targetName} (${key} changed)`); this.log(` Expected: ${target.inputs[key]?.substring(0, 12)}...`); this.log(` Got: ${currentInputs[key]?.substring(0, 12)}...`); - return true; + return { shouldRebuild: true, reason }; } } @@ -113,14 +117,15 @@ export class BuildCache { for (const outputPath of target.outputs) { const fullPath = path.join(ROOT_DIR, outputPath); if (!fs.existsSync(fullPath)) { + const reason = `Output missing: ${outputPath}`; this.log(`Cache miss: ${targetName} (output ${outputPath} missing)`); - return true; + return { shouldRebuild: true, reason }; } } } this.log(`Cache hit: ${targetName}`); - return false; + return { shouldRebuild: false, reason: null }; } markBuilt(targetName, inputs, outputs = []) { @@ -273,6 +278,72 @@ export class BuildCache { } } + getCacheSize() { + if (!fs.existsSync(CACHE_DIR)) { + return 0; + } + + let totalSize = 0; + + function calculateDirSize(dirPath) { + const entries = fs.readdirSync(dirPath, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dirPath, entry.name); + + if (entry.isDirectory()) { + calculateDirSize(fullPath); + } else if (entry.isFile()) { + totalSize += fs.statSync(fullPath).size; + } + } + } + + calculateDirSize(CACHE_DIR); + return totalSize; + } + + pruneStaleEntries(maxAgeDays = 7) { + if (this.disabled || !this.lockfile) { + return { removed: 0, freedBytes: 0 }; + } + + const now = new Date(); + const maxAgeMs = maxAgeDays * 24 * 60 * 60 * 1000; + const removed = []; + let freedBytes = 0; + + for (const [targetName, target] of Object.entries(this.lockfile.targets)) { + if (!target.lastBuilt) { + continue; + } + + const lastBuilt = new Date(target.lastBuilt); + const age = now - lastBuilt; + + if (age > maxAgeMs) { + const cacheTargetDir = path.join(CACHE_DIR, 'builds', targetName); + + if (fs.existsSync(cacheTargetDir)) { + const sizeBefore = this.getCacheSize(); + fs.rmSync(cacheTargetDir, { recursive: true, force: true }); + const sizeAfter = this.getCacheSize(); + freedBytes += sizeBefore - sizeAfter; + } + + delete this.lockfile.targets[targetName]; + removed.push(targetName); + } + } + + if (removed.length > 0) { + this.saveLockfile(); + this.log(`Pruned ${removed.length} stale cache entries (freed ${(freedBytes / 1024 / 1024).toFixed(2)} MB)`); + } + + return { removed: removed.length, freedBytes }; + } + clear(targetName = null) { if (targetName) { this.invalidate(targetName); @@ -311,17 +382,28 @@ if (import.meta.url === `file://${process.argv[1]}`) { switch (command) { case 'stats': cache.printStats(); + const size = cache.getCacheSize(); + console.log(`\nCache size: ${(size / 1024 / 1024).toFixed(2)} MB`); break; case 'clear': cache.clear(arg); break; + case 'prune': + const maxAge = arg ? parseInt(arg, 10) : 7; + const result = cache.pruneStaleEntries(maxAge); + console.log(`Pruned ${result.removed} entries, freed ${(result.freedBytes / 1024 / 1024).toFixed(2)} MB`); + break; + case 'size': + const cacheSize = cache.getCacheSize(); + console.log(`Cache size: ${(cacheSize / 1024 / 1024).toFixed(2)} MB (${cacheSize} bytes)`); + break; case 'validate': const stats = cache.getStats(); console.log(`\nValidation: ${stats.validTargets} of ${stats.totalTargets} targets valid`); process.exit(stats.totalTargets === stats.validTargets ? 0 : 1); break; default: - console.log('Usage: cache.mjs [stats|clear [target]|validate]'); + console.log('Usage: cache.mjs [stats|clear [target]|prune [days]|size|validate]'); break; } } diff --git a/scripts/build/changelog.mjs b/scripts/build/changelog.mjs index 526b0a01..eea16d32 100644 --- a/scripts/build/changelog.mjs +++ b/scripts/build/changelog.mjs @@ -26,7 +26,9 @@ export async function buildChangelogIfNeeded(cache) { 'static/changelog.xml' ]; - if (cache.shouldRebuild(targetName, inputs)) { + const cacheCheck = cache.shouldRebuild(targetName, inputs); + + if (cacheCheck.shouldRebuild) { cache.log('Building changelog and RSS feed...', 'info'); try { diff --git a/scripts/build/openapi.mjs b/scripts/build/openapi.mjs index a849a701..a25efd19 100644 --- a/scripts/build/openapi.mjs +++ b/scripts/build/openapi.mjs @@ -42,7 +42,8 @@ async function buildClientTransformIfNeeded(cache) { const capitalizeOutputs = ['openapi/client/client-capitalized.yaml']; - let needsCapitalize = cache.shouldRebuild(capitalizeTarget, capitalizeInputs); + const capitalizeCheck = cache.shouldRebuild(capitalizeTarget, capitalizeInputs); + let needsCapitalize = capitalizeCheck.shouldRebuild; if (needsCapitalize) { cache.log('Capitalizing client OpenAPI spec...', 'info'); @@ -68,7 +69,8 @@ async function buildClientTransformIfNeeded(cache) { splitScript: hashFile(path.join(ROOT_DIR, 'scripts', 'openapi-split-break-circular.mjs')) }; - let needsSplit = cache.shouldRebuild(splitTarget, splitInputs) || needsCapitalize; + const splitCheck = cache.shouldRebuild(splitTarget, splitInputs); + let needsSplit = splitCheck.shouldRebuild || needsCapitalize; if (needsSplit) { cache.log('Splitting client OpenAPI spec...', 'info'); @@ -109,7 +111,9 @@ async function buildIndexingTransformIfNeeded(cache) { const outputs = ['openapi/indexing/indexing-capitalized.yaml']; - if (cache.shouldRebuild(target, inputs)) { + const cacheCheck = cache.shouldRebuild(target, inputs); + + if (cacheCheck.shouldRebuild) { cache.log('Capitalizing indexing OpenAPI spec...', 'info'); try { @@ -152,7 +156,9 @@ export async function buildAPIIfNeeded(apiName, cache) { const overviewPattern = isIndexing ? '*-overview.mdx' : 'overview.mdx'; - if (cache.shouldRebuild(target, inputs)) { + const cacheCheck = cache.shouldRebuild(target, inputs); + + if (cacheCheck.shouldRebuild) { cache.log(`Generating ${apiName} API documentation...`, 'info'); preserveOverviewFiles(outputDir, overviewPattern); diff --git a/tests/visual-regression/README.md b/tests/visual-regression/README.md new file mode 100644 index 00000000..ca38b761 --- /dev/null +++ b/tests/visual-regression/README.md @@ -0,0 +1,118 @@ +# Visual Regression Testing + +This directory contains visual regression tests using Playwright to detect unintended UI changes. + +## Overview + +The tests take screenshots of all pages in the sitemap and compare them against baseline snapshots. Any visual differences will fail the tests, helping catch UI regressions before they reach production. + +## Running Tests Locally + +### Prerequisites + +1. Build the site first: + +```bash +pnpm build +``` + +1. Run visual regression tests: + +```bash +pnpm test:visual +``` + +The first run will generate baseline snapshots. Subsequent runs will compare against these baselines. + +## Updating Snapshots + +When you make intentional UI changes, you'll need to update the baseline snapshots: + +```bash +pnpm test:visual:update +``` + +This will regenerate all snapshots with your new UI changes. Review the changes carefully before committing. + +## CI Workflow + +### Automatic Runs + +Visual regression tests run automatically on all pull requests as part of the CI workflow. The tests are triggered by the CI workflow after the build completes. + +### Build Optimization + +The workflow intelligently reuses build artifacts from the CI workflow when available, avoiding duplicate builds: + +- If CI has already built the site, visual regression downloads and uses that artifact +- If no artifact exists (manual trigger, etc.), it performs its own build + +### When Tests Fail + +If visual regression tests fail in CI: + +1. **Download the test report:** + - Go to the failed workflow run + - Scroll to the bottom and download the `playwright-test-results` artifact + - Extract and open `playwright-report/index.html` in a browser + +2. **Review the differences:** + - The report shows side-by-side comparisons of expected vs actual screenshots + - Determine if the differences are intentional or bugs + +3. **If changes are intentional:** + - Option A: Run `pnpm test:visual:update` locally and commit the new snapshots + - Option B: Use the GitHub Actions workflow (see below) + +### Updating Snapshots via GitHub Actions + +To update snapshots using Linux rendering (matching CI environment): + +1. Go to Actions → "Update Visual Snapshots" +2. Click "Run workflow" +3. Wait for it to complete +4. The workflow will automatically commit the updated snapshots + +This ensures snapshots match the CI environment exactly. + +## Platform Differences + +Snapshots must be generated on the same OS as CI (Linux/Ubuntu). If you generate snapshots on macOS or Windows locally, they will fail in CI due to rendering differences. + +**Recommended approach:** + +- Use the "Update Visual Snapshots" GitHub Action to generate Linux-based snapshots +- Or use Docker locally: `docker run -v (pwd):/work -w /work mcr.microsoft.com/playwright:v1.56.1-jammy /bin/bash -c "npm install -g pnpm@10.13.1 && pnpm install --frozen-lockfile && pnpm test:visual:update"` + +## Configuration + +### Playwright Config + +- Location: `playwright.config.ts` +- Browser: Chromium (Desktop Chrome) +- Viewport: 1280x720 +- Workers: 4 parallel workers in CI +- Retries: 2 retries in CI for flaky tests + +### Flaky Elements + +- Location: `tests/visual-regression/screenshot.css` +- This stylesheet hides elements that cause false positives (avatars, gifs, timestamps, etc.) +- Add new rules here if you encounter flaky tests + +## Troubleshooting + +### Tests are flaky + +Add CSS rules to `screenshot.css` to hide problematic elements: + +- Use `visibility: hidden` for inline elements +- Use `display: none` for layout-affecting elements + +### Build is slow + +The site build can be slow. The workflow caches dependencies and reuses artifacts when possible to minimize build time. + +### Manual triggers don't work + +Make sure you have the necessary permissions. The "Update Visual Snapshots" workflow requires write access to the repository. diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-activity.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-activity.png new file mode 100644 index 00000000..716be488 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-activity.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-feedback.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-feedback.png new file mode 100644 index 00000000..b87016c3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-feedback.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-overview.png new file mode 100644 index 00000000..4bb3b9b7 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-activity-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-create-and-stream-run.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-create-and-stream-run.png new file mode 100644 index 00000000..0e9e2265 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-create-and-stream-run.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-create-and-wait-run.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-create-and-wait-run.png new file mode 100644 index 00000000..68c5a622 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-create-and-wait-run.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-get-agent-schemas.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-get-agent-schemas.png new file mode 100644 index 00000000..5f700cd8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-get-agent-schemas.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-get-agent.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-get-agent.png new file mode 100644 index 00000000..a436c57d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-get-agent.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-overview.png new file mode 100644 index 00000000..766c1ad3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-search-agents.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-search-agents.png new file mode 100644 index 00000000..51f74683 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-agents-search-agents.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-createannouncement.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-createannouncement.png new file mode 100644 index 00000000..c571a0e8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-createannouncement.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-deleteannouncement.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-deleteannouncement.png new file mode 100644 index 00000000..831ec298 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-deleteannouncement.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-overview.png new file mode 100644 index 00000000..2f9b88fb Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-updateannouncement.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-updateannouncement.png new file mode 100644 index 00000000..9130df70 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-announcements-updateannouncement.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-createanswer.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-createanswer.png new file mode 100644 index 00000000..6904775e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-createanswer.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-deleteanswer.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-deleteanswer.png new file mode 100644 index 00000000..fb886ce5 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-deleteanswer.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-editanswer.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-editanswer.png new file mode 100644 index 00000000..8cfbe744 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-editanswer.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-getanswer.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-getanswer.png new file mode 100644 index 00000000..dac95366 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-getanswer.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-listanswers.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-listanswers.png new file mode 100644 index 00000000..7c0c21f8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-listanswers.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-overview.png new file mode 100644 index 00000000..e7b29327 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-answers-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-authentication-createauthtoken.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-authentication-createauthtoken.png new file mode 100644 index 00000000..7d2a1080 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-authentication-createauthtoken.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-authentication-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-authentication-overview.png new file mode 100644 index 00000000..ecb9dafd Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-authentication-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-chat-stream.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-chat-stream.png new file mode 100644 index 00000000..58501e57 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-chat-stream.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-chat.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-chat.png new file mode 100644 index 00000000..0797f2f9 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-chat.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deleteallchats.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deleteallchats.png new file mode 100644 index 00000000..cc6c3977 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deleteallchats.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deletechatfiles.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deletechatfiles.png new file mode 100644 index 00000000..cb1283bb Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deletechatfiles.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deletechats.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deletechats.png new file mode 100644 index 00000000..321309e0 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-deletechats.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchat.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchat.png new file mode 100644 index 00000000..7ba7b4e3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchat.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchatapplication.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchatapplication.png new file mode 100644 index 00000000..7b468864 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchatapplication.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchatfiles.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchatfiles.png new file mode 100644 index 00000000..7f954d6f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-getchatfiles.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-listchats.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-listchats.png new file mode 100644 index 00000000..b8884824 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-listchats.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-overview.png new file mode 100644 index 00000000..db68c92a Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-uploadchatfiles.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-uploadchatfiles.png new file mode 100644 index 00000000..a8f6c144 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-chat-uploadchatfiles.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-addcollectionitems.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-addcollectionitems.png new file mode 100644 index 00000000..1d4cd2cb Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-addcollectionitems.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-createcollection.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-createcollection.png new file mode 100644 index 00000000..b76112f5 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-createcollection.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-deletecollection.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-deletecollection.png new file mode 100644 index 00000000..896cbaf0 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-deletecollection.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-deletecollectionitem.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-deletecollectionitem.png new file mode 100644 index 00000000..587ccd4a Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-deletecollectionitem.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-editcollection.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-editcollection.png new file mode 100644 index 00000000..f29e2f2b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-editcollection.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-editcollectionitem.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-editcollectionitem.png new file mode 100644 index 00000000..3c1c1203 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-editcollectionitem.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-getcollection.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-getcollection.png new file mode 100644 index 00000000..892c88d6 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-getcollection.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-listcollections.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-listcollections.png new file mode 100644 index 00000000..ec61642d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-listcollections.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-overview.png new file mode 100644 index 00000000..abfd60f0 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-collections-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocpermissions.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocpermissions.png new file mode 100644 index 00000000..cd224d2e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocpermissions.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocuments.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocuments.png new file mode 100644 index 00000000..b5f1b1a7 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocuments.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocumentsbyfacets.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocumentsbyfacets.png new file mode 100644 index 00000000..608941f2 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-getdocumentsbyfacets.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-overview.png new file mode 100644 index 00000000..83ad16b3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-documents-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-listentities.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-listentities.png new file mode 100644 index 00000000..42b1895f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-listentities.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-overview.png new file mode 100644 index 00000000..acf75cee Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-people.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-people.png new file mode 100644 index 00000000..a29ae3a9 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-entities-people.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-createpolicy.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-createpolicy.png new file mode 100644 index 00000000..41d2f034 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-createpolicy.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-createreport.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-createreport.png new file mode 100644 index 00000000..9e41b6ff Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-createreport.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-downloadpolicycsv.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-downloadpolicycsv.png new file mode 100644 index 00000000..70b01921 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-downloadpolicycsv.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-downloadreportcsv.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-downloadreportcsv.png new file mode 100644 index 00000000..cd7a2fea Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-downloadreportcsv.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getdocvisibility.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getdocvisibility.png new file mode 100644 index 00000000..72818c0d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getdocvisibility.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getpolicy.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getpolicy.png new file mode 100644 index 00000000..02d49783 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getpolicy.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getreportstatus.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getreportstatus.png new file mode 100644 index 00000000..ab72e07d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-getreportstatus.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-listpolicies.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-listpolicies.png new file mode 100644 index 00000000..9ae4e8c4 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-listpolicies.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-overview.png new file mode 100644 index 00000000..e03af8bb Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-setdocvisibility.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-setdocvisibility.png new file mode 100644 index 00000000..be401bb8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-setdocvisibility.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-updatepolicy.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-updatepolicy.png new file mode 100644 index 00000000..26832a98 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-governance-updatepolicy.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-insights-insights.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-insights-insights.png new file mode 100644 index 00000000..b05e8340 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-insights-insights.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-insights-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-insights-overview.png new file mode 100644 index 00000000..9c892017 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-insights-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-messages-messages.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-messages-messages.png new file mode 100644 index 00000000..42d97ea5 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-messages-messages.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-messages-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-messages-overview.png new file mode 100644 index 00000000..d47df189 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-messages-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-editpin.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-editpin.png new file mode 100644 index 00000000..b99dea16 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-editpin.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-getpin.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-getpin.png new file mode 100644 index 00000000..5e38c4ab Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-getpin.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-listpins.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-listpins.png new file mode 100644 index 00000000..01c04a24 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-listpins.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-overview.png new file mode 100644 index 00000000..0d38390c Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-pin.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-pin.png new file mode 100644 index 00000000..7808e6a2 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-pin.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-unpin.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-unpin.png new file mode 100644 index 00000000..03428941 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-pins-unpin.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-adminsearch.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-adminsearch.png new file mode 100644 index 00000000..1adba0b2 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-adminsearch.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-autocomplete.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-autocomplete.png new file mode 100644 index 00000000..faf393bc Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-autocomplete.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-feed.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-feed.png new file mode 100644 index 00000000..ab82ab39 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-feed.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-overview.png new file mode 100644 index 00000000..85614065 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-recommendations.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-recommendations.png new file mode 100644 index 00000000..b0ab4f4d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-recommendations.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-search.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-search.png new file mode 100644 index 00000000..3a24c115 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-search-search.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-createshortcut.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-createshortcut.png new file mode 100644 index 00000000..4f7312b6 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-createshortcut.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-deleteshortcut.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-deleteshortcut.png new file mode 100644 index 00000000..99650afc Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-deleteshortcut.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-getshortcut.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-getshortcut.png new file mode 100644 index 00000000..68e9d884 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-getshortcut.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-listshortcuts.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-listshortcuts.png new file mode 100644 index 00000000..59bd7a1e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-listshortcuts.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-overview.png new file mode 100644 index 00000000..50f31537 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-updateshortcut.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-updateshortcut.png new file mode 100644 index 00000000..ef8e14e3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-shortcuts-updateshortcut.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-summarize-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-summarize-overview.png new file mode 100644 index 00000000..0205d7a7 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-summarize-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-summarize-summarize.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-summarize-summarize.png new file mode 100644 index 00000000..eb8dd905 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-summarize-summarize.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-execute-the-specified-tool.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-execute-the-specified-tool.png new file mode 100644 index 00000000..90069c00 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-execute-the-specified-tool.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-list-available-tools.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-list-available-tools.png new file mode 100644 index 00000000..70e116ea Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-list-available-tools.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-overview.png new file mode 100644 index 00000000..19fe3e92 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-tools-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-addverificationreminder.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-addverificationreminder.png new file mode 100644 index 00000000..affaff5e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-addverificationreminder.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-listverifications.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-listverifications.png new file mode 100644 index 00000000..ae5574a5 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-listverifications.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-overview.png new file mode 100644 index 00000000..3e6e9253 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-verify.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-verify.png new file mode 100644 index 00000000..38cbac4c Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-client-api-verification-verify.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-add-or-update-datasource.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-add-or-update-datasource.png new file mode 100644 index 00000000..e50b490a Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-add-or-update-datasource.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-authentication-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-authentication-overview.png new file mode 100644 index 00000000..b9e37105 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-authentication-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-datasource-status.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-datasource-status.png new file mode 100644 index 00000000..c6fe92ce Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-datasource-status.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-document-information.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-document-information.png new file mode 100644 index 00000000..55c149bb Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-document-information.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-information-of-a-batch-of-documents.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-information-of-a-batch-of-documents.png new file mode 100644 index 00000000..c08e76f6 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-information-of-a-batch-of-documents.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-user-information.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-user-information.png new file mode 100644 index 00000000..39e6603d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-get-user-information.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-users.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-users.png new file mode 100644 index 00000000..365081fb Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-beta-users.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-documents.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-documents.png new file mode 100644 index 00000000..cddbe014 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-documents.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-employees.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-employees.png new file mode 100644 index 00000000..89ad9340 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-employees.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-external-shortcuts.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-external-shortcuts.png new file mode 100644 index 00000000..edd28e99 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-external-shortcuts.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-groups.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-groups.png new file mode 100644 index 00000000..436e28f8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-groups.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-memberships-for-a-group.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-memberships-for-a-group.png new file mode 100644 index 00000000..6ce1e178 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-memberships-for-a-group.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-teams.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-teams.png new file mode 100644 index 00000000..d24f1e16 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-teams.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-users.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-users.png new file mode 100644 index 00000000..f208b70f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-bulk-index-users.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-check-document-access.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-check-document-access.png new file mode 100644 index 00000000..24d5dd56 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-check-document-access.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-datasources-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-datasources-overview.png new file mode 100644 index 00000000..4641379c Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-datasources-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-document.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-document.png new file mode 100644 index 00000000..1ced1237 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-document.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-employee.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-employee.png new file mode 100644 index 00000000..ac7c0423 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-employee.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-group.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-group.png new file mode 100644 index 00000000..cd948318 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-group.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-membership.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-membership.png new file mode 100644 index 00000000..c4883e80 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-membership.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-team.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-team.png new file mode 100644 index 00000000..2dfe1a53 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-team.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-user.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-user.png new file mode 100644 index 00000000..1084cc18 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-delete-user.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-documents-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-documents-overview.png new file mode 100644 index 00000000..c06d8c04 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-documents-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-datasource-config.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-datasource-config.png new file mode 100644 index 00000000..9730db9f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-datasource-config.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-document-count.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-document-count.png new file mode 100644 index 00000000..a6307f9d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-document-count.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-document-upload-and-indexing-status.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-document-upload-and-indexing-status.png new file mode 100644 index 00000000..e9e58276 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-document-upload-and-indexing-status.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-user-count.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-user-count.png new file mode 100644 index 00000000..e046e0c2 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-get-user-count.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-document.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-document.png new file mode 100644 index 00000000..3ab1042c Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-document.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-documents.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-documents.png new file mode 100644 index 00000000..07124b82 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-documents.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-employee.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-employee.png new file mode 100644 index 00000000..6a49056b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-employee.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-group.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-group.png new file mode 100644 index 00000000..db3f3fe0 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-group.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-membership.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-membership.png new file mode 100644 index 00000000..90d2662e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-membership.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-team.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-team.png new file mode 100644 index 00000000..e6de1021 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-team.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-user.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-user.png new file mode 100644 index 00000000..136c53ed Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-index-user.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-people-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-people-overview.png new file mode 100644 index 00000000..5ccb2127 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-people-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-permissions-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-permissions-overview.png new file mode 100644 index 00000000..8c7e7d4e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-permissions-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-rotate-token.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-rotate-token.png new file mode 100644 index 00000000..0ef8ccd2 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-rotate-token.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-group-memberships.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-group-memberships.png new file mode 100644 index 00000000..d84660da Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-group-memberships.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-uploaded-documents.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-uploaded-documents.png new file mode 100644 index 00000000..a7c1eaa7 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-uploaded-documents.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-uploaded-employees-and-teams.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-uploaded-employees-and-teams.png new file mode 100644 index 00000000..27baf001 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-schedules-the-processing-of-uploaded-employees-and-teams.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-shortcuts-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-shortcuts-overview.png new file mode 100644 index 00000000..c2cad302 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-shortcuts-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-troubleshooting-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-troubleshooting-overview.png new file mode 100644 index 00000000..d9c95216 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-troubleshooting-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-update-document-permissions.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-update-document-permissions.png new file mode 100644 index 00000000..caa37a57 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-update-document-permissions.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-upload-shortcuts.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-upload-shortcuts.png new file mode 100644 index 00000000..26dc5363 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-indexing-api-upload-shortcuts.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-glean-issued.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-glean-issued.png new file mode 100644 index 00000000..2e8d7b1f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-glean-issued.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-oauth.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-oauth.png new file mode 100644 index 00000000..69299b98 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-oauth.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-overview.png new file mode 100644 index 00000000..7bf89832 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-authentication-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-getting-started-basic-usage.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-getting-started-basic-usage.png new file mode 100644 index 00000000..16e06458 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-getting-started-basic-usage.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-getting-started-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-getting-started-overview.png new file mode 100644 index 00000000..af9739c0 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-client-getting-started-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-authentication-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-authentication-overview.png new file mode 100644 index 00000000..d282351a Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-authentication-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-authentication-token-rotation.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-authentication-token-rotation.png new file mode 100644 index 00000000..ea7a9ac7 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-authentication-token-rotation.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-category.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-category.png new file mode 100644 index 00000000..3c76d2a5 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-category.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-custom-properties.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-custom-properties.png new file mode 100644 index 00000000..81398b43 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-custom-properties.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-rendering-search-results.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-rendering-search-results.png new file mode 100644 index 00000000..3a97b0de Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-rendering-search-results.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-test-datasource.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-test-datasource.png new file mode 100644 index 00000000..c2fe3f18 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-datasource-test-datasource.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-config.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-config.png new file mode 100644 index 00000000..c40d4fe8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-config.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-document.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-document.png new file mode 100644 index 00000000..cf09bdc3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-document.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-status.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-status.png new file mode 100644 index 00000000..9c0dd415 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-status.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-user.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-user.png new file mode 100644 index 00000000..bc3eb758 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-datasource-user.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-document-access.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-document-access.png new file mode 100644 index 00000000..e9b34c84 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-document-access.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-document-count.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-document-count.png new file mode 100644 index 00000000..cfe85346 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-debugging-document-count.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-activity.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-activity.png new file mode 100644 index 00000000..c48ae77c Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-activity.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-bulk-indexing.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-bulk-indexing.png new file mode 100644 index 00000000..a52df054 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-bulk-indexing.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-bulk-upload-model.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-bulk-upload-model.png new file mode 100644 index 00000000..1d44bee1 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-bulk-upload-model.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-document-model.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-document-model.png new file mode 100644 index 00000000..f1ed4765 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-document-model.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-permissions.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-permissions.png new file mode 100644 index 00000000..1824e707 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-permissions.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-supported-mimetypes.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-supported-mimetypes.png new file mode 100644 index 00000000..4060050c Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-documents-supported-mimetypes.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-index-documents.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-index-documents.png new file mode 100644 index 00000000..a586c056 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-index-documents.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-overview.png new file mode 100644 index 00000000..65de2a87 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-setup-datasource.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-setup-datasource.png new file mode 100644 index 00000000..cdf82257 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/api-info-indexing-getting-started-setup-datasource.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/changelog.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/changelog.png new file mode 100644 index 00000000..df982d5f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/changelog.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-authentication.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-authentication.png new file mode 100644 index 00000000..1d58120f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-authentication.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-key-terms.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-key-terms.png new file mode 100644 index 00000000..88a28c95 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-key-terms.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-rate-limits.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-rate-limits.png new file mode 100644 index 00000000..c64a2a4b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/get-started-rate-limits.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-authentication.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-authentication.png new file mode 100644 index 00000000..b0329765 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-authentication.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-create-actions.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-create-actions.png new file mode 100644 index 00000000..02b83742 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-create-actions.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-google-calendar-events.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-google-calendar-events.png new file mode 100644 index 00000000..6658c186 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-google-calendar-events.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-google-docs-update.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-google-docs-update.png new file mode 100644 index 00000000..216252aa Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-google-docs-update.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-jira-issue-creation-redirect.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-jira-issue-creation-redirect.png new file mode 100644 index 00000000..3e999cce Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-jira-issue-creation-redirect.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-jira-issue-creation.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-jira-issue-creation.png new file mode 100644 index 00000000..76512a5b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-jira-issue-creation.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-zendesk-ticket-redirection.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-zendesk-ticket-redirection.png new file mode 100644 index 00000000..badb96d4 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-examples-zendesk-ticket-redirection.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-faq.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-faq.png new file mode 100644 index 00000000..4d4a02fa Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-faq.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-overview.png new file mode 100644 index 00000000..c52ab78d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-actions-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-direct-api.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-direct-api.png new file mode 100644 index 00000000..a2c5fc1f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-direct-api.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-langchain.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-langchain.png new file mode 100644 index 00000000..f49395ce Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-langchain.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-nvidia-example.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-nvidia-example.png new file mode 100644 index 00000000..006b5982 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-nvidia-example.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-overview.png new file mode 100644 index 00000000..85984672 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-toolkit.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-toolkit.png new file mode 100644 index 00000000..2ef39862 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-agents-toolkit.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-chat-chatbot-example.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-chat-chatbot-example.png new file mode 100644 index 00000000..fd91741b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-chat-chatbot-example.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-chat-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-chat-overview.png new file mode 100644 index 00000000..a8a67b8f Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-chat-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-mcp-RemoteMCPContent.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-mcp-RemoteMCPContent.png new file mode 100644 index 00000000..2d75c44d Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-mcp-RemoteMCPContent.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-mcp.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-mcp.png new file mode 100644 index 00000000..b3f3be59 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-mcp.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-datasource-filters.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-datasource-filters.png new file mode 100644 index 00000000..70cfd7a8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-datasource-filters.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-faceted-filters.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-faceted-filters.png new file mode 100644 index 00000000..2c9f0fc8 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-faceted-filters.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-filtering-results.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-filtering-results.png new file mode 100644 index 00000000..2ef8e10a Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-filtering-results.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-llm-content.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-llm-content.png new file mode 100644 index 00000000..192f80f3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-llm-content.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-overview.png new file mode 100644 index 00000000..9ae357f3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/guides-search-overview.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/index.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/index.png new file mode 100644 index 00000000..4f3d480b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/index.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-go.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-go.png new file mode 100644 index 00000000..1c1e0c46 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-go.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-java.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-java.png new file mode 100644 index 00000000..6d2301d0 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-java.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-python.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-python.png new file mode 100644 index 00000000..693eeea1 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-python.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-typescript.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-typescript.png new file mode 100644 index 00000000..76ad9e05 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients-typescript.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients.png new file mode 100644 index 00000000..21ab16c7 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-api-clients.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-3rd-party-cookies.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-3rd-party-cookies.png new file mode 100644 index 00000000..41d58411 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-3rd-party-cookies.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-authentication.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-authentication.png new file mode 100644 index 00000000..a7a594ca Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-authentication.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-autocomplete.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-autocomplete.png new file mode 100644 index 00000000..48bb4fe3 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-autocomplete.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-chat.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-chat.png new file mode 100644 index 00000000..76eb669b Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-chat.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-modal-search.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-modal-search.png new file mode 100644 index 00000000..b8d7c92e Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-modal-search.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-recommendations.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-recommendations.png new file mode 100644 index 00000000..6ace3e78 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-recommendations.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-sidebar.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-sidebar.png new file mode 100644 index 00000000..3c1cf6be Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-components-sidebar.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-brightspot.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-brightspot.png new file mode 100644 index 00000000..894cb0e9 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-brightspot.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-lumapps.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-lumapps.png new file mode 100644 index 00000000..7cc5ee16 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-lumapps.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-react.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-react.png new file mode 100644 index 00000000..bd8734f1 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-react.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-zendesk.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-zendesk.png new file mode 100644 index 00000000..faf2d0b6 Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-guides-zendesk.png differ diff --git a/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-overview.png b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-overview.png new file mode 100644 index 00000000..dd05014a Binary files /dev/null and b/tests/visual-regression/__snapshots__/screenshots.spec.ts/libraries-web-sdk-overview.png differ diff --git a/tests/visual-regression/screenshot.css b/tests/visual-regression/screenshot.css new file mode 100644 index 00000000..0a1853e6 --- /dev/null +++ b/tests/visual-regression/screenshot.css @@ -0,0 +1,13 @@ +iframe, +.avatar__photo, +img[src$='.gif'], +.DocSearch-Button-Keys > kbd, +[class*='playgroundPreview'] { + visibility: hidden; +} + +.theme-last-updated, +.docusaurus-mermaid-container { + display: none; +} + diff --git a/tests/visual-regression/screenshots.spec.ts b/tests/visual-regression/screenshots.spec.ts new file mode 100644 index 00000000..1328798b --- /dev/null +++ b/tests/visual-regression/screenshots.spec.ts @@ -0,0 +1,32 @@ +import * as fs from 'fs'; +import { test, expect } from '@playwright/test'; +import { extractSitemapPathnames, pathnameToSnapshotName } from './utils'; + +const siteUrl = 'http://localhost:3000'; +const sitemapPath = './build/sitemap.xml'; +const stylesheetPath = './tests/visual-regression/screenshot.css'; +const stylesheet = fs.readFileSync(stylesheetPath).toString(); + +function waitForDocusaurusHydration() { + return document.documentElement.dataset.hasHydrated === 'true'; +} + +function screenshotPathname(pathname: string) { + test(`pathname ${pathname}`, async ({ page }) => { + const url = siteUrl + pathname; + await page.goto(url, { waitUntil: 'networkidle' }); + await page.waitForFunction(waitForDocusaurusHydration); + await page.addStyleTag({ content: stylesheet }); + + await expect(page).toHaveScreenshot(`${pathnameToSnapshotName(pathname)}.png`, { + fullPage: true, + animations: 'disabled', + }); + }); +} + +test.describe('Visual regression tests', () => { + const pathnames = extractSitemapPathnames(sitemapPath); + pathnames.forEach(screenshotPathname); +}); + diff --git a/tests/visual-regression/utils.ts b/tests/visual-regression/utils.ts new file mode 100644 index 00000000..f5008e50 --- /dev/null +++ b/tests/visual-regression/utils.ts @@ -0,0 +1,25 @@ +import * as cheerio from 'cheerio'; +import * as fs from 'fs'; + +export function extractSitemapPathnames(sitemapPath: string): Array { + if (!fs.existsSync(sitemapPath)) { + throw new Error( + `Sitemap not found at ${sitemapPath}. Make sure to build the site first with 'pnpm build'` + ); + } + + const sitemap = fs.readFileSync(sitemapPath).toString(); + const $ = cheerio.load(sitemap, { xmlMode: true }); + const urls: Array = []; + + $('loc').each(function handleLoc() { + urls.push($(this).text()); + }); + + return urls.map((url) => new URL(url).pathname); +} + +export function pathnameToSnapshotName(pathname: string): string { + return pathname.replace(/^\/|\/$/g, '') || 'index'; +} +