22 * Copyright (c) HashiCorp, Inc.
33 * SPDX-License-Identifier: MPL-2.0
44 */
5-
65import { module , test } from ' qunit' ;
7- import { setupRenderingTest } from ' showcase/tests/helpers' ;
86import { render , resetOnerror , setupOnerror } from ' @ember/test-helpers' ;
9- import HomeLink from " @hashicorp/design-system-components/components/hds/side-nav/header/home-link" ;
7+
8+ import { HdsSideNavHeaderHomeLink } from ' @hashicorp/design-system-components/components' ;
9+
10+ import { setupRenderingTest } from ' showcase/tests/helpers' ;
1011
1112module (' Integration | Component | hds/side-nav/home-link' , function (hooks ) {
1213 setupRenderingTest (hooks );
@@ -17,7 +18,13 @@ module('Integration | Component | hds/side-nav/home-link', function (hooks) {
1718
1819 test (' it should render the component with a CSS class that matches the component name' , async function (assert ) {
1920 await render (
20- <template ><HomeLink @ icon =" hashicorp" @ ariaLabel =" Hashicorp" id =" test-home-link" /></template >,
21+ <template >
22+ <HdsSideNavHeaderHomeLink
23+ @ icon =" hashicorp"
24+ @ ariaLabel =" Hashicorp"
25+ id =" test-home-link"
26+ />
27+ </template >,
2128 );
2229 assert .dom (' #test-home-link' ).hasClass (' hds-side-nav__home-link' );
2330 });
@@ -26,7 +33,14 @@ module('Integration | Component | hds/side-nav/home-link', function (hooks) {
2633
2734 test (' it renders the passed in args' , async function (assert ) {
2835 await render (
29- <template ><HomeLink @ icon =" hashicorp" @ ariaLabel =" Hashicorp" @ href =" https://www.hashicorp.com/" id =" test-home-link" /></template >,
36+ <template >
37+ <HdsSideNavHeaderHomeLink
38+ @ icon =" hashicorp"
39+ @ ariaLabel =" Hashicorp"
40+ @ href =" https://www.hashicorp.com/"
41+ id =" test-home-link"
42+ />
43+ </template >,
3044 );
3145 assert .dom (' .hds-icon-hashicorp' ).exists ();
3246 assert
@@ -37,7 +51,14 @@ module('Integration | Component | hds/side-nav/home-link', function (hooks) {
3751
3852 test (' it renders the logo with a custom passed in color' , async function (assert ) {
3953 await render (
40- <template ><HomeLink @ icon =" boundary" @ ariaLabel =" Boundary" @ color =" var(--token-color-boundary-brand)" @ href =" #" /></template >,
54+ <template >
55+ <HdsSideNavHeaderHomeLink
56+ @ icon =" boundary"
57+ @ ariaLabel =" Boundary"
58+ @ color =" var(--token-color-boundary-brand)"
59+ @ href =" #"
60+ />
61+ </template >,
4162 );
4263 assert
4364 .dom (' .hds-icon-boundary' )
@@ -53,7 +74,12 @@ module('Integration | Component | hds/side-nav/home-link', function (hooks) {
5374 setupOnerror (function (error ) {
5475 assert .strictEqual (error .message , ` Assertion Failed: ${errorMessage } ` );
5576 });
56- await render (<template ><HomeLink @ icon =" hashicorp" /></template >);
77+ await render (
78+ <template >
79+ {{! @glint-expect-error - testing invalid component usage }}
80+ <HdsSideNavHeaderHomeLink @ icon =" hashicorp" />
81+ </template >,
82+ );
5783 assert .throws (function () {
5884 throw new Error (errorMessage );
5985 });
0 commit comments