auto flake and corrections
This commit is contained in:
@@ -155,8 +155,11 @@ class TestHTMLLinkInteractivity(unittest.TestCase):
|
||||
html = '''
|
||||
<div>
|
||||
<h2 style="text-align: center; font-size: 18px; font-weight: bold; margin: 10px 0;">Settings</h2>
|
||||
<p style="padding: 15px; margin: 5px 0; background-color: #dc3545; text-align: center; border-radius: 5px;">
|
||||
<a href="action:back_to_library" style="text-decoration: none; color: white; font-weight: bold; font-size: 14px;">◄ Back to Library</a>
|
||||
<p style="padding: 15px; margin: 5px 0; background-color: #dc3545; text-align: center;
|
||||
border-radius: 5px;">
|
||||
<a href="action:back_to_library"
|
||||
style="text-decoration: none; color: white; font-weight: bold; font-size: 14px;">
|
||||
◄ Back to Library</a>
|
||||
</p>
|
||||
<p style="padding: 10px; margin: 5px 0; background-color: #f8f9fa; border-radius: 5px;">
|
||||
<span style="font-weight: bold;">Font Size: 100%</span><br>
|
||||
@@ -177,23 +180,26 @@ class TestHTMLLinkInteractivity(unittest.TestCase):
|
||||
all_linked_words.append(word)
|
||||
|
||||
# Verify we found the expected links
|
||||
self.assertGreater(len(all_linked_words), 0, "Should find LinkedWords in settings HTML")
|
||||
self.assertGreater(
|
||||
len(all_linked_words),
|
||||
0,
|
||||
"Should find LinkedWords in settings HTML")
|
||||
|
||||
# Check for specific link targets
|
||||
link_targets = {word.location for word in all_linked_words}
|
||||
|
||||
self.assertIn("action:back_to_library", link_targets,
|
||||
"Should find 'Back to Library' link")
|
||||
"Should find 'Back to Library' link")
|
||||
self.assertIn("setting:font_decrease", link_targets,
|
||||
"Should find font decrease link")
|
||||
"Should find font decrease link")
|
||||
self.assertIn("setting:font_increase", link_targets,
|
||||
"Should find font increase link")
|
||||
"Should find font increase link")
|
||||
|
||||
# Verify the link texts
|
||||
back_to_library_words = [w for w in all_linked_words
|
||||
if w.location == "action:back_to_library"]
|
||||
if w.location == "action:back_to_library"]
|
||||
self.assertGreater(len(back_to_library_words), 0,
|
||||
"Should have words linked to back_to_library action")
|
||||
"Should have words linked to back_to_library action")
|
||||
|
||||
# Print debug info
|
||||
print(f"\nFound {len(all_linked_words)} linked words:")
|
||||
|
||||
Reference in New Issue
Block a user