Skip to content

Commit

Permalink
UI: update host to new doc link location (developer.hashicorp.com/) (#…
Browse files Browse the repository at this point in the history
…18374)

* change host for doc link

* add todo to LearnLink

* add changelog
  • Loading branch information
hellobontempo authored and AnPucel committed Jan 14, 2023
1 parent fdc2d13 commit 2f1e8f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/18374.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: update DocLink component to use new host url: developer.hashicorp.com
```
2 changes: 1 addition & 1 deletion ui/lib/core/addon/components/doc-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ExternalLink from './external-link';
*
*/
export default class DocLinkComponent extends ExternalLink {
host = 'https://www.vaultproject.io';
host = 'https://developer.hashicorp.com';

get href() {
return `${this.host}${this.args.path}`;
Expand Down
1 change: 1 addition & 0 deletions ui/lib/core/addon/components/learn-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ExternalLink from './external-link';
*
*/

// TODO update host to 'https://developer.hashicorp.com' once updated paths are established
export default class LearnLinkComponent extends ExternalLink {
host = 'https://learn.hashicorp.com';

Expand Down
4 changes: 3 additions & 1 deletion ui/tests/integration/components/form-field-label-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module('Integration | Component | form-field-label', function (hooks) {
assert.dom('a').doesNotExist('docLink hidden when not provided');
this.set('docLink', '/doc/path');
assert.dom('.sub-text').includesText('See our documentation for help', 'Doc link text renders');
assert.dom('a').hasAttribute('href', 'https://www.vaultproject.io' + this.docLink, 'Doc link renders');
assert
.dom('a')
.hasAttribute('href', 'https://developer.hashicorp.com' + this.docLink, 'Doc link renders');
});
});

0 comments on commit 2f1e8f8

Please sign in to comment.