Skip to content

Commit c666dfa

Browse files
authored
fix: remove fullPage tests (#4)
1 parent 1014be2 commit c666dfa

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ http.createServer(async (req, res) => {
594594
- `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.
595595
- `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
596596
- `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
597-
- `fullPage` (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
598597
- Read-only: **true**
599598

600599
<!-- NOTE: This has been generated via update-readme.js -->

tests/screenshot.spec.ts

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -245,54 +245,6 @@ test('browser_take_screenshot (imageResponses=omit)', async ({ startClient, serv
245245
});
246246
});
247247

248-
test('browser_take_screenshot (fullPage: true)', async ({ startClient, server }, testInfo) => {
249-
const { client } = await startClient({
250-
config: { outputDir: testInfo.outputPath('output') },
251-
});
252-
expect(await client.callTool({
253-
name: 'browser_navigate',
254-
arguments: { url: server.HELLO_WORLD },
255-
})).toHaveResponse({
256-
code: expect.stringContaining(`page.goto('http://localhost`),
257-
});
258-
259-
expect(await client.callTool({
260-
name: 'browser_take_screenshot',
261-
arguments: { fullPage: true },
262-
})).toEqual({
263-
content: [
264-
{
265-
text: expect.stringContaining('fullPage: true'),
266-
type: 'text',
267-
}
268-
],
269-
});
270-
});
271-
272-
test('browser_take_screenshot (fullPage with element should error)', async ({ startClient, server }, testInfo) => {
273-
const { client } = await startClient({
274-
config: { outputDir: testInfo.outputPath('output') },
275-
});
276-
expect(await client.callTool({
277-
name: 'browser_navigate',
278-
arguments: { url: server.HELLO_WORLD },
279-
})).toHaveResponse({
280-
pageState: expect.stringContaining(`[ref=e1]`),
281-
});
282-
283-
const result = await client.callTool({
284-
name: 'browser_take_screenshot',
285-
arguments: {
286-
fullPage: true,
287-
element: 'hello button',
288-
ref: 'e1',
289-
},
290-
});
291-
292-
expect(result.isError).toBe(true);
293-
expect(result.content?.[0]?.text).toContain('fullPage cannot be used with element screenshots');
294-
});
295-
296248
test('browser_take_screenshot (viewport without snapshot)', async ({ startClient, server }, testInfo) => {
297249
const { client } = await startClient({
298250
config: { outputDir: testInfo.outputPath('output') },

0 commit comments

Comments
 (0)