-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Returning error instead of throwing when passed wrong index in selector #4071
base: main
Are you sure you want to change the base?
Returning error instead of throwing when passed wrong index in selector #4071
Conversation
Status
|
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.
Missing tests
added test for wrong selector index @gravityvi |
return { | ||
status: errorResult.status, | ||
value: null, | ||
error: errorResult.errorStatus, | ||
message: errorResult.message | ||
}; |
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.
Doing this would also change the flow for the assert.visible()
and expect.element().visible
commands where getting an error is the expected flow.
The expect.element().not.present
here should take a similar flow as assert.not.elementPresent()
which happens to work fine.
Fixes: #3810
Fixes: dikwickley/gsoc24#1
Earlier we used to throw the error if the element is not found by it's CSS selector.
Here are few cases
for
.expect.element().to.not.be.present test
here are some casesThis PR fixes that last case.
Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.
features/my-new-feature
orissue/123-my-bugfix
);