Skip to content

SendKeys synchronicity problem during Github CI tests #2881

Open
@remischwartz

Description

@remischwartz

Hi,

I have a date input custom element that I am testing using sendKeys.
Here is an extract of the tests :

it('should update the value after user input', async () => {
  const el = await fixture<DSAInput>(
    html` <dsa-input type="date" required lang="fr-FR"></dsa-input> `
  );

  el.focus();
  await el.updateComplete;
  await sendKeys({ type: '25' });
  await sendKeys({ type: '10' });
  await sendKeys({ type: '2024' });
  await sendKeys({ press: 'Tab' });
  await el.updateComplete;

  expect(el.value).to.equal('2024-10-25');
});

The tests pass OK in local, but I get the following error when it is performed as part of my Github CI.

Image

This looks like a sync problem.

Have you ever observed similar issues with sendKeys ?
Is there a way to add a delay between each key press ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions