diff --git a/CHANGELOG.md b/CHANGELOG.md index 50967c5..33ca7e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,125 +1,92 @@ # Changelog for angular -## [v0.12.22](https://github.com/modbus2mqtt/angular/tree/v0.12.22) (2025-09-03) +## [v0.12.19](https://github.com/volkmarnissen/angular/tree/v0.12.19) (2025-01-16) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.21...v0.12.22) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.18...v0.12.19) -## [v0.12.21](https://github.com/modbus2mqtt/angular/tree/v0.12.21) (2025-09-03) +## [v0.12.18](https://github.com/volkmarnissen/angular/tree/v0.12.18) (2025-01-15) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.20...v0.12.21) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.17...v0.12.18) -**Merged pull requests:** +## [v0.12.17](https://github.com/volkmarnissen/angular/tree/v0.12.17) (2025-01-02) -- \[Feature\] Add number of processed calls to Modbus Status [\#12](https://github.com/modbus2mqtt/angular/pull/12) ([volkmarnissen](https://github.com/volkmarnissen)) -- \[Feature\] Add number of processed calls to Modbus Status [\#11](https://github.com/modbus2mqtt/angular/pull/11) ([volkmarnissen](https://github.com/volkmarnissen)) -- Update Changelog [\#10](https://github.com/modbus2mqtt/angular/pull/10) ([volkmarnissen](https://github.com/volkmarnissen)) -- \[bug\]Modbus Error Handling, Slave Specification Detection, TCP RTU bridge, Fixes [\#9](https://github.com/modbus2mqtt/angular/pull/9) ([volkmarnissen](https://github.com/volkmarnissen)) -- \[bug\]Modbus Error Handling, Slave Specification Detection, TCP RTU bridge, Fixes [\#8](https://github.com/modbus2mqtt/angular/pull/8) ([volkmarnissen](https://github.com/volkmarnissen)) -- Angular TcpBridge Fix [\#7](https://github.com/modbus2mqtt/angular/pull/7) ([volkmarnissen](https://github.com/volkmarnissen)) -- \[bug\]Modbus Error Handling, Slave Specification Detection, TCP RTU bridge, Fixes [\#6](https://github.com/modbus2mqtt/angular/pull/6) ([volkmarnissen](https://github.com/volkmarnissen)) -- Modbus Error Handling and Monitoring [\#5](https://github.com/modbus2mqtt/angular/pull/5) ([volkmarnissen](https://github.com/volkmarnissen)) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.16...v0.12.17) -## [v0.12.20](https://github.com/modbus2mqtt/angular/tree/v0.12.20) (2025-04-14) +## [v0.12.16](https://github.com/volkmarnissen/angular/tree/v0.12.16) (2024-12-31) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.19...v0.12.20) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.15...v0.12.16) -**Merged pull requests:** +## [v0.12.15](https://github.com/volkmarnissen/angular/tree/v0.12.15) (2024-12-30) -- Please update me [\#4](https://github.com/modbus2mqtt/angular/pull/4) ([volkmarnissen](https://github.com/volkmarnissen)) -- Fixed package-lock.json [\#3](https://github.com/modbus2mqtt/angular/pull/3) ([volkmarnissen](https://github.com/volkmarnissen)) -- Adding support for discrete inputs [\#2](https://github.com/modbus2mqtt/angular/pull/2) ([arturmietek](https://github.com/arturmietek)) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.14...v0.12.15) -## [v0.12.19](https://github.com/modbus2mqtt/angular/tree/v0.12.19) (2025-01-16) +## [v0.12.14](https://github.com/volkmarnissen/angular/tree/v0.12.14) (2024-12-30) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.18...v0.12.19) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/0.12.14...v0.12.14) -## [v0.12.18](https://github.com/modbus2mqtt/angular/tree/v0.12.18) (2025-01-15) +## [0.12.14](https://github.com/volkmarnissen/angular/tree/0.12.14) (2024-12-13) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.17...v0.12.18) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.13...0.12.14) -## [v0.12.17](https://github.com/modbus2mqtt/angular/tree/v0.12.17) (2025-01-02) +## [v0.12.13](https://github.com/volkmarnissen/angular/tree/v0.12.13) (2024-12-13) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.16...v0.12.17) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.12...v0.12.13) -**Merged pull requests:** +## [v0.12.12](https://github.com/volkmarnissen/angular/tree/v0.12.12) (2024-12-11) -- Adding signed int 32 and unsigned int 32 options to number format [\#1](https://github.com/modbus2mqtt/angular/pull/1) ([arturmietek](https://github.com/arturmietek)) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.11...v0.12.12) -## [v0.12.16](https://github.com/modbus2mqtt/angular/tree/v0.12.16) (2024-12-31) +## [v0.12.11](https://github.com/volkmarnissen/angular/tree/v0.12.11) (2024-11-22) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.15...v0.12.16) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.10...v0.12.11) -## [v0.12.15](https://github.com/modbus2mqtt/angular/tree/v0.12.15) (2024-12-30) +## [v0.12.10](https://github.com/volkmarnissen/angular/tree/v0.12.10) (2024-11-19) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.14...v0.12.15) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.9...v0.12.10) -## [v0.12.14](https://github.com/modbus2mqtt/angular/tree/v0.12.14) (2024-12-30) +## [v0.12.9](https://github.com/volkmarnissen/angular/tree/v0.12.9) (2024-11-16) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/0.12.14...v0.12.14) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.8...v0.12.9) -## [0.12.14](https://github.com/modbus2mqtt/angular/tree/0.12.14) (2024-12-13) +## [v0.12.8](https://github.com/volkmarnissen/angular/tree/v0.12.8) (2024-11-14) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.13...0.12.14) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.7...v0.12.8) -## [v0.12.13](https://github.com/modbus2mqtt/angular/tree/v0.12.13) (2024-12-13) +## [v0.12.7](https://github.com/volkmarnissen/angular/tree/v0.12.7) (2024-10-23) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.12...v0.12.13) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.6...v0.12.7) -## [v0.12.12](https://github.com/modbus2mqtt/angular/tree/v0.12.12) (2024-12-11) +## [v0.12.6](https://github.com/volkmarnissen/angular/tree/v0.12.6) (2024-10-16) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.11...v0.12.12) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.5...v0.12.6) -## [v0.12.11](https://github.com/modbus2mqtt/angular/tree/v0.12.11) (2024-11-22) +## [v0.12.5](https://github.com/volkmarnissen/angular/tree/v0.12.5) (2024-09-24) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.10...v0.12.11) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.4...v0.12.5) -## [v0.12.10](https://github.com/modbus2mqtt/angular/tree/v0.12.10) (2024-11-19) +## [v0.12.4](https://github.com/volkmarnissen/angular/tree/v0.12.4) (2024-09-16) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.9...v0.12.10) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.3...v0.12.4) -## [v0.12.9](https://github.com/modbus2mqtt/angular/tree/v0.12.9) (2024-11-16) +## [v0.12.3](https://github.com/volkmarnissen/angular/tree/v0.12.3) (2024-09-06) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.8...v0.12.9) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.2...v0.12.3) -## [v0.12.8](https://github.com/modbus2mqtt/angular/tree/v0.12.8) (2024-11-14) +## [v0.12.2](https://github.com/volkmarnissen/angular/tree/v0.12.2) (2024-08-27) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.7...v0.12.8) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.0...v0.12.2) -## [v0.12.7](https://github.com/modbus2mqtt/angular/tree/v0.12.7) (2024-10-23) +## [v0.12.0](https://github.com/volkmarnissen/angular/tree/v0.12.0) (2024-08-16) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.6...v0.12.7) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.11.0...v0.12.0) -## [v0.12.6](https://github.com/modbus2mqtt/angular/tree/v0.12.6) (2024-10-16) +## [v0.11.0](https://github.com/volkmarnissen/angular/tree/v0.11.0) (2024-08-05) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.5...v0.12.6) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.10.1...v0.11.0) -## [v0.12.5](https://github.com/modbus2mqtt/angular/tree/v0.12.5) (2024-09-24) +## [v0.10.1](https://github.com/volkmarnissen/angular/tree/v0.10.1) (2024-08-05) -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.4...v0.12.5) - -## [v0.12.4](https://github.com/modbus2mqtt/angular/tree/v0.12.4) (2024-09-16) - -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.3...v0.12.4) - -## [v0.12.3](https://github.com/modbus2mqtt/angular/tree/v0.12.3) (2024-09-06) - -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.2...v0.12.3) - -## [v0.12.2](https://github.com/modbus2mqtt/angular/tree/v0.12.2) (2024-08-27) - -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.0...v0.12.2) - -## [v0.12.0](https://github.com/modbus2mqtt/angular/tree/v0.12.0) (2024-08-16) - -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.11.0...v0.12.0) - -## [v0.11.0](https://github.com/modbus2mqtt/angular/tree/v0.11.0) (2024-08-05) - -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.10.1...v0.11.0) - -## [v0.10.1](https://github.com/modbus2mqtt/angular/tree/v0.10.1) (2024-08-05) - -[Full Changelog](https://github.com/modbus2mqtt/angular/compare/0b2169b1bceece9fa4c2c6940ef33dafe96ae43b...v0.10.1) +[Full Changelog](https://github.com/volkmarnissen/angular/compare/0b2169b1bceece9fa4c2c6940ef33dafe96ae43b...v0.10.1) diff --git a/cypress/hexinputfield.cy.ts b/cypress/hexinputfield.cy.ts new file mode 100644 index 0000000..6cee5d0 --- /dev/null +++ b/cypress/hexinputfield.cy.ts @@ -0,0 +1,27 @@ + +import { HexinputfieldComponent } from "angular/src/app/specification/hexinputfield/hexinputfield.test.component"; + +function mount(startValue:number, displayHex:boolean) { + cy.mount(HexinputfieldComponent, { + autoDetectChanges: true, + componentProperties: { + displayHex: displayHex, + startValue: startValue, + }, + }); +} +const inputField='input[formControlName="testHex"]' +describe("Hexinputfield Component tests", () => { + it("Show decimal", () => { + mount(0x1234,false); + cy.get(inputField).should('have.value', '4660');; + cy.get(inputField).clear().type('1234').should('have.value', '1234'); + cy.get(inputField).clear().type('0x1234').blur().should('have.value', '4660'); +}); + it("Show Hex", () => { + mount(0x1234,true); + cy.get(inputField).should('have.value', '0x1234');; + cy.get(inputField).clear().type('4660').blur().should('have.value', '0x1234');; + cy.get(inputField).clear().type('0x1234').blur().should('have.value', '0x1234');; +}); +}); diff --git a/cypress/specification-entity.cy.ts b/cypress/specification-entity.cy.ts index 6904fb9..31ff556 100644 --- a/cypress/specification-entity.cy.ts +++ b/cypress/specification-entity.cy.ts @@ -2,6 +2,7 @@ import { ImodbusEntityWithName } from "angular/src/app/services/specificationInt import { afterEachEntityHelper, beforeEachHelper as beforeEachEntityHelper, + mountEntityComponent, setOnEntityNameOrVariableFieldsChangeFunc, } from "./support/entityHelper"; @@ -64,3 +65,16 @@ describe("Entity Component tests", () => { // "not.be.null"); }); }); +describe("Test for Modbus Address", () => { + beforeEach(()=>{mountEntityComponent(true)}); // mounts entity and opens all expansion panels + afterEach(afterEachEntityHelper); + it("Modbus address in hex", () => { + const inputField='input[formControlName="modbusAddress"]' + const matField='mat-form-field input[formControlName="modbusAddress"]' + cy.get(inputField).should('have.value', '0x4'); + cy.get(inputField).clear().type('1234').blur().should('have.value', '0x4d2'); + cy.get(inputField).clear().type('0X12s32').blur().should('have.value', '0x1232'); + cy.get(inputField).clear().type('0xx7') + cy.get(inputField).parent().get( "mat-error").should('contain', 'dec or hex') + }) +}); \ No newline at end of file diff --git a/cypress/support/entityHelper.ts b/cypress/support/entityHelper.ts index 7c8a7b3..4730314 100644 --- a/cypress/support/entityHelper.ts +++ b/cypress/support/entityHelper.ts @@ -88,7 +88,7 @@ let selectEntity: ImodbusEntity = { * * If other initial values are required, a new test file is required */ -export function beforeEachHelper() { +export function mountEntityComponent(displayHex:boolean) { cy.intercept("GET", "**/converters", { fixture: "converters.json", }); @@ -105,9 +105,15 @@ export function beforeEachHelper() { specificationMethods: specificationMethods, entity: selectEntity, disabled: false, + displayHex:displayHex }, }); cy.openAllExpansionPanels(); + +} + +export function beforeEachHelper() { + mountEntityComponent(false); } /** * resets the function set by setOnEntityNameOrVariableFieldsChangeFunc diff --git a/src/app/specification/entity/entity.component.html b/src/app/specification/entity/entity.component.html index eeb2913..5635153 100644 --- a/src/app/specification/entity/entity.component.html +++ b/src/app/specification/entity/entity.component.html @@ -78,8 +78,10 @@