Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(locators): by.cssContainingText now operates on pre-transformed text
Browse files Browse the repository at this point in the history
Previously, the implementation depended on the browser. Now, it will always
operate on the text before text-transform is applied. Closes #1217
  • Loading branch information
juliemr committed Oct 2, 2014
1 parent 12e4101 commit 0858280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/clientsidescripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ functions.findByCssContainingText = function(cssSelector, searchText, using) {
var matches = [];
for (var i = 0; i < elements.length; ++i) {
var element = elements[i];
var elementText = element.innerText || element.textContent;
var elementText = element.textContent || element.innerText;
if (elementText.indexOf(searchText) > -1) {
matches.push(element);
}
Expand Down

1 comment on commit 0858280

@Droogans
Copy link

Choose a reason for hiding this comment

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

I'm working on reproduction steps, but on the onset it seems that passing the css selector '*' to firefox breaks this. I'm already working with Hank about reproducing another issue, so I'll add it to the list of things to do.

Here's the change set we applied to work around the issue https://github.com/Droogans/encore-ui/commit/d73c1722785aa4ac890e7b92a6c559c3a87e8e6b#diff-8c682e23451d2dd30cbb878fc959bdb3R112

Please sign in to comment.