Skip to content

Commit

Permalink
test(component): ensure proper element selector
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Dec 27, 2022
1 parent 2b28459 commit f7263ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/CalculatorContainer/EntryScreen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ describe("Component: CalculatorContainer/EntryScreen", () => {
"valueToDisplay": "0"
}
})
const calculatorScreen = wrapper.find("input.entry-screen").element as HTMLInputElement
const calculatorScreen = wrapper.find(".entry-screen")
const calculatorScreenInitialValue = wrapper.props("valueToDisplay")
expect(calculatorScreen.value).toEqual(String(calculatorScreenInitialValue))
expect(calculatorScreen.text()).toEqual(String(calculatorScreenInitialValue))

await wrapper.setProps({
"valueToDisplay": "1"
})
expect(calculatorScreen.value).toEqual("1")
expect(calculatorScreen.text()).toEqual("1")
})
})

0 comments on commit f7263ef

Please sign in to comment.