Skip to content

Commit

Permalink
Merge pull request #1333 from GSA/stepper-1329
Browse files Browse the repository at this point in the history
1329: Fix issue with stepper
  • Loading branch information
cwolf10 authored Oct 17, 2023
2 parents a91fce9 + 8146fb2 commit 38c2796
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libs/documentation/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'core-js/es7/reflect';
import 'core-js/es/reflect';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ describe('SdsStepperComponent', () => {

it('Should create with expected steps', () => {
expect(stepper).toBeDefined();
expect(stepper.stepTemplates.toArray()[1].children.length).toEqual(0);
expect(stepper.flatSteps.length).toEqual(2);
expect(stepper.stepTemplates.toArray()[1].children.length).toEqual(1);
expect(stepper.flatSteps.length).toEqual(3);
expect(stepper.currentStepId).toEqual('step1');

const validSteps = fixture.debugElement.queryAll(By.css('.bi sds-check'));
Expand Down Expand Up @@ -262,7 +262,7 @@ describe('SdsStepperComponent', () => {
'Should jump to step 1 when clicking from side navigation',
waitForAsync(() => {
const sidenavLinks = fixture.debugElement.queryAll(By.css('li a'));
sidenavLinks[2]?.triggerEventHandler('click', null);
sidenavLinks[2].triggerEventHandler('click', null);
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(stepper.currentStepId).toEqual('step1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class SdsStepComponent {
/**
* References to Any children this step might contain
*/
@ContentChildren('SdsStepComponent') children: QueryList<SdsStepComponent>;
@ContentChildren(forwardRef(() => SdsStepComponent)) children: QueryList<SdsStepComponent>;

/**
* Content of step - either a formly field or custome template
Expand Down

0 comments on commit 38c2796

Please sign in to comment.