Removes number conversion for dirty input (#878)

Fixes #870

- #870

This regression bug was introduced as part of the refactoring of
typescript.
Here:
- #848

I've added tests to cover the scenario so that it won't happen again,
hopefully.
This commit is contained in:
Harel M
2024-02-07 10:32:19 +02:00
committed by GitHub
parent c84c7a7b96
commit bc5ecfade6
3 changed files with 26 additions and 3 deletions
+19
View File
@@ -280,6 +280,25 @@ describe("layers", () => {
});
});
});
describe("opacity", () => {
let bgId: string;
beforeEach(() => {
bgId = createBackground();
when.click("layer-list-item:background:" + bgId);
when.type("spec-field-input:background-opacity", "0.");
});
it("should keep '.' in the input field", () => {
then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0.");
});
it("should revert to a valid value when focus out", () => {
when.click("layer-list-item:background:" + bgId);
then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue('0');
});
});
});
describe("filter", () => {