Skip to content

[input-date-picker] faulty element visibility assertion #10490

@maxpatiiuk

Description

@maxpatiiuk

Priority impact

p - low

Test type

incomplete test

Which Component(s)

input-date-picker

Unstable Tests

The following input-date-picker test is supposevely checking whether the date-picker calendar wrapper is open:

const wrapper = await page.waitForFunction(
(calendarWrapperClass: string) =>
document.querySelector("calcite-input-date-picker").shadowRoot.querySelector(`.${calendarWrapperClass}`),
{},
CSS.calendarWrapper,
);
expect(await wrapper.isIntersectingViewport()).toBe(true);

However, it appears that this test condition is passing even if the date-picker wrapper is not open. (e.g if I move this assertion to be before await input.click();, it still passes).

TODO:

  • Improve this assertion (or add this.open check)?
  • Evaluate other places that may be similarly effected

Test error, if applicable

No response

PR skipped, if applicable

No response

Additional Info

No response

Metadata

Metadata

Labels

needs milestonePlanning workflow - pending milestone assignment, has priority and/or estimate.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