android / android/android-test

Espresso: [BUG]: Espresso Doesn't Match SVG Drawable When Many Characters

Offen
#229 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Java
Sterne
1.2k
Forks
342
Ø Merge
11 Std. 29 Min.
Gemergte PRs (30 T.)
2

Beschreibung

See: https://issuetracker.google.com/119052092

Hi there,

I'm using AS and Espresso to match a Vector drawable against the drawable on my imageView and after many attempts to solve an issue I'm inclined to believe there may be an issue with AS or Espresso itself instead. It seems some paths for the generated SVG don't work, usually the ones with more characters. When I comment those out then my code works fine.

I'm sending attached the image of the lines I need to comment to match the drawable. That's the SO link for the issue:

https://stackoverflow.com/questions/52968631/espresso-doesnt-match-some-vector-drawables

And this is one of my sample Vector Drawable:






  <!--android:pathData="M47.31,38.87h8a3.09,3.09 0,0 0,3.11 -2.81,3 3,0 0,0 -0.88,-2.36 3,3 0,0 0,-2.14 -0.89H30.84A1.06,1.06 0,0 1,30.09 31l6.07,-6.07a3.09,3.09 0,0 0,0.19 -4.21,3 3,0 0,0 -4.41,-0.13L18.19,34.33c-6.2,6.21 -6.43,16 1.43,20.65"-->
  <!--android:strokeWidth="1.97"-->
  <!--android:fillColor="#00000000"-->
  <!--android:strokeColor="#89d3dd"-->
  <!--android:strokeLineCap="round"/>-->
  <!--android:pathData="M54.91,43.54s3.42,4 3.42,7.05a3.42,3.42 0,0 1,-6.84 0c0,-3 3.42,-7.05 3.42,-7.05"-->
  <!--android:strokeWidth="1.97"-->
  <!--android:fillColor="#00000000"-->
  <!--android:strokeColor="#89d3dd"-->
  <!--android:strokeLineCap="round"/>-->
  <!--android:pathData="M54.8,48.13a5.3,5.3 0,0 0,-0.52 2,1.79 1.79,0 0,0 0.79,1.5"-->
  <!--android:strokeWidth="1.97"-->
  <!--android:fillColor="#00000000"-->
  <!--android:strokeColor="#89d3dd"-->
  <!--android:strokeLineCap="round"/>-->







These being the lines I need to comment out:

  <!--android:pathData="M47.31,38.87h8a3.09,3.09 0,0 0,3.11 -2.81,3 3,0 0,0 -0.88,-2.36 3,3 0,0 0,-2.14 -0.89H30.84A1.06,1.06 0,0 1,30.09 31l6.07,-6.07a3.09,3.09 0,0 0,0.19 -4.21,3 3,0 0,0 -4.41,-0.13L18.19,34.33c-6.2,6.21 -6.43,16 1.43,20.65"-->
  <!--android:strokeWidth="1.97"-->
  <!--android:fillColor="#00000000"-->
  <!--android:strokeColor="#89d3dd"-->
  <!--android:strokeLineCap="round"/>-->
  <!--android:pathData="M54.91,43.54s3.42,4 3.42,7.05a3.42,3.42 0,0 1,-6.84 0c0,-3 3.42,-7.05 3.42,-7.05"-->
  <!--android:strokeWidth="1.97"-->
  <!--android:fillColor="#00000000"-->
  <!--android:strokeColor="#89d3dd"-->
  <!--android:strokeLineCap="round"/>-->
  <!--android:pathData="M54.8,48.13a5.3,5.3 0,0 0,-0.52 2,1.79 1.79,0 0,0 0.79,1.5"-->
  <!--android:strokeWidth="1.97"-->
  <!--android:fillColor="#00000000"-->
  <!--android:strokeColor="#89d3dd"-->
  <!--android:strokeLineCap="round"/>-->

Thank you very much.

Build: 3.2.1, AI-181.5540.7.32.5056338, 201810090144,

AI-181.5540.7.32.5056338, JRE 1.8.0_152-release-1136-b06x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080

Android Gradle Plugin: 3.2.1
Gradle: 4.6
NDK: from local.properties: (not specified); latest from SDK: (not found);
LLDB: pinned revision 3.1 not found; latest from SDK: (package not found);
CMake: from local.properties: (not specified); latest from SDK: (not found); from PATH: (not found);

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Beispiel-Vector-Drawable mit Espresso zu reproduzieren, und vergleiche das Rendering- und Matching-Verhalten mit aktivierten und deaktivierten drei auskommentierten Pfadelementen. Das Issue enthält weder eine Repository-Datei noch einen Test-Einstiegspunkt; als erledigt gilt, den Grund zu identifizieren, warum diese Pfade den Drawable-Abgleich verhindern, und einen reproduzierbaren Regressionstest oder eine dokumentierte Lösung hinzuzufügen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android
Bereich
mobile-dev, testing
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.