Skip to content
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The full list of available options presented below.
| includeTestSteps | Optional | false | Allows you to see the test steps at the log level. |
| includePlaywrightProjectNameToCodeReference | Optional | false | Includes Playwright project name to code reference. See [`testCaseId and codeRef calculation`](#setTestCaseId). It may be useful when you want to see the different history for the same test cases within different playwright projects. |
| extendTestDescriptionWithLastError | Optional | true | If set to `true` the latest error log will be attached to the test case description. |
| skipProjectInSuiteStructure | Optional | false | If set to `true` the Playwright 'project' level (like 'chromium') is excluded from ReportPortal Suite structure. Eliminates extra folding. |
| uploadVideo | Optional | true | Whether to attach the Playwright's [video](https://playwright.dev/docs/api/class-testoptions#test-options-video) to the test case. |
| uploadTrace | Optional | true | Whether to attach the Playwright's [trace](https://playwright.dev/docs/api/class-testoptions#test-options-trace) to the test case. |
| token | Deprecated | Not set | Use `apiKey` instead. |
Expand Down
1 change: 1 addition & 0 deletions src/models/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface ReportPortalConfig extends ClientConfig, AttachmentsConfig {
rerun?: boolean;
rerunOf?: string;
mode?: LAUNCH_MODES;
skipProjectInSuiteStructure?: boolean?

// agent specific options
skippedIssue?: boolean;
Expand Down
8 changes: 7 additions & 1 deletion src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,13 @@ export class RPReporter implements Reporter {
}

createSuitesOrder(suite: PWSuite, suitesOrder: PWSuite[]): void {
if (!suite?.title) {
const { skipProjectInSuiteStructure } = this.config
const shouldSkipProjectNameInReportStructure =
skipProjectInSuiteStructure ||
!!process.env.EXCLUDE_PROJECT_FROM_STRUCTURE
? !suite?.location
: false;
if (!suite?.title || shouldSkipProjectNameInReportStructure ) {
return;
}
suitesOrder.push(suite);
Expand Down