New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return in draw mask if mask canvas not defined #4227
Conversation
WalkthroughThe update across various files enhances the Playwright test suite and overlay functionality. It includes adjustments to Playwright rules, improvements in element visibility checks, and new tests for detection masks and entry count text validation. These changes aim to enhance testing reliability and maintainability in the e2e testing setup. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (1)
- app/packages/looker/src/overlays/detection.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- app/packages/looker/src/overlays/detection.ts
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4227 +/- ##
===========================================
+ Coverage 27.99% 28.23% +0.24%
===========================================
Files 814 813 -1
Lines 101640 101849 +209
Branches 1178 1214 +36
===========================================
+ Hits 28456 28761 +305
+ Misses 73184 73088 -96
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, LGTM 🚀
If you have a moment, I wouldn't object to adding the below to a new/existing e2e test
sample = dataset.first()
sample["ground_truth"] = fo.Detections(
detections=[
fo.Detection(
label="bad_mask_detection",
bounding_box=[0.0, 0.0, 0.0, 0.0],
mask=np.empty((0, 0)),
),
]
)
sample.save()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: .coderabbit.yaml
Files ignored due to path filters (2)
e2e-pw/package.json
is excluded by!**/*.json
e2e-pw/yarn.lock
is excluded by!**/*.lock
,!**/*.lock
Files selected for processing (5)
- e2e-pw/.eslintrc.js (1 hunks)
- e2e-pw/README.md (1 hunks)
- e2e-pw/src/oss/poms/selector.ts (1 hunks)
- e2e-pw/src/oss/specs/overlays/detection-mask.spec.ts (1 hunks)
- e2e-pw/src/oss/specs/smoke-tests/quickstart.spec.ts (1 hunks)
Additional Context Used
Path-based Instructions (3)
e2e-pw/src/oss/poms/selector.ts (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.e2e-pw/src/oss/specs/overlays/detection-mask.spec.ts (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.e2e-pw/src/oss/specs/smoke-tests/quickstart.spec.ts (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
Additional comments not posted (5)
e2e-pw/.eslintrc.js (1)
13-14
: Monitor the issue with the"playwright/no-standalone-expect"
rule and re-enable it once the false positives are resolved to maintain code quality.e2e-pw/src/oss/poms/selector.ts (1)
57-61
: The refactoring to usetoBeVisible()
for visibility checks aligns with Playwright best practices and enhances test readability and reliability.e2e-pw/src/oss/specs/overlays/detection-mask.spec.ts (1)
1-57
: The test suite is well-structured and aligns with the PR objectives, effectively testing the detection mask functionality with appropriate setup and assertions.e2e-pw/src/oss/specs/smoke-tests/quickstart.spec.ts (1)
31-32
: Refactoring the assertion to usegrid.assert.isEntryCountTextEqualTo
improves the readability and maintainability of the test.e2e-pw/README.md (1)
10-11
: The note about updating browser binaries after upgrading Playwright is important for maintaining a functional e2e testing setup and should be followed to prevent compatibility issues.
What changes are proposed in this pull request?
DetectionOverlay::canvas
is only defined ifDetectionOverlay::label::mask
is defined. This PR adds a return statement inDetectionOverlay::drawMask()
ifcanvas
is undefined.To repro:
Error before change:
After change:
Summary by CodeRabbit
SelectorAsserter
class to enhance readability and potentially improve test reliability.quickstart
test of thequickstart
suite.