From f94758ea27a8ba21e201c743626844aba86f881a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 19:49:38 +0000 Subject: [PATCH] fix: correct integration tool links in overview documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- docs/en/tools/tool-integrations/overview.mdx | 4 +- tests/test_documentation_links.py | 43 ++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 tests/test_documentation_links.py diff --git a/docs/en/tools/tool-integrations/overview.mdx b/docs/en/tools/tool-integrations/overview.mdx index 6f59ca471..a40afecc8 100644 --- a/docs/en/tools/tool-integrations/overview.mdx +++ b/docs/en/tools/tool-integrations/overview.mdx @@ -11,7 +11,7 @@ mode: "wide" Invoke Amazon Bedrock Agents from CrewAI to orchestrate actions across AWS services. @@ -20,7 +20,7 @@ mode: "wide" Automate deployment and operations by integrating CrewAI with external platforms and workflows. diff --git a/tests/test_documentation_links.py b/tests/test_documentation_links.py new file mode 100644 index 000000000..ddc5d6794 --- /dev/null +++ b/tests/test_documentation_links.py @@ -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"