Skip to content

Commit a520e8a

Browse files
committed
Fix tests
1 parent 2d7a66f commit a520e8a

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from pathlib import Path
2+
3+
4+
def get_language() -> dict:
5+
curr_dir = Path(__file__).parent.absolute()
6+
return {
7+
"language": "fi",
8+
"path": curr_dir / "translate.json"
9+
}

utest/test/robotframework_seleniumlibrary_translation_fi/translation.json renamed to utest/test/robotframework_seleniumlibrary_translation_fi/translate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"sha256": "75343dfda0a68c40607e961ead1e104553ba074110f33627131125e8c11ecef0"
1111
},
1212
"handle_alert": {
13-
"name": "hallinnoi_Hälytys",
13+
"name": "hallinnoi_hälytys",
1414
"doc": "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi",
1515
"sha256": "7620b9059b37d2cb1d5823256d0f71d32d3f66af153d6be8ff5100219d4270d6"
1616
},

utest/test/translation/test_translation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88

99
@pytest.fixture()
1010
def sl() -> SeleniumLibrary:
11-
sys.path.append(str(Path(__file__).parent.absolute()))
11+
d = Path(__file__).parent.parent.absolute()
12+
sys.path.append(str(Path(__file__).parent.parent.absolute()))
1213
return SeleniumLibrary(language="FI")
1314

15+
1416
def test_translation(sl: SeleniumLibrary):
1517
spec = sl.keywords_spec["__init__"]
1618
assert spec.argument_specification
1719
doc: str = spec.documentation
1820
assert doc.startswith("1 SeleniumLibrary is a web testing library for Robot Framework")
21+
22+
spec = sl.keywords_spec["hallinnoi_hälytys"]
23+
doc: str = spec.documentation
24+
assert doc == "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi"

0 commit comments

Comments
 (0)