aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dom_tests/dom_tests.coffee11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index bb09a0a8..8c2b73c3 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -156,6 +156,9 @@ context "Alphabetical link hints",
assert.equal "", hintMarkers[0].style.display
context "Filtered link hints",
+ # Note. In all of these tests, the order of the elements returned by getHintMarkers() may be different from
+ # the order they are listed in the test HTML content. This is because LinkHints.activateMode() sorts the
+ # elements.
setup ->
stub settings.values, "filterLinkHints", true
@@ -205,8 +208,8 @@ context "Filtered link hints",
should "label the images", ->
hintMarkers = getHintMarkers()
assert.equal "1: alt text", hintMarkers[0].textContent.toLowerCase()
- assert.equal "2: alt text", hintMarkers[1].textContent.toLowerCase()
- assert.equal "3: some title", hintMarkers[2].textContent.toLowerCase()
+ assert.equal "2: some title", hintMarkers[1].textContent.toLowerCase()
+ assert.equal "3: alt text", hintMarkers[2].textContent.toLowerCase()
assert.equal "4", hintMarkers[3].textContent.toLowerCase()
context "Input hints",
@@ -228,9 +231,9 @@ context "Filtered link hints",
hintMarkers = getHintMarkers()
assert.equal "1", hintMarkers[0].textContent.toLowerCase()
assert.equal "2", hintMarkers[1].textContent.toLowerCase()
- assert.equal "3", hintMarkers[2].textContent.toLowerCase()
+ assert.equal "3: a label", hintMarkers[2].textContent.toLowerCase()
assert.equal "4: a label", hintMarkers[3].textContent.toLowerCase()
- assert.equal "5: a label", hintMarkers[4].textContent.toLowerCase()
+ assert.equal "5", hintMarkers[4].textContent.toLowerCase()
context "Input focus",