add EXAMPLE=folder-name support for tests & basic-host (#292)
* add EXAMPLE=folder-name support for tests & basic-host * style: format e2e test files * style: format threejs-server files
This commit is contained in:
parent
6c5aa52c95
commit
801e1b043a
1 changed files with 177 additions and 41 deletions
|
|
@ -30,8 +30,11 @@ const SKIP_SERVERS = new Set([
|
|||
"video-resource", // Uses custom screenshot from PR comment
|
||||
]);
|
||||
|
||||
// Optional: filter to a single example via EXAMPLE env var (folder name)
|
||||
const EXAMPLE_FILTER = process.env.EXAMPLE;
|
||||
|
||||
// Server configurations (excludes integration-server which is for E2E testing)
|
||||
const SERVERS = [
|
||||
const ALL_SERVERS = [
|
||||
{
|
||||
key: "basic-react",
|
||||
name: "Basic MCP App Server (React)",
|
||||
|
|
@ -55,7 +58,6 @@ const SERVERS = [
|
|||
{ key: "map-server", name: "Map Server", dir: "map-server" },
|
||||
{ key: "pdf-server", name: "PDF Server", dir: "pdf-server" },
|
||||
{ key: "qr-server", name: "QR Code Server", dir: "qr-server" },
|
||||
{ key: "say-server", name: "Say Demo", dir: "say-server" },
|
||||
{
|
||||
key: "scenario-modeler",
|
||||
name: "SaaS Scenario Modeler",
|
||||
|
|
@ -82,6 +84,11 @@ const SERVERS = [
|
|||
{ key: "wiki-explorer", name: "Wiki Explorer", dir: "wiki-explorer-server" },
|
||||
];
|
||||
|
||||
// Filter servers if EXAMPLE is specified
|
||||
const SERVERS = EXAMPLE_FILTER
|
||||
? ALL_SERVERS.filter((s) => s.dir === EXAMPLE_FILTER)
|
||||
: ALL_SERVERS;
|
||||
|
||||
/**
|
||||
* Wait for the MCP App to load inside nested iframes.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue