How to press enter in matinputharness unit tests?

Discussão em 'Angular' iniciado por koki, Novembro 30, 2024.

  1. koki

    koki Guest

    I want to submit my input when pressing enter.

    I tried to do it like that:


    input.setvalue('test');

    const result = await input.host();

    await result.sendsKey('enter');

    expect(input.getValue()).toBe('');



    However The test fails with this error:


    Expected testenter to be ''

    Continue reading...

Compartilhe esta Página