diff --git a/packages/playwright-core/src/web/htmlReport/htmlReport.css b/packages/playwright-core/src/web/htmlReport/htmlReport.css index 33c6194b81..e0b215bc53 100644 --- a/packages/playwright-core/src/web/htmlReport/htmlReport.css +++ b/packages/playwright-core/src/web/htmlReport/htmlReport.css @@ -177,8 +177,6 @@ svg { .test-case-title { flex: none; - display: flex; - align-items: center; padding: 10px; font-weight: 400; font-size: 32px !important; @@ -187,9 +185,14 @@ svg { .test-case-location { flex: none; - display: flex; align-items: center; - padding: 0 10px 10px; + padding: 0 10px 20px; +} + +.test-case-path { + flex: none; + align-items: center; + padding: 0 10px; } .test-details-column { diff --git a/packages/playwright-core/src/web/htmlReport/htmlReport.tsx b/packages/playwright-core/src/web/htmlReport/htmlReport.tsx index 44b6e97d5d..258a04147a 100644 --- a/packages/playwright-core/src/web/htmlReport/htmlReport.tsx +++ b/packages/playwright-core/src/web/htmlReport/htmlReport.tsx @@ -152,9 +152,9 @@ const TestFileSummaryView: React.FC<{
{msToString(test.duration)} {statusIcon(test.outcome)} - - {test.title} - — {test.path.join(' › ')} + + {[...test.path, test.title].join(' › ')} + — {test.location.file}:{test.location.line} {report.projectNames.length > 1 && !!test.projectName && } @@ -189,8 +189,9 @@ const TestCaseView: React.FC<{ const [selectedResultIndex, setSelectedResultIndex] = React.useState(0); return
+ {test &&
{test.path.join(' › ')}
} {test &&
{test?.title}
} - {test &&
{test.path.join(' › ')}
} + {test &&
{test.location.file}:{test.location.line}
} {test && !!test.projectName && } {test && ({ @@ -459,9 +460,10 @@ const ProjectLink: React.FunctionComponent<{ const Link: React.FunctionComponent<{ href: string, className?: string, + title?: string, children: any, -}> = ({ href, className, children }) => { - return {children}; +}> = ({ href, className, children, title }) => { + return {children}; }; const Route: React.FunctionComponent<{ diff --git a/packages/playwright-test/src/reporters/html.ts b/packages/playwright-test/src/reporters/html.ts index 1cf8103b56..8659ab9eec 100644 --- a/packages/playwright-test/src/reporters/html.ts +++ b/packages/playwright-test/src/reporters/html.ts @@ -305,14 +305,14 @@ class HtmlBuilder { private _processJsonSuite(suite: JsonSuite, fileId: string, projectName: string, path: string[], out: TestEntry[]) { const newPath = [...path, suite.title]; suite.suites.map(s => this._processJsonSuite(s, fileId, projectName, newPath, out)); - suite.tests.forEach(t => out.push(this._createTestEntry(t, fileId, projectName, newPath))); + suite.tests.forEach(t => out.push(this._createTestEntry(t, projectName, newPath))); } - private _createTestEntry(test: JsonTestCase, fileId: string, projectName: string, path: string[]): TestEntry { + private _createTestEntry(test: JsonTestCase, projectName: string, path: string[]): TestEntry { const duration = test.results.reduce((a, r) => a + r.duration, 0); this._tests.set(test.testId, test); const location = test.location; - path = [location.file + ':' + location.line, ...path.slice(1)]; + path = [...path.slice(1)]; this._testPath.set(test.testId, path); return { diff --git a/tests/page/page-request-continue.spec.ts b/tests/page/page-request-continue.spec.ts index 3aca7263b2..6a7836c1fd 100644 --- a/tests/page/page-request-continue.spec.ts +++ b/tests/page/page-request-continue.spec.ts @@ -96,7 +96,7 @@ it('should amend method on main request', async ({ page, server }) => { expect((await request).method).toBe('POST'); }); -it.describe('', () => { +it.describe('post data', () => { it.fixme(({ isAndroid }) => isAndroid, 'Post data does not work'); it('should amend post data', async ({ page, server }) => {