Closed gendeld closed 4 years ago
It seems that the enterValue method will have different effects in unit tests than in e2e tests.
Given input value of Hello after doing enterValue("World!") unit tests will produce input value of "World!" while e2e test will produce "Hello World!"
In jsdom-react we receive value and use Simulate.change to replace the input’s value to value
In puppeteer we use type and in protractor/selenium we use sendKeys , all of which will append value to the current input’s value
hey @gendeld interesting catch I think that the best thing to do here is reset pupetter and not append to JSdom I guess enterValue is ambiguous on this behaviour and maybe setValue is better here
It seems that the enterValue method will have different effects in unit tests than in e2e tests.
Given input value of Hello after doing enterValue("World!") unit tests will produce input value of "World!" while e2e test will produce "Hello World!"
In jsdom-react we receive value and use Simulate.change to replace the input’s value to value
In puppeteer we use type and in protractor/selenium we use sendKeys , all of which will append value to the current input’s value