diff --git a/curriculum/challenges/english/blocks/lab-currency-converter/67eaa957114d373deb3a9149.md b/curriculum/challenges/english/blocks/lab-currency-converter/67eaa957114d373deb3a9149.md index 7bb7fedc973..ef94e6c4423 100644 --- a/curriculum/challenges/english/blocks/lab-currency-converter/67eaa957114d373deb3a9149.md +++ b/curriculum/challenges/english/blocks/lab-currency-converter/67eaa957114d373deb3a9149.md @@ -147,6 +147,16 @@ Changing the value of the first `select` element should display the new converte ```js const s = await __helpers.prepTestComponent(window.index.CurrencyConverter); + const inp = s.querySelector('input[type="number"]'); + assert.exists(inp); + + await React.act(async () => { + inp.value = 10; + const ev = new Event("change", { bubbles: true, cancelable: false }); + inp[Object.keys(inp).find((k) => k.startsWith("__reactProps"))] + .onChange({...ev, target: inp}); + }); + const nonFormContentBefore = getInnerTextExcept(s, "input,select"); const resultBefore = nonFormContentBefore.match(/(\d+\.\d{2})\s*([A-Z]{3})/); @@ -172,6 +182,16 @@ Changing the value of the second `select` element should display the new convert ```js const s = await __helpers.prepTestComponent(window.index.CurrencyConverter); + const inp = s.querySelector('input[type="number"]'); + assert.exists(inp); + + await React.act(async () => { + inp.value = 10; + const ev = new Event("change", { bubbles: true, cancelable: false }); + inp[Object.keys(inp).find((k) => k.startsWith("__reactProps"))] + .onChange({...ev, target: inp}); + }); + const nonFormContentBefore = getInnerTextExcept(s, "input,select"); const resultBefore = nonFormContentBefore.match(/(\d+\.\d{2})\s*([A-Z]{3})/);