mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
fix: correct integration tool links in overview documentation
- Fix href paths for Bedrock Invoke Agent Tool and CrewAI Automation Tool - Change from /en/tools/tool-integrations/ to /en/tools/integration/ - Add tests to validate documentation link integrity and prevent regression Fixes #3516 Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -11,7 +11,7 @@ mode: "wide"
|
|||||||
<Card
|
<Card
|
||||||
title="Bedrock Invoke Agent Tool"
|
title="Bedrock Invoke Agent Tool"
|
||||||
icon="cloud"
|
icon="cloud"
|
||||||
href="/en/tools/tool-integrations/bedrockinvokeagenttool"
|
href="/en/tools/integration/bedrockinvokeagenttool"
|
||||||
color="#0891B2"
|
color="#0891B2"
|
||||||
>
|
>
|
||||||
Invoke Amazon Bedrock Agents from CrewAI to orchestrate actions across AWS services.
|
Invoke Amazon Bedrock Agents from CrewAI to orchestrate actions across AWS services.
|
||||||
@@ -20,7 +20,7 @@ mode: "wide"
|
|||||||
<Card
|
<Card
|
||||||
title="CrewAI Automation Tool"
|
title="CrewAI Automation Tool"
|
||||||
icon="bolt"
|
icon="bolt"
|
||||||
href="/en/tools/tool-integrations/crewaiautomationtool"
|
href="/en/tools/integration/crewaiautomationtool"
|
||||||
color="#7C3AED"
|
color="#7C3AED"
|
||||||
>
|
>
|
||||||
Automate deployment and operations by integrating CrewAI with external platforms and workflows.
|
Automate deployment and operations by integrating CrewAI with external platforms and workflows.
|
||||||
|
|||||||
43
tests/test_documentation_links.py
Normal file
43
tests/test_documentation_links.py
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
"""Test documentation link integrity to prevent broken links."""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
def test_integration_overview_links():
|
||||||
|
"""Test that integration overview page links point to existing documentation files."""
|
||||||
|
overview_file = Path(__file__).parent.parent / "docs" / "en" / "tools" / "tool-integrations" / "overview.mdx"
|
||||||
|
|
||||||
|
with open(overview_file, 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
href_pattern = r'href="(/en/tools/[^"]+)"'
|
||||||
|
hrefs = re.findall(href_pattern, content)
|
||||||
|
|
||||||
|
docs_root = Path(__file__).parent.parent / "docs"
|
||||||
|
for href in hrefs:
|
||||||
|
file_path = docs_root / href.lstrip('/') + '.mdx'
|
||||||
|
assert file_path.exists(), f"Documentation file not found for href: {href}"
|
||||||
|
|
||||||
|
|
||||||
|
def test_specific_integration_links():
|
||||||
|
"""Test the specific links mentioned in issue #3516."""
|
||||||
|
docs_root = Path(__file__).parent.parent / "docs"
|
||||||
|
|
||||||
|
bedrock_file = docs_root / "en" / "tools" / "integration" / "bedrockinvokeagenttool.mdx"
|
||||||
|
crewai_automation_file = docs_root / "en" / "tools" / "integration" / "crewaiautomationtool.mdx"
|
||||||
|
|
||||||
|
assert bedrock_file.exists(), "Bedrock Invoke Agent Tool documentation file should exist"
|
||||||
|
assert crewai_automation_file.exists(), "CrewAI Automation Tool documentation file should exist"
|
||||||
|
|
||||||
|
overview_file = docs_root / "en" / "tools" / "tool-integrations" / "overview.mdx"
|
||||||
|
with open(overview_file, 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
assert '/en/tools/integration/bedrockinvokeagenttool' in content, "Overview should link to correct Bedrock tool path"
|
||||||
|
assert '/en/tools/integration/crewaiautomationtool' in content, "Overview should link to correct CrewAI automation tool path"
|
||||||
|
|
||||||
|
assert '/en/tools/tool-integrations/bedrockinvokeagenttool' not in content, "Overview should not use incorrect Bedrock tool path"
|
||||||
|
assert '/en/tools/tool-integrations/crewaiautomationtool' not in content, "Overview should not use incorrect CrewAI automation tool path"
|
||||||
Reference in New Issue
Block a user