Skip to content

Commit 9b2fbe3

Browse files
committed
More PW fixes
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
1 parent 72fdc74 commit 9b2fbe3

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

mcpgateway/admin_ui/a2aAgents.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ export const testA2AAgent = async function (agentId, agentName, endpointUrl) {
603603
}
604604
if (queryInput) {
605605
// Reset to default value
606-
queryInput.value = "Hello from MCP Gateway Admin UI test!";
606+
queryInput.value = "Hello from ContextForge Admin UI test!";
607607
}
608608
if (resultDiv) {
609609
resultDiv.classList.add("hidden");
@@ -660,7 +660,7 @@ export const handleA2ATestSubmit = async function (e) {
660660
const agentId = safeGetElement("a2a-test-agent-id")?.value;
661661
const query =
662662
safeGetElement("a2a-test-query")?.value ||
663-
"Hello from MCP Gateway Admin UI test!";
663+
"Hello from ContextForge Admin UI test!";
664664

665665
if (!agentId) {
666666
throw new Error("Agent ID is missing");

mcpgateway/admin_ui/admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ Admin.hideUserEditModal = hideUserEditModal;
446446
import "./app.js";
447447
import "./events.js";
448448

449-
console.log("🚀 ContextForge MCP Gateway Admin API initialized");
449+
console.log("🚀 ContextForge AI Gateway Admin API initialized");
450450

451451
// Backward-compatible global aliases for functions that tests and
452452
// inline template handlers expect on the window object.

mcpgateway/admin_ui/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export async function fetchToolsForGateway(gatewayId, gatewayName) {
367367
try {
368368
const response = await fetch(
369369
`${window.ROOT_PATH}/oauth/fetch-tools/${gatewayId}`,
370-
{ method: "POST" },
370+
{ method: "POST", credentials: "include" },
371371
);
372372

373373
const result = await response.json();

mcpgateway/admin_ui/events.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
} from "./initialization.js";
1717
import { closeModal } from "./modals.js";
1818
import { initializeRealTimeMonitoring } from "./monitoring.js";
19-
import { paginationData } from "./pagination.js";
2019
import { initializeTagFiltering } from "./tags.js";
2120
import { hideTeamEditModal, initializeAddMembersForms, initializePasswordValidation, updateDefaultVisibility } from "./teams.js";
2221
import { initializeTeamScopingMonitor } from "./tokens.js";

mcpgateway/admin_ui/initialization.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import { initPromptSelect } from "./prompts.js";
4949
import { initResourceSelect } from "./resources.js";
5050
import { escapeHtml, safeSetInnerHTML } from "./security.js";
5151
import {
52-
ADMIN_ONLY_TABS,
5352
getDefaultTabName,
5453
getUiHiddenSections,
5554
getVisibleSidebarTabs,

tests/playwright/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def test_agent_data():
456456
# These are real, publicly available MCP servers that can be used for testing
457457
VALID_MCP_SERVER_URLS = [
458458
"https://docs.mcp.cloudflare.com/sse",
459-
"https://www.javadocs.dev/mcp",
459+
"https://mcp.deepwiki.com/sse",
460460
"https://mcp.openzeppelin.com/contracts/cairo/mcp",
461461
"https://mcp.openzeppelin.com/contracts/stylus/mcp",
462462
"https://mcp.openzeppelin.com/contracts/stellar/mcp",

tests/playwright/test_gateways.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@ def test_delete_button_with_confirmation(self, gateways_page: GatewaysPage, test
661661
if gateways_page.delete_gateway_by_name(gateway_data["name"]):
662662
logger.info("Deleted existing gateway '%s' before test", gateway_data["name"])
663663

664+
if gateways_page.delete_gateway_by_url(gateway_data["url"]):
665+
logger.info("Deleted existing gateway with URL '%s' before test", gateway_data["url"])
666+
664667
# Fill and submit form, wait for POST (skips on 502)
665668
gateways_page.fill_gateway_form(
666669
name=gateway_data["name"],
@@ -694,9 +697,9 @@ def test_delete_button_with_confirmation(self, gateways_page: GatewaysPage, test
694697
gateways_page.page.reload(wait_until="domcontentloaded")
695698
gateways_page.navigate_to_gateways_tab()
696699
gateways_page.wait_for_gateways_table_loaded()
697-
gateways_page.page.wait_for_selector('#gateways-table-body tr[id*="gateway-row"]', state="attached", timeout=20000)
700+
701+
# Search for the deleted gateway to verify it's gone
698702
gateways_page.search_gateways(gateway_data["name"])
699-
gateways_page.page.wait_for_timeout(500)
700703

701704
assert not gateways_page.gateway_exists(gateway_data["name"]), f"Gateway '{gateway_data['name']}' should not exist after deletion"
702705
logger.info("Gateway '%s' deleted successfully", gateway_data["name"])

0 commit comments

Comments
 (0)