Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(components/datetime): add missing harness exports (#3079) #3080

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,21 @@ describe('Basic datepicker demo', () => {
});

await datepickerHarness.clickCalendarButton();
const calendarHarness = await datepickerHarness.getDatepickerCalendar();
let calendarHarness = await datepickerHarness.getDatepickerCalendar();

await calendarHarness.clickDate('Friday, October 5th 2001');

const datepickerInputHarness = await datepickerHarness.getControl();

await expectAsync(datepickerInputHarness.getValue()).toBeResolvedTo(
'10/05/2001',
);

await datepickerHarness.clickCalendarButton();

calendarHarness = await datepickerHarness.getDatepickerCalendar();
await calendarHarness.clickDate('Saturday, October 13th 2001');

await expectAsync(
inputHarness.hasCustomFormError('invalidWeekend'),
).toBeResolvedTo(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export class SkyDatepickerCalendarHarness extends SkyComponentHarness {
}

/**
* Clicks the specified date, month or year.
* @params the specified value to click, in the following format
* Clicks the specified date, month or year in the following format
* day format: dddd, MMMM Do YYYY
* month format: MMMM YYYY
* year format: YYYY
Expand Down Expand Up @@ -94,7 +93,7 @@ export class SkyDatepickerCalendarHarness extends SkyComponentHarness {
}

/**
* Gets the value of the currently selected calendar item.
* Gets the long date value of the currently selected calendar item.
*/
public async getSelectedValue(): Promise<string | null> {
return await (await this.#getSelected()).getAttribute('aria-label');
Expand Down
2 changes: 2 additions & 0 deletions libs/components/datetime/testing/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ export { SkyDatepickerCalendarHarness } from './modules/datepicker/datepicker-ca
export { SkyDatepickerCalendarHarnessFilters } from './modules/datepicker/datepicker-calendar-harness.filters';
export { SkyDatepickerHarness } from './modules/datepicker/datepicker-harness';
export { SkyDatepickerFilters } from './modules/datepicker/datepicker-harness.filters';
export { SkyDatepickerInputHarness } from './modules/datepicker/datepicker-input-harness';
export { SkyFuzzyDatepickerInputHarness } from './modules/datepicker/fuzzy-datepicker-input-harness';
Loading