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

Fix for issue #4: convert the color value even with text following it #5

Closed
wants to merge 2 commits into from

Conversation

ianrenauld
Copy link

I saw the same behavior as discussed in issue #4. I believe the issue is that we assume that there will be nothing following the color value, which is not true for me and as seen in the issue.

Added unit tests to cover both rgb and rgba colors with attribute text following it (which happens with webdriverio's getCssProperty).

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a5b5cac on ianrenauld:master into 1f34374 on christian-bromann:master.

@erwinheitzman
Copy link
Contributor

After taking a look at the code, docs and tests I believe that you are using the framework in a way that it's not intended to be used. Anything you put after does not seem to do anything really. @christian-bromann Please correct me if I am wrong on this.

@ianrenauld
Copy link
Author

I believe that @erwinheitzman is correct, I was using the wrong CSS property to get the color and I never realized because the previous versions of rgb2hex were more permissible in handling this bad case. Using the proper CSS property solves my issue and I updated issue #4 to reflect that. It seems perfectly legitimate to reject this PR. Again, many thanks to @erwinheitzman for pointing me in the right direction!

@christian-bromann
Copy link
Owner

Thanks @erwinheitzman , I think I gonna reject this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants