appium_failure_helper 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appium_failure_helper/report_generator.rb +17 -10
- data/lib/appium_failure_helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a20ff6bfd04e9343504f2718b569ff4872a4e8a398d9dd9952f4da57c70b4395
|
4
|
+
data.tar.gz: 3cf66ebae97ae64bd6dce35b35279834fa86f31c46d00c6a5df7948e990a6ea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96ea0be769224f562be575f06fdb0a75ceeb53379c1a0b587fb7085404e06c8315e4ebb81e08a8e53d5f2ee7c18c4a08b7e5f91de421520f62ec780a4f0c2b16
|
7
|
+
data.tar.gz: e95f63b9cf6f5079da73a32d10260f319960b689e3abc0691282b8f830cb8abc4e69be0e2d2c14008d9846a6bb719529cc6b46a8da7e0d9f1b080c1ee07a2ee9
|
@@ -68,8 +68,12 @@ module AppiumFailureHelper
|
|
68
68
|
|
69
69
|
de_para_html = "" # (Sua lógica de_para_html)
|
70
70
|
code_search_html = "" # (Sua lógica code_search_html)
|
71
|
-
failed_info_content = if failed_info && !failed_info.empty
|
72
|
-
|
71
|
+
failed_info_content = if failed_info && !failed_info.empty?
|
72
|
+
"<p class='text-sm text-gray-700 font-medium mb-2'>Tipo de Seletor: <span class='font-mono text-xs bg-red-100 p-1 rounded'>#{CGI.escapeHTML(failed_info[:selector_type].to_s)}</span></p><p class='text-sm text-gray-700 font-medium'>Valor Buscado: <span class='font-mono text-xs bg-red-100 p-1 rounded break-all'>#{CGI.escapeHTML(failed_info[:selector_value].to_s)}</span></p>"
|
73
|
+
else
|
74
|
+
"<p class='text-sm text-gray-500'>O localizador exato não pôde ser extraído.</p>"
|
75
|
+
end
|
76
|
+
|
73
77
|
code_search_html = ""
|
74
78
|
unless code_search_results.empty?
|
75
79
|
suggestions_list = code_search_results.map do |match|
|
@@ -97,11 +101,10 @@ module AppiumFailureHelper
|
|
97
101
|
"<p class='text-sm text-gray-500'>O localizador exato não pôde ser extraído.</p>"
|
98
102
|
end
|
99
103
|
|
100
|
-
|
101
|
-
"<p class='text-gray-500'>Nenhuma estratégia de
|
104
|
+
repair_suggestions_content = if alternative_xpaths.empty?
|
105
|
+
"<p class='text-gray-500'>Nenhuma estratégia de localização alternativa pôde ser gerada.</p>"
|
102
106
|
else
|
103
107
|
pages = alternative_xpaths.each_slice(6).to_a
|
104
|
-
|
105
108
|
carousel_items = pages.map do |page_strategies|
|
106
109
|
strategy_list_html = page_strategies.map do |strategy|
|
107
110
|
reliability_color = case strategy[:reliability]
|
@@ -109,17 +112,21 @@ module AppiumFailureHelper
|
|
109
112
|
when :media then 'bg-yellow-100 text-yellow-800'
|
110
113
|
else 'bg-red-100 text-red-800'
|
111
114
|
end
|
115
|
+
# CORREÇÃO: Adiciona o tipo de estratégia (ID, XPATH) ao lado do seletor
|
112
116
|
<<~STRATEGY_ITEM
|
113
|
-
<
|
114
|
-
<div class='flex justify-between items-center mb-
|
117
|
+
<li class='border-b border-gray-200 py-3 last:border-b-0'>
|
118
|
+
<div class='flex justify-between items-center mb-1'>
|
115
119
|
<p class='font-semibold text-indigo-800 text-sm'>#{CGI.escapeHTML(strategy[:name])}</p>
|
116
120
|
<span class='text-xs font-medium px-2 py-0.5 rounded-full #{reliability_color}'>#{CGI.escapeHTML(strategy[:reliability].to_s.capitalize)}</span>
|
117
121
|
</div>
|
118
|
-
<
|
119
|
-
|
122
|
+
<div class='bg-gray-800 text-white p-2 rounded mt-1 text-xs whitespace-pre-wrap break-words font-mono'>
|
123
|
+
<span class='font-bold text-indigo-400'>#{CGI.escapeHTML(strategy[:strategy].to_s.upcase)}:</span>
|
124
|
+
<code class='ml-1'>#{CGI.escapeHTML(strategy[:locator])}</code>
|
125
|
+
</div>
|
126
|
+
</li>
|
120
127
|
STRATEGY_ITEM
|
121
128
|
end.join
|
122
|
-
"<div class='carousel-item w-full flex-shrink-0'><
|
129
|
+
"<div class='carousel-item w-full flex-shrink-0'><ul>#{strategy_list_html}</ul></div>"
|
123
130
|
end.join
|
124
131
|
|
125
132
|
<<~CAROUSEL
|