Playwright E2E tests with mandatory @qe/blocks integration, including
transformation of existing tests and BLAW-specific helpers.
The QE Blocks Tests V2 MCP generates Playwright tests that use the @qe/blocks
package: reusable testing utilities built for Bloomberg Law products with built-in retry
logic, performance logging, and product-specific functions. All generated tests use
Blocks fixtures and the assistant automatically transforms raw Playwright patterns to
their Blocks equivalents.
Use this MCP when you are working on Bloomberg Law products, when your repo already uses
@qe/blocks, or when you want to transform existing Playwright tests to use
Blocks patterns. For standard @playwright/test (non-Blocks), use
QE E2E Tests V2.
Mount: /mcp/v2/blocks. Config key: qe_blocks_tests_v2. Legacy V1 mounts under /mcp/qe_blocks_tests (including older BBVPN V1 URLs) are deprecated — use V2 only.
| Environment | URL | Transport | Status |
|---|---|---|---|
| Development (V2) | https://qe-mcp.bindg.com/mcp/v2/blocks |
http | V2 |
| Production (V2) | https://qe-mcp.bindg.com/mcp/v2/blocks |
http | Production |
~/.cursor/mcp.json{
"mcpServers": {
"qe_blocks_tests_v2": {
"url": "https://qe-mcp.bindg.com/mcp/v2/blocks",
"transport": "http"
}
}
}
.vscode/mcp.json{
"servers": {
"qe_blocks_tests_v2": {
"url": "https://qe-mcp.bindg.com/mcp/v2/blocks",
"type": "http"
}
},
"inputs": []
}
| Tool | What it does |
|---|---|
blocks_core |
Blocks-first UI tests: Artifactory setup, repo analysis, @qe/blocks/new-fixtures, non-destructive generation. |
blocks_transform |
Converts plain Playwright UI code to @qe/blocks (import swaps, bl fixture, mapping tables). Pair with blocks_core. |
blaw_product_context |
BLAW product grounding (Search, UDV, Dockets, Alerts, etc.). Pair with Blocks tools. |
https://qe-mcp.bindg.com/mcp/v2/blocks.qe_blocks_tests_v2.@qe/blocks package setupBefore using this MCP, ensure @qe/blocks is installed:
npm install @qe/blocks
The package is available from Artifactory. Add the registry to .npmrc:
registry=https://artifactory.bna.com/artifactory/api/npm/npm-virtual/
All generated UI tests use Blocks fixtures with a bl parameter:
import { test, expect } from '@qe/blocks/new-fixtures';
test('example', async ({ bl }) => {
await bl.goto('/page');
await bl.click('[data-testid="button"]');
await bl.verifyElements('[data-testid="element"]');
});
The MCP automatically transforms raw Playwright patterns to Blocks equivalents:
| Raw Playwright | Blocks equivalent |
|---|---|
page.goto(url) | bl.goto(url) — never use page.goto() |
page.locator(sel).click() | bl.click(sel) |
page.locator(sel).fill(val) | bl.inputText(sel, val) |
expect(loc).toBeVisible() | bl.verifyElements(sel) |
expect(loc).toContainText(t) | bl.containsText(sel, t) |
import { test, expect } from '@playwright/test' | import { test, expect } from '@qe/blocks/new-fixtures' |
For Bloomberg Law products, the MCP can use specialized Blocks namespaces:
| Namespace | Import | Sample functions |
|---|---|---|
| BlawBlocks | import { BlawBlocks } from '@qe/blocks/blawblocks' |
addRootPermission(), addSinglePermission(perm), openDocument(docID) |
| BlawAlertsBlocks | import { BlawAlertsBlocks } from '@qe/blocks/blawalertsblocks' |
createAlertswithKeyword(name, url, keyword), deleteAlerts() |
| DocketsBlocks | import { DocketsBlocks } from '@qe/blocks/docketsblocks' |
openDocketsSearch(), selectCourtFilter(court), docketTracking(docID) |
| ContractsBlocks | import { ContractsBlocks } from '@qe/blocks/contractsblocks' |
contractUpload(document), contractDelete(), addTemplate() |
@qe/blocks in package.json (required)..npmrc.@qe/blocks/new-fixtures) for all new tests.data-testid).waitForTimeout.data-testid additions when selectors are missing.{ bl } parameter in every test function.The MCP behaves like a senior Playwright architect. Key principles, condensed:
Deep expertise in TS/JS (ESM), API testing with Swagger/OpenAPI, web UI patterns,
Playwright best practices, software quality standards, and @qe/blocks.
@qe/blocks integrationAll tests use Blocks fixtures and methods automatically, giving you retry logic, better errors, performance logging, and specialized BLAW functions for free.
Detects framework, backend API structure, routing, state, build config, and existing test infrastructure before generating anything.
All raw Playwright patterns are transformed to Blocks equivalents during generation — no chance to accidentally use the less reliable raw patterns.
Tests are generated for every identified core feature: happy path, negative scenarios, edge cases, and error handling. The rules explicitly prohibit shallow coverage.
Priority order: data-testid, role locators, getByText,
getByLabel, getByPlaceholder, CSS only as a last resort. No
nth-child.
The MCP asks the user to confirm UI, API, or Hybrid before generating, so requests like "test authentication" don't get the wrong interpretation.
Detects TypeScript vs JavaScript and ESM vs CommonJS to match the existing test suite. Playwright tests are always JS/TS regardless of the application language.
Reuses existing page objects, fixtures, utilities, naming conventions, and auth/SSO flows instead of inventing new ones.
Access to BlawBlocks, BlawAlertsBlocks,
DocketsBlocks, and ContractsBlocks when relevant.
Configures Playwright to use the Blocks accessibility reporter and the
accessibilityScan fixture for built-in scans.
TDD, AAA with section comments, POM, self-documenting code, screenshots on failure, explicit TypeScript types or JSDoc.
Recorded Codegen output is transformed to Blocks methods with semantic selectors and AAA structure, then saved to feature-specific directories.
Generated npm scripts use cross-env, shx, and
npm-run-all so they work on Windows, macOS, and Linux.
Never overwrites existing playwright.config, page objects, fixtures, or
utilities. New tests integrate with existing infrastructure; recommendations for existing
tests go in a separate document.
blocks, analyze this
repository's existing Playwright setup (config, directories, fixtures, page objects,
utilities). Check for @qe/blocks installation. Output a concise inventory and
what you will reuse vs not touch.
blocks, generate NEW
Playwright E2E tests for the login feature using AAA + POM + Blocks fixtures.
Import from @qe/blocks/new-fixtures and transform all Playwright calls to
Blocks. Do not overwrite any existing files. Show the exact file paths you will create.
blocks, generate
tests for BLAW document search using BlawBlocks.openDocument().
blocks, create tests for BLAW
Alerts creation using BlawAlertsBlocks.createAlertswithKeyword().
blocks, generate Dockets tests
using DocketsBlocks functions for court filtering and docket tracking.
blocks, create Contracts tests
using ContractsBlocks for document upload and template management.
blocks, review
this existing Playwright test and recommend how to transform it to use QE Blocks.
<paste codegen output>
The assistant should transform:
import { test, expect } from '@playwright/test' → import { test, expect } from '@qe/blocks/new-fixtures'page.goto() → bl.goto()page.locator().click() → bl.click()page.locator().fill() → bl.inputText()expect().toBeVisible() → bl.verifyElements(){ bl } parameter to all test functions.tests/[feature-name]/.
When using the V2 URL https://qe-mcp.bindg.com/mcp/v2/blocks
behind BBVPN, add qe-mcp.bindg.com to your
IDE's http.noProxy setting (not in mcp.json).
{
"http.noProxy": [
"qe-mcp.bindg.com"
]
}
qe_blocks_tests_v2, list available
tools/capabilities and provide 3 example commands for BLAW Playwright E2E tests with
Blocks integration.
qe_blocks_tests_v2, check for
@qe/blocks installation in this repo and verify Blocks usage patterns.