Skip to content

Commit 86f197f

Browse files
Use id selector for server time element in E2E tests
Add `id="server-time"` to the integration server's time display element and update the E2E test mask selector to use `#server-time` instead of the generic `code` element selector. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 18d0b35 commit 86f197f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/integration-server/src/mcp-app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ function GetTimeAppInner({ app, toolResult }: GetTimeAppInnerProps) {
128128

129129
<div className={styles.action}>
130130
<p>
131-
<strong>Server Time:</strong> <code>{serverTime}</code>
131+
<strong>Server Time:</strong>{" "}
132+
<code id="server-time">{serverTime}</code>
132133
</p>
133134
<button onClick={handleGetTime}>Get Server Time</button>
134135
</div>

tests/e2e/servers.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { test, expect, type Page, type ConsoleMessage } from "@playwright/test";
44
// Note: CSS modules generate unique class names, so we use attribute selectors
55
// with partial matches (e.g., [class*="heatmapWrapper"]) for those components
66
const DYNAMIC_MASKS: Record<string, string[]> = {
7-
integration: ["code"], // Server time display
7+
integration: ["#server-time"], // Server time display
88
"cohort-heatmap": ['[class*="heatmapWrapper"]'], // Heatmap grid (random data)
99
"customer-segmentation": [".chart-container"], // Scatter plot (random data)
1010
"system-monitor": [

0 commit comments

Comments
 (0)