openhab-docs/_addons_uis/org.openhab.ui/web/test/blockly
openHAB Build Server 5f0492fa4c Updated external content (Jenkins build 1356) 2023-02-16 21:26:32 +00:00
..
README.md Updated external content (Jenkins build 1356) 2023-02-16 21:26:32 +00:00

README.md

Blockly Tests

This folder contains the test are currently available. Blockly doesn't really an option to write good automated test but this is at least a collection of tests that can be used for regression testing. It is not perfect but at least a good start.

To use the test, create a new rule and copy the content of any of the files into the code tab. As it sometimes uses items or things of the specific openHAB setup, these might have to be adapted.

The folder contains

  • the code of the tests with the postfix "test"
  • and a visual representation of all the blocks for each test.

#Overview of the tests

Color, List, Text blocks

blockly_colors_list_text_dict

Datetime between

blockly_datetime_between

Datetime comparison

blockly_datetime_creation_comparison1 blockly_datetime_creation_comparison2

Ephemeris and Notifications

blockly_ephemeris_and_notifications

Items and Things

blockly_items_and_things

Metadata

The test is based on an item name teststate with the namespace namespaceTest

The metadata of that namespace namespaceTest is configured as follows:

value: Stefan
config:
  ooone: "123"
  oone:
    two: "456"
  one:
    two:
      three: "756"
  field1: 1
  field2: 2
  field3: 3

metadata read test metadata write test metadate loop index test

Persistence

blockly_persistence

Persistence

blockly_quantities

Scripts and Transformations

blockly_scripts

Timers and Delays

blockly_timers_and_delays blockly_timers_and_delays_triggered

Voice and Multimedia

blockly_voice_and_multimedia