-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Fix nullability annotations on NodeRemoteValue
#16661
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
[dotnet] Fix nullability annotations on NodeRemoteValue
#16661
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
| } | ||
|
|
||
| public sealed record NodeRemoteValue(string? SharedId, NodeProperties? Value) : RemoteValue, ISharedReference | ||
| public sealed record NodeRemoteValue(string SharedId, NodeProperties? Value) : RemoteValue, ISharedReference |
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.
It is nullable: https://w3c.github.io/webdriver-bidi/#cddl-type-scriptnoderemotevalue
I also asked about it here: w3c/webdriver-bidi#868
I don't know how to deal with it.
User description
Fix nullability for
NodeRemoteValue.SharedId.Also add a test for it.
🔄 Types of changes
PR Type
Bug fix, Tests
Description
Fix
NodeRemoteValue.SharedIdnullability from nullable to non-nullableImprove test assertions for
NodeRemoteValuepropertiesAdd helper method to retrieve element IDs for validation
Strengthen test coverage with explicit SharedId verification
Diagram Walkthrough
File Walkthrough
RemoteValue.cs
Fix SharedId nullability to non-nullabledotnet/src/webdriver/BiDi/Script/RemoteValue.cs
NodeRemoteValueconstructor parameterSharedIdfromstring?(nullable) to
string(non-nullable)NodeRemoteValueimplementsISharedReferencewhich requires a valid SharedId
CallFunctionParameterTest.cs
Enhance test assertions and add element ID helperdotnet/test/common/BiDi/Script/CallFunctionParameterTest.cs
using System.Runtime.CompilerServices;for unsafe accessorsupport
CanCallFunctionToGetElement()test with explicit variablecasting and additional assertion for
SharedIdGetElementId()helper method using unsafe accessor toretrieve element IDs for test validation