Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltat committed May 18, 2024
1 parent 7892417 commit 6a0665e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from pathlib import Path


def get_language() -> dict:
curr_dir = Path(__file__).parent.absolute()
return {
"language": "fi",
"path": curr_dir / "translate.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"sha256": "75343dfda0a68c40607e961ead1e104553ba074110f33627131125e8c11ecef0"
},
"handle_alert": {
"name": "hallinnoi_Hälytys",
"name": "hallinnoi_hälytys",
"doc": "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi",
"sha256": "7620b9059b37d2cb1d5823256d0f71d32d3f66af153d6be8ff5100219d4270d6"
},
Expand Down
8 changes: 7 additions & 1 deletion utest/test/translation/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@

@pytest.fixture()
def sl() -> SeleniumLibrary:
sys.path.append(str(Path(__file__).parent.absolute()))
d = Path(__file__).parent.parent.absolute()
sys.path.append(str(Path(__file__).parent.parent.absolute()))
return SeleniumLibrary(language="FI")


def test_translation(sl: SeleniumLibrary):
spec = sl.keywords_spec["__init__"]
assert spec.argument_specification
doc: str = spec.documentation
assert doc.startswith("1 SeleniumLibrary is a web testing library for Robot Framework")

spec = sl.keywords_spec["hallinnoi_hälytys"]
doc: str = spec.documentation
assert doc == "Hallinnoi hälytyksen uusi dokkari\n\nToinen rivi"

0 comments on commit 6a0665e

Please sign in to comment.