Conversation
📝 WalkthroughWalkthroughRemoved the generic ExamplesTable→ScreenshotConfiguration converter and its concrete implementations/tests; migrated factories and consumer APIs to accept a nullable Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
vividus-plugin-mobile-app/src/test/java/org/vividus/ui/mobileapp/screenshot/MobileAppScreenshotParametersFactoryTests.java (1)
38-82: Consider adding test coverage for emptyExamplesTablerows.The tests cover the scenario where
ExamplesTable.getRowsAs()returns a single configuration and whereExamplesTableisnull, but there's no test for when the table has no rows (empty list). This edge case may be worth covering to ensure the factory handles it gracefully.
🤖 Fix all issues with AI agents
In
`@vividus-extension-selenium/src/test/java/org/vividus/ui/screenshot/AbstractScreenshotParametersFactoryTests.java`:
- Around line 96-99: In the ExamplesTable literal assigned to
screenshotConfiguration in AbstractScreenshotParametersFactoryTests.java there
is a stray "|);" fragment causing a syntax error; remove the erroneous ")"; so
the multi-line text uses proper pipes and ends with the closing triple-quote
immediately after the last row (e.g., "| 1 | 5 | 2 | 3
|" then closing """), ensuring the ExamplesTable(...) call and the
screenshotConfiguration variable compile correctly.
- Around line 84-89: The ExamplesTable literal in
AbstractScreenshotParametersFactoryTests has a stray "');" inside the
triple-quoted string causing a syntax error; edit the variable
screenshotConfiguration so the multi-line string ends with the row values only
(e.g. "| 1 | 10 | 2 | 3 |") and remove the extraneous
");" from inside the string, then leave the subsequent call to
factory.create(screenshotConfiguration, null, createEmptyIgnores()) unchanged.
In
`@vividus-plugin-applitools/src/main/java/org/vividus/visual/eyes/VisualTestingSteps.java`:
- Around line 182-188: Update the Javadoc for
performCheck(List<ApplitoolsVisualCheck>, ExamplesTable screenshotConfiguration)
to remove the WebScreenshotConfiguration-specific column names (e.g.,
webHeaderToCut, nativeHeaderToCut) and instead state that the
screenshotConfiguration is a generic ExamplesTable whose expected columns depend
on the concrete screenshot configuration implementation (or list
general/required keys if any); reference the performCheck method and the
screenshotConfiguration parameter and mention ApplitoolsVisualCheck so readers
know where the table is used.
...lenium/src/test/java/org/vividus/ui/screenshot/AbstractScreenshotParametersFactoryTests.java
Show resolved
Hide resolved
...lenium/src/test/java/org/vividus/ui/screenshot/AbstractScreenshotParametersFactoryTests.java
Show resolved
Hide resolved
vividus-plugin-applitools/src/main/java/org/vividus/visual/eyes/VisualTestingSteps.java
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6417 +/- ##
============================================
- Coverage 97.77% 97.75% -0.02%
- Complexity 7397 7624 +227
============================================
Files 1014 1011 -3
Lines 21405 21399 -6
Branches 1403 1404 +1
============================================
- Hits 20928 20919 -9
- Misses 361 362 +1
- Partials 116 118 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
fca7f6c to
a6a2b44
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@vividus-plugin-web-app/src/test/java/org/vividus/ui/web/screenshot/WebScreenshotParametersFactoryTests.java`:
- Line 105: Replace the inline Map.of(...) call passed to initFactory with the
existing helper createEmptyIgnores() to avoid duplication; specifically, in the
test where initFactory(Map.of(), Map.of(IgnoreStrategy.ELEMENT, Set.of(),
IgnoreStrategy.AREA, Set.of())) is called, pass createEmptyIgnores() for the
second argument (and use the appropriate first argument helper if one exists) so
the test uses the reusable createEmptyIgnores() helper instead of the inline
literal; update the call to initFactory(...) accordingly.
| factory.setShootingStrategy(SIMPLE); | ||
| factory.setScreenshotConfigurations(new PropertyMappedCollection<>(new HashMap<>())); | ||
| factory.setIgnoreStrategies(Map.of(IgnoreStrategy.ELEMENT, Set.of(), IgnoreStrategy.AREA, Set.of())); | ||
| initFactory(Map.of(), Map.of(IgnoreStrategy.ELEMENT, Set.of(), IgnoreStrategy.AREA, Set.of())); |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Nit: reuse createEmptyIgnores() to avoid duplication.
This inline map literal duplicates the existing createEmptyIgnores() helper on Line 56.
♻️ Suggested diff
- initFactory(Map.of(), Map.of(IgnoreStrategy.ELEMENT, Set.of(), IgnoreStrategy.AREA, Set.of()));
+ initFactory(Map.of(), createEmptyIgnores());📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| initFactory(Map.of(), Map.of(IgnoreStrategy.ELEMENT, Set.of(), IgnoreStrategy.AREA, Set.of())); | |
| initFactory(Map.of(), createEmptyIgnores()); |
🤖 Prompt for AI Agents
In
`@vividus-plugin-web-app/src/test/java/org/vividus/ui/web/screenshot/WebScreenshotParametersFactoryTests.java`
at line 105, Replace the inline Map.of(...) call passed to initFactory with the
existing helper createEmptyIgnores() to avoid duplication; specifically, in the
test where initFactory(Map.of(), Map.of(IgnoreStrategy.ELEMENT, Set.of(),
IgnoreStrategy.AREA, Set.of())) is called, pass createEmptyIgnores() for the
second argument (and use the appropriate first argument helper if one exists) so
the test uses the reusable createEmptyIgnores() helper instead of the inline
literal; update the call to initFactory(...) accordingly.
a6a2b44 to
1855961
Compare
|



Summary by CodeRabbit
New Features
Bug Fixes
Chores
Documentation