From a66c58343705f0c0881065b82664d4377d3d1297 Mon Sep 17 00:00:00 2001 From: heyitsaamir Date: Tue, 24 Mar 2026 23:48:23 -0700 Subject: [PATCH 1/3] Add e2e test spec for echo bot and repo-wide e2e instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These two markdown files are all a human needs to write — the e2e testing skill generates and manages the actual Playwright test code from here. Co-Authored-By: Claude Opus 4.6 (1M context) --- e2e-instructions.md | 9 +++++++++ examples/echo/e2e.spec.md | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 e2e-instructions.md create mode 100644 examples/echo/e2e.spec.md diff --git a/e2e-instructions.md b/e2e-instructions.md new file mode 100644 index 000000000..b4f161009 --- /dev/null +++ b/e2e-instructions.md @@ -0,0 +1,9 @@ +# E2E Instructions + +## Environment +- env: `e2e-test/.env` +- devtunnel: `devtunnel host $DEVTUNNEL_NAME` + +## Bot Start +- command: `DOTENV_CONFIG_PATH=../../e2e-test/.env npm run dev` +- ready: `listening on port` diff --git a/examples/echo/e2e.spec.md b/examples/echo/e2e.spec.md new file mode 100644 index 000000000..0962945d0 --- /dev/null +++ b/examples/echo/e2e.spec.md @@ -0,0 +1,12 @@ +# Echo Bot E2E Tests + +## Tests + +- act: send "Hello there" + assert: bot replies with 'you said "Hello there"' + +- act: send "Testing 123" + assert: bot replies with 'you said "Testing 123"' + +- act: send "🎉" + assert: bot replies with 'you said "🎉"' From db3fa8e25532869c4e35356020d820d649728afb Mon Sep 17 00:00:00 2001 From: heyitsaamir Date: Thu, 26 Mar 2026 11:41:30 -0700 Subject: [PATCH 2/3] Expose Graph Client http client via public getter Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/graph/src/index.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/graph/src/index.ts b/packages/graph/src/index.ts index c0eaec42c..c5acd7724 100644 --- a/packages/graph/src/index.ts +++ b/packages/graph/src/index.ts @@ -24,13 +24,21 @@ type Options = (http.Client | http.ClientOptions) & { */ export class Client { protected baseUrlRoot; - protected http: http.Client; + protected _http: http.Client; protected betaHttp?: http.Client; + /** + * The underlying HTTP client, pre-configured with Graph base URL and headers. + * Use for raw Graph API requests not covered by endpoint functions. + */ + get http(): http.Client { + return this._http; + } + constructor(options?: Options) { this.baseUrlRoot = options?.baseUrlRoot ?? defaultBaseUrlRoot; if (!options) { - this.http = new http.Client({ + this._http = new http.Client({ baseUrl: `${this.baseUrlRoot}/v1.0`, headers: { 'Content-Type': 'application/json', @@ -38,7 +46,7 @@ export class Client { }, }); } else if ('request' in options) { - this.http = options.clone({ + this._http = options.clone({ baseUrl: `${this.baseUrlRoot}/v1.0`, headers: { 'Content-Type': 'application/json', @@ -46,7 +54,7 @@ export class Client { }, }); } else { - this.http = new http.Client({ + this._http = new http.Client({ ...options, baseUrl: `${this.baseUrlRoot}/v1.0`, headers: { @@ -121,12 +129,12 @@ export class Client { private getHttpClient(schemaVersion: SchemaVersion): http.Client { if (schemaVersion === 'v1.0') { - return this.http; + return this._http; } this.betaHttp = this.betaHttp ?? - this.http.clone({ + this._http.clone({ baseUrl: `${this.baseUrlRoot}/beta`, }); From 66c447183a1b80ebb1997cba56743008561b16e2 Mon Sep 17 00:00:00 2001 From: heyitsaamir Date: Thu, 26 Mar 2026 11:53:12 -0700 Subject: [PATCH 3/3] Remove e2e test spec and instructions files Co-Authored-By: Claude Opus 4.6 (1M context) --- e2e-instructions.md | 9 --------- examples/echo/e2e.spec.md | 12 ------------ 2 files changed, 21 deletions(-) delete mode 100644 e2e-instructions.md delete mode 100644 examples/echo/e2e.spec.md diff --git a/e2e-instructions.md b/e2e-instructions.md deleted file mode 100644 index b4f161009..000000000 --- a/e2e-instructions.md +++ /dev/null @@ -1,9 +0,0 @@ -# E2E Instructions - -## Environment -- env: `e2e-test/.env` -- devtunnel: `devtunnel host $DEVTUNNEL_NAME` - -## Bot Start -- command: `DOTENV_CONFIG_PATH=../../e2e-test/.env npm run dev` -- ready: `listening on port` diff --git a/examples/echo/e2e.spec.md b/examples/echo/e2e.spec.md deleted file mode 100644 index 0962945d0..000000000 --- a/examples/echo/e2e.spec.md +++ /dev/null @@ -1,12 +0,0 @@ -# Echo Bot E2E Tests - -## Tests - -- act: send "Hello there" - assert: bot replies with 'you said "Hello there"' - -- act: send "Testing 123" - assert: bot replies with 'you said "Testing 123"' - -- act: send "🎉" - assert: bot replies with 'you said "🎉"'