Skip to content

Add snapshot coverage for date-picker styles for when there is an active range selection. #6314

@Elijbet

Description

@Elijbet

Test type

new test

Which Component(s)

date-picker

Unstable Tests

No response

Test error, if applicable

No response

PR skipped, if applicable

Additional Info

Follow up on comment #6216 (comment) ttps://github.com/Esri/calcite-components/pull/6216#discussion_r1082024483 . .

Any JS needs to go into a play function which doesn't work OOTB with custom elements. @benelan will be looking into the play function implementation after v1, so we can add something along these lines:

const selectRangeString = html`
<script>
let weekDays = document.querySelector(".week-days");
weekDays.querySelector("calcite-date-picker-day:first-child").selected = true;
weekDays.querySelector("calcite-date-picker-day:last-child").selected = true;
</script>
`;
export const range_TestOnly = (): string =>
html`<div style="width: 400px">
<calcite-date-picker range></calcite-date-picker>
</div>
${selectRangeString}`;

export const rangeRTL_TestOnly = (): string =>
html`<div style="width: 400px">
<calcite-date-picker dir=“rtl” range></calcite-date-picker>
</div>
${selectRangeString}`;

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - newNew issues that need assignment.needs triagePlanning workflow - pending design/dev review.p - lowIssue is non core or affecting less that 10% of people using the librarytestingIssues related to automated or manual testing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions