Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b166942
feat: introduce new numberinput component
GDamyanov Jul 8, 2026
8d60623
fix: update text keys
GDamyanov Jul 8, 2026
0840e44
fix: lint errors
GDamyanov Jul 8, 2026
a101ccd
test: add test suite
GDamyanov Jul 8, 2026
1711fea
test: add test suite
GDamyanov Jul 8, 2026
eb94d13
test: fix test
GDamyanov Jul 8, 2026
3984464
Merge branch 'main' into number-input
GDamyanov Jul 8, 2026
3cd9f44
fix: remove propagated attribute
GDamyanov Jul 8, 2026
3072196
fix: propagate external label reference
GDamyanov Jul 8, 2026
0e2197b
fix: apply visual spec
GDamyanov Jul 9, 2026
c26861f
fix: apply hc themes
GDamyanov Jul 9, 2026
ad59c41
fix: apply css param
GDamyanov Jul 10, 2026
f163347
fix: apply css param
GDamyanov Jul 10, 2026
ce0c645
fix: apply correct focus styles
GDamyanov Jul 10, 2026
97d1410
fix: address review comment
GDamyanov Jul 17, 2026
e7a0665
fix: address review comment
GDamyanov Jul 17, 2026
f0c7f00
fix: adress review comments
GDamyanov Jul 17, 2026
e3cbb0a
fix: adress review comments
GDamyanov Jul 17, 2026
f8b4add
fix: address review comments
GDamyanov Jul 17, 2026
7b809a6
fix: address review comments
GDamyanov Jul 17, 2026
63c5f4a
fix: address review comments
GDamyanov Jul 17, 2026
74a1366
fix: address review comments
GDamyanov Jul 17, 2026
88d19b7
fix: address review comments
GDamyanov Jul 20, 2026
f231d05
fix: address review comments
GDamyanov Jul 20, 2026
62bd1a8
fix: address review comments
GDamyanov Jul 20, 2026
a8646cf
fix: address review comments
GDamyanov Jul 20, 2026
cfc4ac9
fix: address review comments
GDamyanov Jul 20, 2026
f9dcbec
Merge branch 'main' into number-input
GDamyanov Jul 20, 2026
b2a6a81
fix: register component in react playground
GDamyanov Jul 20, 2026
03306d9
test: add test suites
GDamyanov Jul 27, 2026
edef75d
fix: update value when language is changed in onbeforerendering
GDamyanov Jul 27, 2026
4a68a23
fix: clean value
GDamyanov Jul 27, 2026
647a46e
Merge branch 'main' into number-input
GDamyanov Jul 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/main/cypress/specs/DynamicDateRange.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ describe("DynamicDateRange Last/Next Options", () => {
.should("exist");

cy.get("@stepInput")
.shadow()
.find("[ui5-number-input]")
.shadow()
.find("[ui5-input]")
.shadow()
Expand Down Expand Up @@ -396,6 +398,8 @@ describe("DynamicDateRange Last/Next Options", () => {
.as("stepInput");

cy.get("@stepInput")
.shadow()
.find("[ui5-number-input]")
.shadow()
.find("[ui5-input]")
.shadow()
Expand Down
29 changes: 29 additions & 0 deletions packages/main/cypress/specs/FormSupport.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import Switch from "../../src/Switch.js";
import TextArea from "../../src/TextArea.js";
import TimePicker from "../../src/TimePicker.js";
import Tokenizer from "../../src/Tokenizer.js";
import NumberInput from "../../src/NumberInput.js";

const getFormData = ($form: HTMLFormElement) => {
const formData = new FormData($form);
Expand Down Expand Up @@ -425,6 +426,34 @@ describe("Form support", () => {
.should("be.equal", "multi_input5=&multi_input6=ok&multi_input7=&multi_input7=ok&multi_input8=ok&multi_input8=ok&multi_input9=ok&multi_input10=ok&multi_input11=&multi_input11=ok&multi_input12=ok&multi_input12=ok");
});

it("ui5-number-input in form", () => {
cy.mount(<form method="get">
<NumberInput id="number_input1"></NumberInput>
<NumberInput id="number_input2" value={4}></NumberInput>
<NumberInput id="number_input3" name="number_input3"></NumberInput>
<NumberInput id="number_input4" name="number_input4" value={4}></NumberInput>
<button type="submit">Submits forms</button>
</form>);

cy.get("form")
.then($item => {
$item.get(0).addEventListener("submit", e => e.preventDefault());
$item.get(0).addEventListener("submit", cy.stub().as("submit"));
});

cy.get("button")
.realClick();

cy.get("@submit")
.should("have.been.called");

cy.get("form")
.then($el => {
return getFormData($el.get(0));
})
.should("be.equal", "number_input3=0&number_input4=4");
});

it("ui5-tokenizer in form", () => {
cy.mount(
<form method="get">
Expand Down
52 changes: 52 additions & 0 deletions packages/main/cypress/specs/FormSupportSubmission.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import Slider from "../../src/Slider.js";
import RangeSlider from "../../src/RangeSlider.js";
import Select from "../../src/Select.js";
import Option from "../../src/Option.js";
import NumberInput from "../../src/NumberInput.js";

describe("Form submission with Enter key", () => {

Expand Down Expand Up @@ -735,6 +736,57 @@ describe("Form submission with Enter key", () => {
});
});

describe("NumberInput", () => {
const mountNumberInputForm = () => {
const submit = cy.spy().as("submit");
const change = cy.spy().as("change");

cy.mount(
<form novalidate onSubmit={e => {
e.preventDefault();
submit();
}}>
<NumberInput name="date" onChange={() => change()} />
</form>
);
cy.get("[ui5-number-input]").as("numberInput");

cy.get("@numberInput")
.realClick()
.should("be.focused");
};

const assertChangeCalledBeforeSubmit = () => {
cy.get("@change").then((changeSpy: any) =>
cy.get("@submit").then((submitSpy: any) =>
expect(changeSpy.getCall(0))
.to.have.been.calledBefore(submitSpy.getCall(0))
)
);
};

it("submits form without firing change event when Enter is pressed on empty input", () => {
mountNumberInputForm();

cy.realPress("Enter");

cy.get("@submit").should("have.been.calledOnce");
cy.get("@change").should("not.have.been.called");
});

it("fires change event then submits form when Enter is pressed after typing", () => {
mountNumberInputForm();

cy.realType("25");
cy.realPress("Enter");

cy.get("@submit").should("have.been.calledOnce");
cy.get("@change").should("have.been.calledOnce");

assertChangeCalledBeforeSubmit();
});
});

describe("StepInput", () => {
const mountStepInputForm = () => {
const submit = cy.spy().as("submit");
Expand Down
Loading
Loading