Skip to content

Commit

Permalink
Update tests and fix formating
Browse files Browse the repository at this point in the history
  • Loading branch information
tsterbak committed Jul 26, 2023
1 parent 1113cb8 commit 6b895c4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 4 additions & 4 deletions openandroidinstaller/openandroidinstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"):

# header
page.appbar = AppBar(
leading=Image(
src="/logo-192x192.png", height=40, width=40, border_radius=40
),
leading=Image(src="/logo-192x192.png", height=40, width=40, border_radius=40),
leading_width=56,
toolbar_height=72,
elevation=0,
title=Text(f"OpenAndroidInstaller version {VERSION}"), #, style="displaySmall"),
title=Text(
f"OpenAndroidInstaller version {VERSION}"
), # , style="displaySmall"),
center_title=False,
bgcolor="#00d886",
actions=[
Expand Down
2 changes: 2 additions & 0 deletions openandroidinstaller/tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,14 @@ def fastboot_unlock(bin_path: Path) -> TerminalResponse:
for line in run_command("fastboot flashing unlock", bin_path):
yield line


@add_logging("Critically unlocking the device with fastboot without code.")
def fastboot_unlock_critical(bin_path: Path) -> TerminalResponse:
"""Unlock critical the device with fastboot and without code."""
for line in run_command("fastboot flashing unlock_critical", bin_path):
yield line


@add_logging("OEM unlocking the device with fastboot.")
def fastboot_oem_unlock(bin_path: Path) -> TerminalResponse:
"""OEM unlock the device with fastboot and without code."""
Expand Down
14 changes: 12 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ def test_app_sargo():
number_of_steps = 14
for _ in range(number_of_steps):
page.controls[0].to_next_view(None)
assert "SuccessView" in str(page.controls[0].view.controls[0])
assert "Installation completed successfully!" in str(
page.controls[0]
.view.controls[0]
.right_view_header.controls[0]
.content.controls[0]
)


def test_app_beyond2lte():
Expand All @@ -61,4 +66,9 @@ def test_app_beyond2lte():
number_of_steps = 14
for _ in range(number_of_steps):
page.controls[0].to_next_view(None)
assert "SuccessView" in str(page.controls[0].view.controls[0])
assert "Installation completed successfully!" in str(
page.controls[0]
.view.controls[0]
.right_view_header.controls[0]
.content.controls[0]
)

0 comments on commit 6b895c4

Please sign in to comment.