Skip to content

Commit

Permalink
unbreak help inline
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-CoreyArcher committed Sep 20, 2024
1 parent d31f016 commit e2df3ac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ export class SkyRadioGroupHarness extends SkyComponentHarness {
* Gets the help popover content.
*/
public async getHelpPopoverContent(): Promise<string | undefined> {
return await (await this.#getHelpInline()).getPopoverContent();
const content = await (await this.#getHelpInline()).getPopoverContent();

/* istanbul ignore if */
if (typeof content === 'object') {
throw Error('Unexpected template ref');
}

return content;
}

/**
Expand Down
9 changes: 8 additions & 1 deletion libs/components/forms/testing/src/radio/radio-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ export class SkyRadioHarness extends SkyComponentHarness {
* Gets the help popover content.
*/
public async getHelpPopoverContent(): Promise<string | undefined> {
return await (await this.#getHelpInline()).getPopoverContent();
const content = await (await this.#getHelpInline()).getPopoverContent();

/* istanbul ignore if */
if (typeof content === 'object') {
throw Error('Unexpected template ref');
}

return content;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { HarnessPredicate } from '@angular/cdk/testing';
import { TemplateRef } from '@angular/core';
import { SkyComponentHarness } from '@skyux/core/testing';
import {
SkyPopoverContentHarness,
Expand Down Expand Up @@ -104,7 +105,9 @@ export class SkyHelpInlineHarness extends SkyComponentHarness {
/**
* Gets the help popover content.
*/
public async getPopoverContent(): Promise<string | undefined> {
public async getPopoverContent(): Promise<
TemplateRef<unknown> | string | undefined
> {
return (await this.#getPopoverHarnessContent())?.getBodyText();
}

Expand Down

0 comments on commit e2df3ac

Please sign in to comment.