Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jspm_packages/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/debug-certificate-manager.json
!.vscode/mcp.json

# Rush temporary files
common/deploy/
Expand Down Expand Up @@ -128,3 +129,8 @@ dist-storybook/

# VS Code test runner files
.vscode-test/

# Playwright test outputs
playwright-report/
test-results/

12 changes: 12 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"servers": {
"playwright": {
"type": "stdio",
"command": "node",
"args": [
"${workspaceFolder}/apps/playwright-browser-tunnel/lib/PlaywrightMcpBrowserTunnelClientCommandLine.js"
]
}
},
"inputs": []
}
Empty file.
7 changes: 7 additions & 0 deletions apps/playwright-browser-tunnel/config/rig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// The "rig.json" file directs tools to look for their config files in an external package.
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",

"rigPackageName": "local-node-rig"
}
21 changes: 21 additions & 0 deletions apps/playwright-browser-tunnel/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

const nodeTrustedToolProfile = require('local-node-rig/profiles/default/includes/eslint/flat/profile/node-trusted-tool');
const friendlyLocalsMixin = require('local-node-rig/profiles/default/includes/eslint/flat/mixins/friendly-locals');

module.exports = [
...nodeTrustedToolProfile,
...friendlyLocalsMixin,
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname
}
},
rules: {
'no-console': 'off'
}
}
];
46 changes: 46 additions & 0 deletions apps/playwright-browser-tunnel/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "@rushstack/playwright-browser-tunnel",
"version": "0.0.0",
"description": "Run a remote Playwright Browser Tunnel. Useful in remote development environments.",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/rushstack.git",
"directory": "apps/playwright-browser-tunnel"
},
"engines": {
"node": ">=20.0.0"
},
"engineStrict": true,
"homepage": "https://rushstack.io",
"scripts": {
"build": "heft build --clean",
"_phase:build": "heft run --only build -- --clean",
"demo": "playwright test --config=playwright.config.ts"
},
"bin": {
"playwright-browser-tunnel": "./bin/playwright-browser-tunnel"
},
"license": "MIT",
"dependencies": {
"@rushstack/node-core-library": "workspace:*",
"@rushstack/terminal": "workspace:*",
"@rushstack/ts-command-line": "workspace:*",
"string-argv": "~0.3.1",
"semver": "~7.5.4",
"ws": "~8.14.1",
"playwright": "1.56.1"
},
"devDependencies": {
"@rushstack/heft": "workspace:*",
"eslint": "~9.37.0",
"local-node-rig": "workspace:*",
"@types/semver": "7.5.0",
"@types/ws": "8.5.5",
"playwright-core": "~1.56.1",
"@playwright/test": "~1.56.1",
"@types/node": "20.17.19"
},
"peerDependencies": {
"playwright-core": "~1.56.1"
}
}
45 changes: 45 additions & 0 deletions apps/playwright-browser-tunnel/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
testDir: './tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Retry on CI only */
retries: 0,
/* Opt out of parallel tests on CI. */
workers: 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on'
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] }
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] }
},
{
name: 'Google Chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' } // or 'chrome-beta'
},
{
name: 'Microsoft Edge',
use: { ...devices['Desktop Edge'], channel: 'msedge' } // or "msedge-beta" or 'msedge-dev'
}
]
});
Loading
Loading