-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
tests/ui_screens/creatures/manage_spell_gems/test_equip_spell.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from importlib import resources | ||
import pytest | ||
from subot.ocr import OCR | ||
from subot.settings import Config | ||
from subot.ui_areas.equip_spell_gem import EquipSpellGemUI | ||
from tests.ui_screens.utils import ocr_test_frame | ||
|
||
|
||
@pytest.fixture | ||
def equip_spell_gem_ui(audio_system_test) -> EquipSpellGemUI: | ||
ocr_engine = OCR() | ||
config = Config() | ||
|
||
return EquipSpellGemUI(audio_system=audio_system_test, config=config, ocr_engine=ocr_engine) | ||
|
||
|
||
def test_basic_spell_info(audio_system_test, equip_spell_gem_ui): | ||
with resources.path(__package__, 'equip_spell_gem.png') as path: | ||
ocr_test_frame(path, equip_spell_gem_ui) | ||
equip_spell_gem_ui.speak_auto() | ||
assert "LIFE class" in audio_system_test.last_text | ||
assert "Absolute Corruption" in audio_system_test.last_text | ||
|
||
equip_spell_gem_ui.speak_interaction() | ||
assert "Target's buffs are converted to random debuffs" in audio_system_test.last_text | ||
assert "19% Chance to Cast After Healing" in audio_system_test.last_text | ||
|
||
|