Skip to content

Commit cc71a32

Browse files
committed
test: disable autocorrection in mobile e2e tests
1 parent ec819cb commit cc71a32

6 files changed

Lines changed: 9 additions & 1 deletion

File tree

.maestro/enrichedInput/flows/inline_code_paste_into_codeblock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ appId: swmansion.enriched.example
2121

2222
- doubleTapOn:
2323
id: 'editor-input'
24-
point: '10%, 30%'
24+
point: '8%, 25%'
2525

2626
- tapOn:
2727
text: 'Copy'
-65 Bytes
Loading
-65 Bytes
Loading
-71 Bytes
Loading

.maestro/scripts/setup-android-emulator.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ until adb -s "$SERIAL" shell getprop sys.boot_completed 2>/dev/null | grep -q "^
7777
done
7878

7979
adb -s "$SERIAL" shell pm disable-user --user 0 com.google.android.inputmethod.latin
80+
adb -s "$SERIAL" shell settings put secure spell_checker_enabled 0
8081

8182
echo "Emulator ready: $AVD_NAME ($SERIAL)"
8283
echo "DEVICE_ID=$SERIAL"

.maestro/scripts/setup-ios-simulator.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ if [ -z "$UDID" ]; then
2525
exit 1
2626
fi
2727

28+
PREFS_FILE="$HOME/Library/Developer/CoreSimulator/Devices/$UDID/data/Library/Preferences/.GlobalPreferences.plist"
29+
30+
# Disable Autocorrection, Auto-Capitalization, and Predictive Text
31+
plutil -replace NSAutomaticSpellingCorrectionEnabled -bool NO "$PREFS_FILE"
32+
plutil -replace NSAutomaticCapitalizationEnabled -bool NO "$PREFS_FILE"
33+
plutil -replace KeyboardPredictiveText -bool NO "$PREFS_FILE"
34+
2835
STATE=$(xcrun simctl list devices | grep "$UDID" | grep -oE '\(Booted\)|\(Shutdown\)' || true)
2936
if [ "$STATE" != "(Booted)" ]; then
3037
echo "Booting '$DEVICE_NAME' ($UDID)..."

0 commit comments

Comments
 (0)