Skip to content

test: port tst_loginLogout#877

Merged
saw-jan merged 5 commits into
test/port-to-appiumfrom
test/port-loginLogout
Apr 28, 2026
Merged

test: port tst_loginLogout#877
saw-jan merged 5 commits into
test/port-to-appiumfrom
test/port-loginLogout

Conversation

@anon-pradip
Copy link
Copy Markdown
Contributor

@anon-pradip anon-pradip commented Apr 22, 2026

This PR migrates the login-logout GUI tests from squish to Appium for the OpenCloud desktop client.

Changes Made:

  1. pageObjects/AccountSetting.py
  • Converted account_action() to use app().find_element().click() instead of squish
  • Replaced squish dictionary selectors with SimpleNamespace(by=By.XPATH, selector="//Text") pattern
  • Updated get_account_connection_label() to use Appium XPath finder
  • Migrated wait_until_account_is_connected() from squish.waitFor() to WebDriverWait
  • Added is_loading_visible() helper and wait_until_sync_folder_is_configured() with WebDriverWait
  • Set ACCOUNT_LOADING locators to valid accessibility IDs
  1. pageObjects/Toolbar.py
  • Added QUIT_BUTTON with By.NAME, "Quit" and CONFIRM_QUIT_BUTTON with accessibility ID
  • Converted quit_opencloud() to Appium: uses app().find_element().click()
  • Removed squish-specific process cleanup loop
  1. helpers/SetupClientHelper.py
  • Added reusable close_and_kill_app() function that:
    • Quits Appium session
    • Kills remaining desktop client process via psutil
    • Resets driver for reuse
  • This consolidates cleanup logic used in both mid-scenario and end-of-scenario
  1. environment.py
  • Refactored after_scenario() to use close_and_kill_app() instead of duplicate 8-line cleanup code

Benefits:

  • Single source of truth for app cleanup
  • Works for both mid-scenario (quit and restart) and end-of-scenario teardown
  • Reduced code duplication

Testing:

  • Tested with behave --tags=smoke features/login-logout/login-logout.feature
  • All scenarios pass including login, logout, and quit client

Part of: #861

@anon-pradip anon-pradip force-pushed the test/port-loginLogout branch 3 times, most recently from a28580a to 959c282 Compare April 28, 2026 04:49
@anon-pradip anon-pradip self-assigned this Apr 28, 2026
@anon-pradip anon-pradip force-pushed the test/port-loginLogout branch from ff7f227 to 6816df2 Compare April 28, 2026 04:58
@anon-pradip anon-pradip marked this pull request as ready for review April 28, 2026 04:59
return cmd.stdout, cmd.stderr, cmd.returncode


def close_and_kill_app():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to think of grouping AUT related functions in a separate file. But we can do it in the coming refactor process.

Comment thread test/gui/helpers/SetupClientHelper.py Outdated
Comment thread test/gui/helpers/SetupClientHelper.py Outdated
Comment thread test/gui/pageObjects/AccountSetting.py Outdated
Comment thread test/gui/pageObjects/AccountSetting.py Outdated
Comment thread test/gui/pageObjects/AccountSetting.py Outdated
@anon-pradip anon-pradip force-pushed the test/port-loginLogout branch from 6816df2 to d03bd51 Compare April 28, 2026 08:45
@anon-pradip anon-pradip force-pushed the test/port-loginLogout branch from d03bd51 to 95ccf28 Compare April 28, 2026 08:48
@anon-pradip anon-pradip requested a review from saw-jan April 28, 2026 09:32
Comment thread test/gui/helpers/SyncHelper.py Outdated
Comment thread test/gui/helpers/SyncHelper.py Outdated
@anon-pradip anon-pradip force-pushed the test/port-loginLogout branch from ab15cf2 to 1c437d4 Compare April 28, 2026 11:41
@anon-pradip anon-pradip requested a review from saw-jan April 28, 2026 11:42
Copy link
Copy Markdown
Contributor

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is good enough

@saw-jan saw-jan merged commit 9fb2fd4 into test/port-to-appium Apr 28, 2026
2 of 3 checks passed
@saw-jan saw-jan deleted the test/port-loginLogout branch April 28, 2026 11:45
saw-jan pushed a commit that referenced this pull request May 12, 2026
* test: port tst_loginLogout

* test: fix closing of client

* test: Add reusable close_and_kill_app() for Appium session and process cleanup

* test: remove test.py

* test: use exception handlers in sync helper
saw-jan pushed a commit that referenced this pull request May 13, 2026
* test: port tst_loginLogout

* test: fix closing of client

* test: Add reusable close_and_kill_app() for Appium session and process cleanup

* test: remove test.py

* test: use exception handlers in sync helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants