Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/docs_functionalities_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docs Functionalities Tests

permissions:
contents: read

on:
schedule:
# Run every Sunday at 23:00 UTC (offset from indexability's 22:00 slot)
- cron: "0 23 * * 0"
workflow_dispatch:
inputs:
base_url:
description: "Base URL to test against (e.g. a Netlify deploy preview)"
required: false
default: "https://docs.weaviate.io"

env:
PYTHON_VERSION: "3.11"

jobs:
test-functionalities:
name: Test Functionalities
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up test environment
uses: ./.github/actions/setup-test-env
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Playwright browser
run: uv run playwright install --with-deps chromium

- name: Record test start time
run: echo "TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV

- name: Run functionalities tests
id: functionalities-tests
continue-on-error: true
env:
DOCS_BASE_URL: ${{ github.event.inputs.base_url || 'https://docs.weaviate.io' }}
# Tell tests/conftest.py to skip its Weaviate docker-compose startup —
# this Playwright-only suite doesn't need a local Weaviate instance.
DOCS_GITHUB_ENV: "true"
run: |
echo "Running Copy-page functionalities tests against ${DOCS_BASE_URL} ..."
uv run pytest -m "functionalities" -v --tb=short --junitxml=pytest-results.xml

- name: Handle test results
if: always()
uses: ./.github/actions/handle-test-results
with:
test-outcome: ${{ steps.functionalities-tests.outcome == 'success' && 'success' || 'failure' }}
test-type: 'Functionalities'
slack-bot-token: ${{ secrets.TESTING_CI_SLACK_BOT }}
test-results-xml: 'pytest-results.xml'
8 changes: 6 additions & 2 deletions _includes/docs-feedback.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Have a question or feedback? Here's how to reach us.

import CardsSection from "/src/components/CardsSection";
import styles from "/src/components/CardsSection/styles.module.scss";

Expand Down Expand Up @@ -30,4 +28,10 @@ export const feedbackCardsData = [
},
];

<div data-copy-exclude>

Have a question or feedback? Here's how to reach us.

<CardsSection items={feedbackCardsData} className={styles.smallCards} />

</div>
Comment thread
g-despot marked this conversation as resolved.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
"sass": "^1.83.4",
"stream-chain": "^2.2.5",
"stream-json": "^1.7.5",
"turndown": "^7.2.0",
"turndown-plugin-gfm": "^1.0.2",
"uuid": "^13.0.0",
"weaviate-agents": "^1.5.0",
"weaviate-client": "^3.12.1",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies = [
"ijson>=3.3.0",
"openai>=1.50.0",
"pandas>=2.2.3",
"playwright>=1.40.0",
"pytest>=8.3.5",
"python-dotenv>=1.1.1",
"requests>=2.32.3",
Expand Down
3 changes: 2 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
python_files = test_*.py *_test.py
norecursedirs = _* .github .idea* .pytest_cache .venv venv* blog developers downloads playbook src static
norecursedirs = _* .github .idea* .pytest_cache .venv venv* blog developers downloads node_modules playbook src static
markers =
pyv4: groups tests by language for v4 client only (python)
agents: group tests for Query Agent
Expand All @@ -14,3 +14,4 @@ markers =
indexability: HTML structure tests for docs indexability (no API keys)
indexability_agents: AI agent tests for docs indexability (requires API keys)
llms_txt: verifies llms.txt code snippets are covered by tested docs scripts
functionalities: browser-based checks of live-site UI features (e.g. Copy page button); requires playwright + chromium
3 changes: 3 additions & 0 deletions src/components/AcademyBadge/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ const AcademyBadge = ({
iconOnly = false,
className = ""
}) => {
// data-copy-exclude marks this badge as UI chrome so the "Copy page" markdown
// export (src/components/ContextualMenu) strips it out via [data-copy-exclude].
return (
<span
className={`${styles.academyBadge} ${compact ? styles.compact : ""} ${iconOnly ? styles.iconOnly : ""} ${className}`}
title={iconOnly ? "Weaviate Academy" : undefined}
data-copy-exclude=""
>
<img src="/img/graduation-cap-icon.svg" alt="" className={styles.academyIcon} />
{!iconOnly && <span>{compact ? compactText : text}</span>}
Expand Down
3 changes: 3 additions & 0 deletions src/components/CloudOnlyBadge/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ const CloudOnlyBadge = ({
iconOnly = false,
className = ""
}) => {
// data-copy-exclude marks this badge as UI chrome so the "Copy page" markdown
// export (src/components/ContextualMenu) strips it out via [data-copy-exclude].
return (
<span
className={`${styles.cloudOnlyBadge} ${compact ? styles.compact : ""} ${iconOnly ? styles.iconOnly : ""} ${className}`}
title={iconOnly ? "Weaviate Cloud only" : undefined}
data-copy-exclude=""
>
<img src="/img/cloud-icon.svg" alt="" className={styles.cloudIcon} />
{!iconOnly && <span>{compact ? compactText : text}</span>}
Expand Down
Loading
Loading