Skip to content

Commit fb18af5

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 <noreply@anthropic.com>
1 parent 18d0b35 commit fb18af5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ 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> <code id="server-time">{serverTime}</code>
132132
</p>
133133
<button onClick={handleGetTime}>Get Server Time</button>
134134
</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)