Skip to content
Merged
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
55 changes: 38 additions & 17 deletions .github/workflows/create_test_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
pull-requests: write
checks: write
statuses: write
id-token: write # This is required for OIDC login (azure/login) to succeed
contents: read # This is required for actions/checkout to succeed
if: ${{ github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'push' }}
runs-on: ubuntu-latest
env:
MARKDOWN_OUTPUT_FILE: ${{ github.workspace }}/report.md
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Expand All @@ -32,28 +33,48 @@ jobs:
run: |
npx playwright merge-reports --config .github/workflows/merge.config.ts ./all-blob-reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max-old-space-size=8192
HTML_REPORT_URL: 'https://mspwblobreport.z1.web.core.windows.net/run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}/index.html'
WORKFLOW_RUN_CONCLUSION: ${{ github.event.workflow_run.conclusion }}

- name: Azure Login
uses: azure/login@v3
- name: Upload HTML report
id: upload-report
uses: actions/upload-artifact@v7
with:
client-id: ${{ secrets.AZURE_BLOB_REPORTS_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_BLOB_REPORTS_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_BLOB_REPORTS_SUBSCRIPTION_ID }}
path: playwright-report/index.html
archive: false # Upload as a single, browser-openable file (no zip)
retention-days: 30

- name: Upload HTML report to Azure
id: upload-report
# The triggering workflow ran on a pull_request event, but workflow_run.pull_requests is
# empty for PRs from forks, so resolve the number from the head repo + branch instead.
- name: Resolve PR number
if: ${{ github.event.workflow_run.event == 'pull_request' }}
id: pr
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REPORT_DIR='run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}'
azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR"
REPORT_URL="https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html"
echo "Report url: $REPORT_URL"
echo "reportUrl=$REPORT_URL" >> "$GITHUB_OUTPUT"
NUMBER=$(gh pr view --repo "${{ github.repository }}" \
"${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }}" \
--json number --jq '.number' 2>/dev/null || true)
echo "number=$NUMBER" >> "$GITHUB_OUTPUT"

- name: Post report comment to PR
if: ${{ steps.pr.outputs.number }}
uses: actions/github-script@v8
env:
AZCOPY_AUTO_LOGIN_TYPE: AZCLI
HTML_REPORT_URL: ${{ steps.upload-report.outputs.artifact-url }}
PR_NUMBER: ${{ steps.pr.outputs.number }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { postReportComment } = require('./tests/config/postReportComment');
await postReportComment({
github,
context,
core,
reportFile: process.env.MARKDOWN_OUTPUT_FILE,
prNumber: +process.env.PR_NUMBER,
reportUrl: process.env.HTML_REPORT_URL,
});

- name: Publish Report URL as Commit Status
uses: actions/github-script@v9
Expand All @@ -64,6 +85,6 @@ jobs:
repo: context.repo.repo,
sha: '${{ github.event.workflow_run.head_sha }}',
state: 'success',
target_url: '${{ steps.upload-report.outputs.reportUrl }}',
target_url: '${{ steps.upload-report.outputs.artifact-url }}',
context: 'HTML Report (${{ github.event.workflow_run.name }})',
});
4 changes: 2 additions & 2 deletions .github/workflows/merge.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
testDir: '../../tests',
reporter: [[require.resolve('../../tests/config/ghaMarkdownReporter')], ['html']]
};
reporter: [[require.resolve('../../tests/config/markdownReporter')], ['html']],
};
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🎭 Playwright

[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-150.0.7871.24-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-151.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-26.5-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop --> [![Join Discord](https://img.shields.io/badge/join-discord-informational)](https://aka.ms/playwright/discord)
[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-150.0.7871.46-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-151.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-26.5-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop --> [![Join Discord](https://img.shields.io/badge/join-discord-informational)](https://aka.ms/playwright/discord)

## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)

Expand Down Expand Up @@ -296,7 +296,7 @@ The [Playwright VS Code extension](https://marketplace.visualstudio.com/items?it

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium<sup>1</sup> <!-- GEN:chromium-version -->150.0.7871.24<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium<sup>1</sup> <!-- GEN:chromium-version -->150.0.7871.46<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->26.5<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Firefox <!-- GEN:firefox-version -->151.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Expand Down
13 changes: 1 addition & 12 deletions packages/injected/src/injectedScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,9 @@ import type { SelectorEngine, SelectorRoot } from './selectorEngine';
import type { GenerateSelectorOptions } from './selectorGenerator';
import type { ElementText, TextMatcher } from './selectorUtils';
import type { Builtins } from './utilityScript';
import type { ExpectedTextValue, Point, Rect } from '@protocol/structs';


type ExpectedTextValue = {
string?: string,
regexSource?: string,
regexFlags?: string,
matchSubstring?: boolean,
ignoreCase?: boolean,
normalizeWhiteSpace?: boolean,
};

type Point = { x: number, y: number };
type Rect = Point & { width: number, height: number };

export type FrameExpectParams = {
selector?: string,
expression: string,
Expand Down
39 changes: 3 additions & 36 deletions packages/injected/src/storageScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,9 @@

import { parseEvaluationResultValue, serializeAsCallArgument } from '@isomorphic/utilityScriptSerializers';

type NameValue = { name: string, value: string };

type IndexedDBDatabase = {
name: string,
version: number,
stores: {
name: string,
autoIncrement: boolean,
keyPath?: string,
keyPathArray?: string[],
records: {
key?: any,
keyEncoded?: any,
value?: any,
valueEncoded?: any,
}[],
indexes: {
name: string,
keyPath?: string,
keyPathArray?: string[],
multiEntry: boolean,
unique: boolean,
}[],
}[],
};

type SetOriginStorage = {
origin: string,
localStorage: NameValue[],
indexedDB?: IndexedDBDatabase[],
};

export type SerializedStorage = {
localStorage: NameValue[],
indexedDB?: IndexedDBDatabase[],
};
import type { IndexedDBDatabase, OriginStorage, SetOriginStorage } from '@protocol/structs';

export type SerializedStorage = Omit<OriginStorage, 'origin'>;

export class StorageScript {
private _isFirefox: boolean;
Expand Down
6 changes: 1 addition & 5 deletions packages/isomorphic/trace/traceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
*/

import type { StackFrame } from '../stackTrace';

type ClientSideCallMetadata = {
id: number,
stack?: StackFrame[],
};
import type { ClientSideCallMetadata } from '@protocol/structs';

export type SerializedStackFrame = [number, number, number, string];
export type SerializedStack = [number, SerializedStackFrame[]];
Expand Down
8 changes: 4 additions & 4 deletions packages/playwright-core/browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"browsers": [
{
"name": "chromium",
"revision": "1229",
"revision": "1231",
"installByDefault": true,
"browserVersion": "150.0.7871.24",
"browserVersion": "150.0.7871.46",
"title": "Chrome for Testing"
},
{
"name": "chromium-headless-shell",
"revision": "1229",
"revision": "1231",
"installByDefault": true,
"browserVersion": "150.0.7871.24",
"browserVersion": "150.0.7871.46",
"title": "Chrome Headless Shell"
},
{
Expand Down
Loading
Loading