Skip to content

Commit 7effaf4

Browse files
pavelfeldmanaslushnikov
authored andcommitted
cherry-pick(#23166): chore: fix file view padding
1 parent ef18287 commit 7effaf4

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

packages/html-reporter/src/chip.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
background-color: var(--color-canvas-subtle);
2222
padding: 0 8px;
2323
border-bottom: none;
24+
margin-top: 24px;
2425
font-weight: 600;
2526
line-height: 38px;
2627
white-space: nowrap;

packages/html-reporter/src/filter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class Filter {
8484
token.push(c);
8585
continue;
8686
}
87-
if (c === ' ') {
87+
if (c === ' ' || c === ':') {
8888
if (token.length) {
8989
result.push(token.join('').toLowerCase());
9090
token = [];
@@ -108,7 +108,7 @@ export class Filter {
108108
if (test.outcome === 'skipped')
109109
status = 'skipped';
110110
const searchValues: SearchValues = {
111-
text: (status + ' ' + test.projectName + ' ' + test.path.join(' ') + ' ' + test.title).toLowerCase(),
111+
text: (status + ' ' + test.projectName + ' ' + test.location.file + ' ' + test.location.line + ' ' + test.path.join(' ') + ' ' + test.title).toLowerCase(),
112112
project: test.projectName.toLowerCase(),
113113
status: status as any,
114114
};

packages/html-reporter/src/imageDiffView.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test('should switch to actual', async ({ mount }) => {
5555
for (let i = 0; i < imageCount; ++i) {
5656
const image = images.nth(i);
5757
const box = await image.boundingBox();
58-
expect(box).toEqual({ x: 400, y: 124, width: 200, height: 200 });
58+
expect(box).toEqual({ x: 400, y: 108, width: 200, height: 200 });
5959
}
6060
});
6161

@@ -70,7 +70,7 @@ test('should switch to expected', async ({ mount }) => {
7070
for (let i = 0; i < imageCount; ++i) {
7171
const image = images.nth(i);
7272
const box = await image.boundingBox();
73-
expect(box).toEqual({ x: 400, y: 124, width: 200, height: 200 });
73+
expect(box).toEqual({ x: 400, y: 108, width: 200, height: 200 });
7474
}
7575
});
7676

@@ -79,5 +79,5 @@ test('should show diff by default', async ({ mount }) => {
7979

8080
const image = component.locator('img');
8181
const box = await image.boundingBox();
82-
expect(box).toEqual({ x: 400, y: 124, width: 200, height: 200 });
82+
expect(box).toEqual({ x: 400, y: 108, width: 200, height: 200 });
8383
});

packages/html-reporter/src/tabbedPane.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
height: 48px;
3434
min-width: 70px;
3535
box-shadow: inset 0 -1px 0 var(--color-border-muted) !important;
36-
margin-bottom: 16px;
3736
}
3837

3938
.tabbed-pane-tab-strip:focus {

packages/html-reporter/src/testCaseView.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
.test-case-duration {
4747
flex: none;
4848
align-items: center;
49-
padding: 0 8px 24px;
49+
padding: 0 8px 8px;
5050
}
5151

5252
.test-case-path {

tests/playwright-test/reporter-html.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ test.describe('labels', () => {
13481348
const result = await runInlineTest({
13491349
'a.test.js': `
13501350
const { expect, test } = require('@playwright/test');
1351-
const tags = ['@smoke:p1', '@issue[123]', '@issue#123', '@$$$', '@tl/dr'];
1351+
const tags = ['@smoke-p1', '@issue[123]', '@issue#123', '@$$$', '@tl/dr'];
13521352
13531353
test.describe('Error Pages', () => {
13541354
tags.forEach(tag => {
@@ -1364,7 +1364,7 @@ test.describe('labels', () => {
13641364
expect(result.passed).toBe(5);
13651365

13661366
await showReport();
1367-
const tags = ['smoke:p1', 'issue[123]', 'issue#123', '$$$', 'tl/dr'];
1367+
const tags = ['smoke-p1', 'issue[123]', 'issue#123', '$$$', 'tl/dr'];
13681368
const searchInput = page.locator('.subnav-search-input');
13691369

13701370
for (const tag of tags) {

0 commit comments

Comments
 (0)