EPMRPP-84449 || Added 'skippedIssue'
Summary by CodeRabbit
-
New Features
- Added an optional skippedIssue configuration to control how skipped tests are recorded.
- When skippedIssue is false, skipped tests are recorded with a NOT_ISSUE designation.
-
Tests
- Added tests validating skipped test reporting behavior for skippedIssue true and false.
✏️ Tip: You can customize this high-level summary in your review settings.
Walkthrough
Adds an optional skippedIssue config option and uses it to decide whether to include issue: { issueType: 'NOT_ISSUE' } in the finish payload for SKIPPED test items; tests added to validate both behaviors.
Changes
| Cohort / File(s) | Summary |
|---|---|
Type & Config index.d.ts, lib/commons/config.js |
Added optional skippedIssue?: boolean to the ReportPortal config type and propagated skippedIssue into the calculated client options returned by getClientConfig. |
Client behavior lib/report-portal-client.js |
When finishing a test item with status skipped, attach issue: { issueType: 'NOT_ISSUE' } unless skippedIssue is truthy; finish payload conditional logic added. |
Tests __tests__/report-portal-client.spec.js |
Added two tests mocking finishTestItemPromiseStart to assert payload contains status: 'skipped' and conditionally includes or excludes issue: { issueType: 'NOT_ISSUE' } based on skippedIssue. |
Linting / Scripts .eslintrc, package.json |
Exclude __tests__ from linting via ignorePatterns and simplified lint script to target statistics and lib directories (removed __tests__ from lint scope). |
Sequence Diagram(s)
sequenceDiagram
participant Runner as Test Runner
participant Client as ReportPortal Client
participant RP as ReportPortal API
Note over Runner,Client: A test item finishes with status = SKIPPED
Runner->>Client: finishTestItem(status: "skipped")
alt skippedIssue is false (or undefined)
Client->>Client: include issue { issueType: "NOT_ISSUE" }
else skippedIssue is true
Client->>Client: omit issue field
end
Client->>RP: finishTestItemPromiseStart(payload with/without issue)
RP-->>Client: ACK/response
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
- Review conditional in
lib/report-portal-client.jsfor correct truthiness and payload shape. - Verify
index.d.tsmatches runtime behavior andlib/commons/config.jsreliably surfaces the option. - Confirm tests in
__tests__/report-portal-client.spec.jscorrectly mock and assertfinishTestItemPromiseStartpayload contents.
Poem
A rabbit nudged the config, gave a tiny cheer,
"Skip or not, the payload's clear."
Two tests hopped by to watch the treat,
Issue appears — or skips discreet.
🐇 code hopped neat, and all is clear.
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title directly references the feature added (skippedIssue) and is specific to the main change, though it includes a ticket reference which adds some noise. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
feature/EPMRPP-84449-added-skippedIssue
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between a852998780e20cbe966d032f52bf555f8250349c and 85891ab34f670088d0bc117d554e80d31ce37d0f.
📒 Files selected for processing (2)
.eslintrc(1 hunks)package.json(1 hunks)
🔇 Additional comments (2)
package.json (1)
9-9: Lint script correctly narrows scope to production directories.Removing
__tests__/**/*from the lint script aligns with best practices—test files are now excluded from linting in favor of a dedicated ESLint ignorePatterns configuration (see .eslintrc)..eslintrc (1)
22-22: ignorePatterns correctly configured to exclude test files.The addition of
ignorePatternsensures test files are excluded from linting, reinforcing the package.json script change and following ESLint best practices for separating test and production code linting scopes.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
https://jiraeu.epam.com/browse/EPMRPP-84449