Skip to content
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

Support for Color API #1117

Merged
merged 6 commits into from
Mar 10, 2020
Merged

Support for Color API #1117

merged 6 commits into from
Mar 10, 2020

Conversation

saikrishna321
Copy link
Member

Fixes #1032

Copy link
Member

@BugDiver BugDiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saikrishna321 Few scenarios which I think can be addressed

  • Using select with no parameter throws an exception which is not user-friendly
Thrown:
Cannot destructure property `stack` of 'undefined' or 'null'.
  • Using select with invalid color code (hashcode or rgb/rgba) returns success but it does not select the color since it's invalid
> c.select('asda')
 ✔ Selected asda
> c.select('rgb()')
 ✔ Selected rgb()
> c.select('rgb(asdsd)')
 ✔ Selected rgb(asdsd)

@saikrishna321
Copy link
Member Author

  • Using select with no parameter throws an exception which is not user-friendly

@BugDiver What error message would you recommend?

@zabil
Copy link
Member

zabil commented Mar 9, 2020

  • Using select with no parameter throws an exception which is not user-friendly

@BugDiver What error message would you recommend?

The color code <code> is invalid. Please pass a valid HTML color code.

@BugDiver
Copy link
Member

BugDiver commented Mar 9, 2020

Also, about

  • Using select with invalid color code (hashcode or rgb/rgba) returns success but it does not select the color since it's invalid

I'm not sure if it's possible but if we could validate that the given input is a valid color code that would great.

For Ex:

.select('zzzcsc')
 X The color code 'zzzcsc' is invalid. Please pass a valid HTML color code.

@BugDiver BugDiver removed request for zabil and sriv March 10, 2020 04:46
@BugDiver BugDiver merged commit ff81d8e into getgauge:master Mar 10, 2020
@saikrishna321 saikrishna321 deleted the fix-1032 branch March 11, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add API for color input type
3 participants