Closed
Bug 1092812
Opened 11 years ago
Closed 11 years ago
Test method assertHighlight is not really asserting if there are nodes highlighted
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Firefox OS Graveyard
Gaia::Contacts
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1088706
People
(Reporter: pedro.cambra, Assigned: pedro.cambra, Mentored)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141101030205
Steps to reproduce:
Run assertHighlight with any string that should be not found, such as:
assertHighlight('LALALA');
Actual results:
Test passes
Expected results:
Test should fail
| Assignee | ||
Updated•11 years ago
|
Mentor: francisco
| Assignee | ||
Comment 1•11 years ago
|
||
Working on this
| Assignee | ||
Comment 2•11 years ago
|
||
This is going to break all tests that were relying blindly on assertHighlight.
Opening a new bug for this
Attachment #8515624 -
Flags: review?(francisco)
| Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
I have been researching a bit about this bug (didn't know you were already working on it) and I can see that your patch makes obvious that the tests are checking anything. What worries me is that searchList.getElementsByClassName(highlightClass) never returns any node, and I don't know why, but it can have something to do with highlighting using clones of the nodes and not the real nodes.
I think tests should be passing once assertHighlight is fixed, because the problem relies on this function.
Flags: needinfo?(pedro.cambra)
| Assignee | ||
Comment 5•11 years ago
|
||
I've opened an additional bug for fixing the tests (referenced above: 1092816).
As you say, searchList.getElementsByClassName(highlightClass) never returns any node. That's because, in the tests (and just there), the highlight span is never added to the text. I was working on that in 1092816
Flags: needinfo?(pedro.cambra)
Comment 6•11 years ago
|
||
I saw you can't assign yourself to bugs so I assigned you. I also set 1092816 as a blocker for this bug. Please feel free to ask if you want to change something else or revert some of these changes I made.
Thanks a lot for your work!
Comment 7•11 years ago
|
||
I've been researching a bit more and I am doing a little refactor of the search tests in this test file because I've seen several worrying issues with them. I will add the refactor to my pull request in bug 1088706.
Comment 8•11 years ago
|
||
we are fixing this on bug 1088706
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Comment 9•11 years ago
|
||
Comment on attachment 8515624 [details] [review]
Adding a check on how much nodes were actually highlighted
Removing the review flag
Attachment #8515624 -
Flags: review?(francisco)
You need to log in
before you can comment on or make changes to this bug.
Description
•