Skip to content

Commit

Permalink
fix anchor test (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Nys committed Sep 10, 2023
1 parent 1680913 commit 66060d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/components/class-field-description.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<span class='access'>deprecated</span>
{{/if}}
{{!-- TODO: Fix this link for a11y --}}
<a class='anchor class-field-description--link' role='link' {{on 'click' (fn this.updateAnchor @field.name)}} {{!-- template-lint-disable link-href-attributes --}}>
<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 --}}>
{{svg-jar 'link' width='20px' height='20px'}}
</a>
</h3>
Expand Down
4 changes: 3 additions & 1 deletion tests/acceptance/anchors-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module('Acceptance | Creating Anchors', function (hooks) {
await click(element);
assert.equal(
currentURL(),
`/ember/1.0/classes/Container/properties?anchor=${element.innerText.trim()}`
`/ember/1.0/classes/Container/properties?anchor=${element.getAttribute(
'data-test-anchor'
)}`
);
});
});

0 comments on commit 66060d6

Please sign in to comment.