Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/element-ng/wizard/si-wizard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
<button
type="button"
class="btn btn-primary save"
[class.end]="hideNavigation()"
[disabled]="!currentStep?.isValid() || !currentStep?.isNextNavigable()"
(click)="save()"
>{{ saveText() | translate }}</button
Expand Down
13 changes: 13 additions & 0 deletions projects/element-ng/wizard/si-wizard.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,19 @@ describe('SiWizardComponent', () => {
expect(element.querySelector('.wizard-btn-container .back')).toBeFalsy();
expect(element.querySelector('.wizard-btn-container .next')).toBeFalsy();
});

it('should align save button to end on last step when navigation is hidden', async () => {
hostComponent.inlineNavigation = false;
await runOnPushChangeDetection(fixture);

// Navigate to the last step
component.next(hostComponent.steps.length - 1);
await runOnPushChangeDetection(fixture);

const saveButton = element.querySelector('.btn.save');
expect(saveButton).toBeTruthy();
expect(saveButton).toHaveClass('end');
});
});

describe('navigation buttons in footer', () => {
Expand Down