mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Call query selector explicitly after change
Signed-off-by: DmitriyNoa <dmytro.zharkov@gmail.com>
This commit is contained in:
1 parent
4b8ed2de37
commit
02e5ca4555
1 file changed
+3
-3
@@ -104,11 +104,11 @@ describe("<Select />", () => {
|
||||
|
||||
rerender(<Select value={options[1].value} onChange={onChange} options={options} />);
|
||||
|
||||
expect(selectedValueContainer.textContent).toBe(options[1].label);
|
||||
expect(container.querySelector(".Select__single-value").textContent).toBe(options[1].label);
|
||||
|
||||
rerender(<Select value={null} onChange={onChange} options={options} />);
|
||||
|
||||
expect(selectedValueContainer).not.toBeInTheDocument();
|
||||
expect(container.querySelector(".Select__single-value")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should unselect value if no value is passed", async () => {
|
||||
@@ -132,6 +132,6 @@ describe("<Select />", () => {
|
||||
|
||||
rerender(<Select value={null} onChange={onChange} options={options} />);
|
||||
|
||||
expect(selectedValueContainer).not.toBeInTheDocument();
|
||||
expect(container.querySelector(".Select__single-value")).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user