Skip to content
Open
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
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ dev = [
"importchecker>=3.0",
"interrogate>=1.7.0",
"isort>=6.1.0",
"mcp-contextforge-gateway[playwright]",
"mypy>=1.18.2",
"pexpect>=4.9.0",
"pip-licenses>=5.0.0",
Expand Down Expand Up @@ -685,3 +686,11 @@ quiet = false
whitelist-regex = []
color = true
omit-covered-files = false

[tool.uv.workspace]
members = [
".",
]

[tool.uv.sources]
mcp-contextforge-gateway = { workspace = true }
8 changes: 8 additions & 0 deletions tests/playwright/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
from playwright.sync_api import APIRequestContext, Page, Playwright
import pytest

# First-Party
from mcpgateway.config import Settings

# Get configuration from environment
BASE_URL = os.getenv("TEST_BASE_URL", "http://localhost:8000")
API_TOKEN = os.getenv("MCP_AUTH", "test-token")
Expand Down Expand Up @@ -84,9 +87,14 @@ def authenticated_page(page: Page) -> Page:

@pytest.fixture
def admin_page(page: Page):
settings = Settings()
"""Provide a logged-in admin page for UI tests."""
# Go directly to admin - HTTP Basic Auth is handled by the page fixture
page.goto("/admin")
if re.search(r"login", page.url):
page.fill('[name="email"]', settings.basic_auth_user)
page.fill('[name="password"]', settings.basic_auth_password.get_secret_value())
page.click('button[type="submit"]')
# Verify we're on the admin page
page.wait_for_url(re.compile(r".*admin"))
return page
Expand Down
6 changes: 4 additions & 2 deletions uv.lock

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