mcp-web-inspector 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Check synchronously whether the Playwright Chromium executable is available.
3
+ * Use this to conditionally skip entire describe blocks:
4
+ *
5
+ * const d = browserAvailable ? describe : describe.skip;
6
+ * d('MySuite', () => { ... });
7
+ */
8
+ export declare const browserAvailable: boolean;
@@ -0,0 +1,10 @@
1
+ import { chromium } from 'playwright';
2
+ import fs from 'fs';
3
+ /**
4
+ * Check synchronously whether the Playwright Chromium executable is available.
5
+ * Use this to conditionally skip entire describe blocks:
6
+ *
7
+ * const d = browserAvailable ? describe : describe.skip;
8
+ * d('MySuite', () => { ... });
9
+ */
10
+ export const browserAvailable = fs.existsSync(chromium.executablePath());
@@ -6,7 +6,9 @@
6
6
  * page are not captured.
7
7
  */
8
8
  import { chromium } from 'playwright';
9
- describe('Console logs after tab switch - Bug Reproduction', () => {
9
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
10
+ const d = browserAvailable ? describe : describe.skip;
11
+ d('Console logs after tab switch - Bug Reproduction', () => {
10
12
  let browser;
11
13
  let context;
12
14
  let page1;
@@ -1,7 +1,9 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
2
2
  import { chromium } from 'playwright';
3
3
  import { GetComputedStylesTool } from '../get_computed_styles.js';
4
- describe('GetComputedStylesTool', () => {
4
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
5
+ const d = browserAvailable ? describe : describe.skip;
6
+ d('GetComputedStylesTool', () => {
5
7
  let browser;
6
8
  let page;
7
9
  let tool;
@@ -1,7 +1,9 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
2
2
  import { chromium } from 'playwright';
3
3
  import { ElementExistsTool } from '../element_exists.js';
4
- describe('ElementExistsTool', () => {
4
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
5
+ const d = browserAvailable ? describe : describe.skip;
6
+ d('ElementExistsTool', () => {
5
7
  let browser;
6
8
  let page;
7
9
  let tool;
@@ -1,7 +1,9 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
2
2
  import { chromium } from 'playwright';
3
3
  import { FindByTextTool } from '../find_by_text.js';
4
- describe('FindByTextTool', () => {
4
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
5
+ const d = browserAvailable ? describe : describe.skip;
6
+ d('FindByTextTool', () => {
5
7
  let browser;
6
8
  let page;
7
9
  let tool;
@@ -1,7 +1,9 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
2
2
  import { chromium } from 'playwright';
3
3
  import { InspectAncestorsTool } from '../inspect_ancestors.js';
4
- describe('InspectAncestorsTool', () => {
4
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
5
+ const d = browserAvailable ? describe : describe.skip;
6
+ d('InspectAncestorsTool', () => {
5
7
  let browser;
6
8
  let page;
7
9
  let tool;
@@ -1,7 +1,9 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
2
2
  import { chromium } from 'playwright';
3
3
  import { MeasureElementTool } from '../measure_element.js';
4
- describe('MeasureElementTool', () => {
4
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
5
+ const d = browserAvailable ? describe : describe.skip;
6
+ d('MeasureElementTool', () => {
5
7
  let browser;
6
8
  let page;
7
9
  let tool;
@@ -2,7 +2,9 @@ import { test, expect, beforeEach, afterAll, describe } from '@jest/globals';
2
2
  import { ListNetworkRequestsTool } from '../list_network_requests.js';
3
3
  import { GetRequestDetailsTool } from '../get_request_details.js';
4
4
  import { clearNetworkLog, getNetworkLog, ensureBrowser, resetBrowserState } from '../../../../toolHandler.js';
5
- describe('Network Monitoring Tools', () => {
5
+ import { browserAvailable } from '../../../../__tests__/helpers/browserSetup.js';
6
+ const d = browserAvailable ? describe : describe.skip;
7
+ d('Network Monitoring Tools', () => {
6
8
  let browser;
7
9
  let page;
8
10
  let context;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-web-inspector",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Web Inspector MCP: Give LLMs visual superpowers to see, debug, and test any web page.",
5
5
  "license": "MIT",
6
6
  "author": "Anton",