chore: Maestro restructure, remove Marionette, add Makefile e2e commands
This commit is contained in:
@@ -11,6 +11,7 @@ class UiTextField extends StatelessWidget {
|
||||
|
||||
const UiTextField({
|
||||
super.key,
|
||||
this.semanticsIdentifier,
|
||||
this.label,
|
||||
this.hintText,
|
||||
this.onChanged,
|
||||
@@ -29,6 +30,8 @@ class UiTextField extends StatelessWidget {
|
||||
this.onTap,
|
||||
this.validator,
|
||||
});
|
||||
/// Optional semantics identifier for E2E testing (e.g. Maestro).
|
||||
final String? semanticsIdentifier;
|
||||
/// The label text to display above the text field.
|
||||
final String? label;
|
||||
|
||||
@@ -90,7 +93,9 @@ class UiTextField extends StatelessWidget {
|
||||
Text(label!, style: UiTypography.body4m.textSecondary),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
],
|
||||
TextFormField(
|
||||
Builder(
|
||||
builder: (BuildContext context) {
|
||||
final Widget field = TextFormField(
|
||||
controller: controller,
|
||||
onChanged: onChanged,
|
||||
keyboardType: keyboardType,
|
||||
@@ -113,6 +118,15 @@ class UiTextField extends StatelessWidget {
|
||||
? Icon(suffixIcon, size: 20, color: UiColors.iconSecondary)
|
||||
: suffix,
|
||||
),
|
||||
);
|
||||
if (semanticsIdentifier != null) {
|
||||
return Semantics(
|
||||
identifier: semanticsIdentifier!,
|
||||
child: field,
|
||||
);
|
||||
}
|
||||
return field;
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user