Skip to content

Commit

Permalink
Fix Out of Bounds error during testing. (#447)
Browse files Browse the repository at this point in the history
* Add pause after clicking onto project screen.

* Fixed case where assert was accidently an assignment.
  • Loading branch information
JoeZiminski authored Dec 6, 2024
1 parent 0e7a407 commit aa588c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tests_tui/test_tui_create_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ async def test_name_template_next_sub_or_ses_and_validation(
pilot, "#create_folders_create_folders_button"
)

pilot.app.screen.query_one(
assert pilot.app.screen.query_one(
"#messagebox_message_label"
).renderable = (
).renderable == (
"The name: sub-0001 does not match the template: sub-\\d\\d\\d"
)
await self.close_messagebox(pilot)
Expand Down
1 change: 1 addition & 0 deletions tests/tests_tui/tui_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ async def check_and_click_onto_existing_project(self, pilot, project_name):
Perform general TUI checks during the navigation.
"""
await pilot.click("#mainwindow_existing_project_button")
await pilot.pause()

assert isinstance(pilot.app.screen, ProjectSelectorScreen)
assert len(pilot.app.screen.project_names) == 1
Expand Down

0 comments on commit aa588c1

Please sign in to comment.