QField
QField copied to clipboard
Test and refactor FeatureForm
Initial: some tests and refactoring.
- Remove some registrations that cause warnings and are never used.
- Add test QML files to executable in CMake; this makes us see them in Qtcreator and navigate through them with Ctrl+K.
- Remove
stringUtilities
and useStringUtils
.
Second: Test Case for FeatureForm
This pull request adds three test cases to verify the functionality of the FeatureForm component.
The tests cover three different scenarios:
-
Test_00_featureForm
: Verifies that the feature form is properly initialized and displays the expected data for an Apiary layer with id 64. -
Test_01_featureForm
: Verifies that the feature form is properly initialized and displays the expected data for a Field layer with id 39. -
Test_02_featureForm
: Verifies that the feature form is properly initialized and displays the expected data for a Tracks layer with id 1.
Each test case checks the following aspects of the feature form:
Toolbar visibility
Title label text
Tab row presence and content
Field repeater item content and behavior
Attribute editor loader values and behavior
The tests use various methods to verify these aspects, including compare statements to check for equality and Utils.findChildren
to locate UI elements.