Identifying attribute changes aren't recognized anymore
beatngu13 opened this issue · 7 comments
Similar to #295, this appears to be a regression for which we don't have tests.
Steps to reproduce:
- Execute e.g.
CenterTestIT
and verify it passes locally - Change the ID (e.g. from
id="center"
toid="foo"
) of the<div>
in lines 35 – 37 fromsrc/test/resources/pages/centered.html
- Run the test again, it passes (although it should fail)
Should be addressed with retest/recheck#343 in recheck 1.3.1.
I don't see, how this should be fixed. All the changes in retest/recheck#343 are for InsertedDeletedDifferences and not IdentifyingAttributeDifferences...
We really need tests for both behaviours!
After checking with recheck-1.3.0-beta.1, it should be an issue only with CenterTestIT
and how it's JavaScript code modifies the div
in question.
Modifying only one of either Line 25 or Line 35 with the id
from id="center"
to id="foo"
results in a bunch of inserted and deleted elements (at least).
Modifying both to accommodate the same change, the id
change is correctly captured.
So what is your conclusion?
Yes, since the JavaScript modifies the text within the div
Element to a textNode
, br
and textNode
.
When only one id changes, the JavaScript cannot execute anymore and there is only text
left inside the div
. recheck is not able to identify a more or less simple innerHTML
change (at least I assume that this is happening).
This should be especially the case, if I only change Line 25 to "foo". I would then assume, that recheck is able to identify the element (since it has the same id) but gather a innerHTML
change. What instead happens is as follows:
1 check(s) in 'de.retest.web.it.CenterTestIT' found the following difference(s):
Test 'testCenter' has 7 difference(s) in 1 state(s):
open resulted in:
html[1]/body[1]/div[1] was deleted!
html[1]/body[1]/div[1]/textnode[1] was deleted!
html[1]/body[1]/div[1]/textnode[2] was deleted!
html[1]/body[1] was deleted!
html[1]/body[1]/div[1] was inserted!
html[1]/body[1]/div[1]/br[1] was deleted!
html[1]/body[1] was inserted!
I assume this is a new/different issue, right?