Skip to content

Unable to find an element by: data-testid  #1154

@ApooBG

Description

@ApooBG

I am trying to create a new Jest test (after successfully creating a few simple ones) but for some reason I get this error.
image
code:
image

and inside Home.js I have another render which is called Rules.js and returns this
image

What I want is to get the input and change it to another word ("For") and then userText should be the same as that input. However, for some reason it cannot find the input, when I successfully tested it in another test and also the userText is null, when in the program there is a onChange method in the input which makes the userText equal to that input.

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