Skip to content

Your app looks AI-generated. Vincent Van Gogh noticed. An agent skill that finds and fixes AI-looking UI and UX in mobile apps, web apps, and websites.

Add an Android XML slop fixture (#22)

Nguyễn Tuấn Anh9940eab2f4f9
diff --git a/test/detect.test.js b/test/detect.test.js
index 357075e..c238239 100644
--- a/test/detect.test.js
+++ b/test/detect.test.js
@@ -45,6 +45,13 @@ test("Flutter slop is caught", () => {
}
});
+test("Android XML slop is caught", () => {
+ const found = new Set(scan([path.join(fixtures, "slop", "android")]).findings.map((f) => f.rule));
+ for (const id of ["fixed-text-size", "back-gesture", "emoji-icon"]) {
+ assert.ok(found.has(id), `missing ${id}`);
+ }
+});
+
test("every rule has a fixture that triggers it", () => {
const all = new Set(scan([path.join(fixtures, "slop")], { platform: "mobile" }).findings.map((f) => f.rule));
for (const rule of rules) assert.ok(all.has(rule.id), `no fixture for ${rule.id}`);
diff --git a/test/fixtures/slop/android/AndroidManifest.xml b/test/fixtures/slop/android/AndroidManifest.xml
new file mode 100644
index 0000000..02c2fae
--- /dev/null
+++ b/test/fixtures/slop/android/AndroidManifest.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <application
+ android:allowBackup="true"
+ android:enableOnBackInvokedCallback="false"
+ android:label="@string/app_name"
+ android:theme="@style/Theme.App">
+ <activity
+ android:name=".MainActivity"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
diff --git a/test/fixtures/slop/android/activity_main.xml b/test/fixtures/slop/android/activity_main.xml
new file mode 100644
index 0000000..9e877e4
--- /dev/null
+++ b/test/fixtures/slop/android/activity_main.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="14dp"
+ android:text="@string/launch" />
+
+</LinearLayout>
diff --git a/test/fixtures/slop/android/strings.xml b/test/fixtures/slop/android/strings.xml
new file mode 100644
index 0000000..b06ccf9
--- /dev/null
+++ b/test/fixtures/slop/android/strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Unslop</string>
+ <string name="launch">🚀 Launch</string>
+</resources>