Skip to content

Commit 000eef1

Browse files
author
Lukas Nys
committed
fix anchor test (#882)
1 parent 544dab0 commit 000eef1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/components/class-field-description.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<span class='access'>deprecated</span>
1717
{{/if}}
1818
{{!-- TODO: Fix this link for a11y --}}
19-
<a class='anchor class-field-description--link' role='link' {{on 'click' (fn this.updateAnchor @field.name)}} {{!-- template-lint-disable link-href-attributes --}}>
19+
<a class='anchor class-field-description--link' data-test-anchor="{{@field.name}}" role='link' {{on 'click' (fn this.updateAnchor @field.name)}} {{!-- template-lint-disable link-href-attributes --}}>
2020
{{svg-jar 'link' width='20px' height='20px'}}
2121
</a>
2222
</h3>

tests/acceptance/anchors-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ module('Acceptance | Creating Anchors', function (hooks) {
1111
await click(element);
1212
assert.equal(
1313
currentURL(),
14-
`/ember/1.0/classes/Container/properties?anchor=${element.innerText.trim()}`
14+
`/ember/1.0/classes/Container/properties?anchor=${element.getAttribute(
15+
'data-test-anchor'
16+
)}`
1517
);
1618
});
1719
});

0 commit comments

Comments
 (0)