Skip to content

Commit

Permalink
Revert "feat(test): add URL field to annotations for hyperlink disp… (
Browse files Browse the repository at this point in the history
#31259)

…lay (#30665)"
  • Loading branch information
pavelfeldman committed Jun 11, 2024
1 parent b24fd0d commit 732e739
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
18 changes: 2 additions & 16 deletions docs/src/test-api/class-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ import { test, expect } from '@playwright/test';
test('basic test', {
annotation: {
type: 'issue',
description: 'feature tags API',
url: 'https://github.com/microsoft/playwright/issues/23180'
description: 'https://github.com/microsoft/playwright/issues/23180',
},
}, async ({ page }) => {
await page.goto('https://playwright.dev/');
Expand All @@ -98,8 +97,7 @@ Test title.
- `tag` ?<[string]|[Array]<[string]>>
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]> Annotation type, for example `'issue'`.
- `description` ?<[string]> Optional annotation description.
- `url` ?<[string]> Optional for example an issue url.
- `description` ?<[string]> Optional annotation description, for example an issue url.

Additional test details.

Expand Down Expand Up @@ -442,7 +440,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

Additional details for all tests in the group.

Expand Down Expand Up @@ -571,7 +568,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.describe`] for details description.

Expand Down Expand Up @@ -627,7 +623,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>
See [`method: Test.describe`] for details description.
Expand Down Expand Up @@ -681,7 +676,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.describe`] for details description.

Expand Down Expand Up @@ -733,7 +727,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.describe`] for details description.

Expand Down Expand Up @@ -789,7 +782,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.describe`] for details description.

Expand Down Expand Up @@ -847,7 +839,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.describe`] for details description.

Expand Down Expand Up @@ -900,7 +891,6 @@ Group title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.describe`] for details description.

Expand Down Expand Up @@ -1119,7 +1109,6 @@ Test title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.(call)`] for test details description.

Expand Down Expand Up @@ -1225,7 +1214,6 @@ Test title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.(call)`] for test details description.

Expand Down Expand Up @@ -1303,7 +1291,6 @@ Test title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>

See [`method: Test.(call)`] for test details description.

Expand Down Expand Up @@ -1449,7 +1436,6 @@ Test title.
- `annotation` ?<[Object]|[Array]<[Object]>>
- `type` <[string]>
- `description` ?<[string]>
- `url` ?<[string]>
See [`method: Test.(call)`] for test details description.
Expand Down
4 changes: 2 additions & 2 deletions packages/html-reporter/src/testCaseView.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const testCase: TestCase = {
projectName: 'chromium',
location: { file: 'test.spec.ts', line: 42, column: 0 },
annotations: [
{ type: 'annotation', description: 'Annotation text', url: 'example url' },
{ type: 'annotation', description: 'Another annotation text', url: 'Another example url' },
{ type: 'annotation', description: 'Annotation text' },
{ type: 'annotation', description: 'Another annotation text' },
],
tags: [],
outcome: 'expected',
Expand Down
2 changes: 1 addition & 1 deletion packages/html-reporter/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type TestFileSummary = {
stats: Stats;
};

export type TestCaseAnnotation = { type: string, description?: string, url?: string};
export type TestCaseAnnotation = { type: string, description?: string };

export type TestCaseSummary = {
testId: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright/src/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export type FixturesWithLocation = {
fixtures: Fixtures;
location: Location;
};
export type Annotation = { type: string, description?: string, url?: string };
export type Annotation = { type: string, description?: string };

export const defaultTimeout = 30000;

Expand Down
6 changes: 2 additions & 4 deletions packages/playwright/types/test.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2198,8 +2198,7 @@ interface TestFunction<TestArgs> {
* test('basic test', {
* annotation: {
* type: 'issue',
* description: 'feature tags API',
* url: 'https://github.com/microsoft/playwright/issues/23180'
* description: 'https://github.com/microsoft/playwright/issues/23180',
* },
* }, async ({ page }) => {
* await page.goto('https://playwright.dev/');
Expand Down Expand Up @@ -2275,8 +2274,7 @@ interface TestFunction<TestArgs> {
* test('basic test', {
* annotation: {
* type: 'issue',
* description: 'feature tags API',
* url: 'https://github.com/microsoft/playwright/issues/23180'
* description: 'https://github.com/microsoft/playwright/issues/23180',
* },
* }, async ({ page }) => {
* await page.goto('https://playwright.dev/');
Expand Down

0 comments on commit 732e739

Please sign in to comment.