@@ -13,48 +13,41 @@ import { hbs } from 'ember-cli-htmlbars';
13
13
// it's practically impossible to test in isolation, so in our tests
14
14
// in this file it will be wrapped inside its parent comoponent.
15
15
16
- module (
17
- 'Integration | Component | hds/stepper/nav/panel' ,
18
- function ( hooks ) {
19
- setupRenderingTest ( hooks ) ;
20
-
21
- hooks . beforeEach ( function ( ) {
22
- this . set ( 'createNavPanel' , async ( args = { } ) => {
23
- this . currentStep = args . currentStep ?? undefined ;
24
- return await render ( hbs `
16
+ module ( 'Integration | Component | hds/stepper/nav/panel' , function ( hooks ) {
17
+ setupRenderingTest ( hooks ) ;
18
+
19
+ hooks . beforeEach ( function ( ) {
20
+ this . set ( 'createNavPanel' , async ( args = { } ) => {
21
+ this . currentStep = args . currentStep ?? undefined ;
22
+ return await render ( hbs `
25
23
<Hds::Stepper::Nav @currentStep={{this.currentStep}} as |S|>
26
24
<S.Step></S.Step>
27
25
<S.Panel>
28
26
<div id="test-panel-content">Test</div>
29
27
</S.Panel>
30
28
</Hds::Stepper::Nav>
31
29
` ) ;
32
- } ) ;
33
30
} ) ;
31
+ } ) ;
34
32
35
- // CLASSES
33
+ // CLASSES
36
34
37
- test ( 'it should render the component with a CSS class that matches the component name' , async function ( assert ) {
38
- await render (
39
- hbs `<Hds::Stepper::Nav::Panel data-test="panel-1" />`
40
- ) ;
41
- assert
42
- . dom ( '[data-test="panel-1"]' )
43
- . hasClass ( 'hds-stepper-nav__panel' ) ;
44
- } ) ;
35
+ test ( 'it should render the component with a CSS class that matches the component name' , async function ( assert ) {
36
+ await render ( hbs `<Hds::Stepper::Nav::Panel data-test="panel-1" />` ) ;
37
+ assert . dom ( '[data-test="panel-1"]' ) . hasClass ( 'hds-stepper-nav__panel' ) ;
38
+ } ) ;
45
39
46
- // VISIBILITY
40
+ // VISIBILITY
47
41
48
- test ( 'it sets the panel content to not visible when the @currentStep argument does not match the panel index in the @panelIds argument' , async function ( assert ) {
49
- await this . createNavPanel ( { currentStep : 1 } ) ;
50
- assert . dom ( '.hds-stepper-nav__panel' ) . hasAttribute ( 'hidden' ) ;
51
- assert . dom ( '#test-panel-content' ) . doesNotExist ( ) ;
52
- } ) ;
42
+ test ( 'it sets the panel content to not visible when the @currentStep argument does not match the panel index in the @panelIds argument' , async function ( assert ) {
43
+ await this . createNavPanel ( { currentStep : 1 } ) ;
44
+ assert . dom ( '.hds-stepper-nav__panel' ) . hasAttribute ( 'hidden' ) ;
45
+ assert . dom ( '#test-panel-content' ) . doesNotExist ( ) ;
46
+ } ) ;
53
47
54
- test ( 'it sets the panel content to visible when the @currentStep argument matches the panel index in the @panelIds argument' , async function ( assert ) {
55
- await this . createNavPanel ( { currentStep : 0 } ) ;
56
- assert . dom ( '.hds-stepper-nav__panel' ) . hasNoAttribute ( 'hidden' ) ;
57
- assert . dom ( '#test-panel-content' ) . exists ( ) ;
58
- } ) ;
59
- }
60
- ) ;
48
+ test ( 'it sets the panel content to visible when the @currentStep argument matches the panel index in the @panelIds argument' , async function ( assert ) {
49
+ await this . createNavPanel ( { currentStep : 0 } ) ;
50
+ assert . dom ( '.hds-stepper-nav__panel' ) . hasNoAttribute ( 'hidden' ) ;
51
+ assert . dom ( '#test-panel-content' ) . exists ( ) ;
52
+ } ) ;
53
+ } ) ;
0 commit comments