Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/gui/features/activity/activity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: filter activity for user
I want to filter activity
So that I can view activity of specific user

@smoke @skip
@smoke
Scenario: filter synced activities
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.

The test is failing in my local machine.
Image

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm, this should be fixed. THe CI failure is different one which I fixed very recently.
Let me check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could you pull this again and test? It's working for me

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.

It is working fine on my system

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.

The test is passing now.
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think, the test failed because there's popup in the first screen

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.

Wait, the test is kind of flaky.
The test failes when the client opens up on the first(left) screen.
But passes when the client opens up on the second(right) screen.

@saw-jan

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.

I think, the test failed because there's popup in the first screen

Yes, you are right.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

let's see into this issue separately.

Given user "Alice" has been created in the server with default attributes
And user "Brian" has been created in the server with default attributes
Expand Down
2 changes: 1 addition & 1 deletion test/gui/features/sync-resources/syncResources.feature
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Feature: Syncing files
"""
test content
"""
And the user waits for folder "parent/subfolder5/test.txt" to be synced
And the user waits for file "parent/subfolder5/test.txt" to be synced
Then as "Alice" folder "parent/subfolderEmpty1" should exist in the server
And as "Alice" folder "parent/subfolderEmpty2" should exist in the server
And as "Alice" folder "parent/subfolderEmpty3" should exist in the server
Expand Down
31 changes: 17 additions & 14 deletions test/gui/pageObjects/Activity.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# from objectmaphelper import RegularExpression
from types import SimpleNamespace
from appium.webdriver.common.appiumby import AppiumBy as By
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException

from helpers.FilesHelper import build_conflicted_regex
Expand All @@ -17,7 +18,9 @@ class Activity:
LOCAL_ACTIVITY_FILTER_BUTTON = SimpleNamespace(by=By.NAME, selector="Filter")
LOCAL_ACTIVITY_FILTER_OPTION_SELECTOR = SimpleNamespace(by=By.NAME, selector=None)
LOCAL_ACTIVITY_TABLE = SimpleNamespace(by=By.NAME, selector="Local activity table")
FILTER_BUTTON_SELECTED_STATE = SimpleNamespace(by=By.NAME, selector="1 Filter")
FILTER_BUTTON_SELECTED_STATE = SimpleNamespace(
by=By.XPATH, selector="//*[contains(@name, '1 Filter')]"
)
NOT_SYNCED_FILTER_BUTTON = SimpleNamespace(by=None, selector=None)
NOT_SYNCED_FILTER_OPTION_SELECTOR = SimpleNamespace(by=None, selector=None)
SYNCED_ACTIVITY_TABLE_HEADER_SELECTOR = SimpleNamespace(by=None, selector=None)
Expand Down Expand Up @@ -91,23 +94,23 @@ def has_sync_status(filename, status):

@staticmethod
def select_synced_filter(sync_filter):
app().find_element(
menu = app().find_element(
Activity.LOCAL_ACTIVITY_FILTER_BUTTON.by,
Activity.LOCAL_ACTIVITY_FILTER_BUTTON.selector,
).click()
container = app().find_element(
Activity.LOCAL_ACTIVITY_TABLE.by, Activity.LOCAL_ACTIVITY_TABLE.selector
)
# NOTE: clicking filter options does not work
container.find_element(
Activity.LOCAL_ACTIVITY_FILTER_OPTION_SELECTOR.by, sync_filter
).click()
# FIXME: enable the check below once the filter options are clickable
menu.click()

# NOTE: Filter options are not visible in the accessibility tree.
# As a workaround, select the second filter option (which is an account filter).
# This means we cannot select a specific account filter for now.
menu.send_keys(Keys.ARROW_DOWN)
menu.send_keys(Keys.ARROW_DOWN)
menu.send_keys(Keys.ENTER)
# confirm filter is applied
# app().find_element(
# Activity.FILTER_BUTTON_SELECTED_STATE.by,
# Activity.FILTER_BUTTON_SELECTED_STATE.selector,
# )
app().find_element(
Activity.FILTER_BUTTON_SELECTED_STATE.by,
Activity.FILTER_BUTTON_SELECTED_STATE.selector,
)

@staticmethod
def get_synced_file_selector(resource):
Expand Down
3 changes: 1 addition & 2 deletions test/gui/pageObjects/Toolbar.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from types import SimpleNamespace
from urllib.parse import urlparse
from appium.webdriver.common.appiumby import AppiumBy as By
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException

from helpers.AppHelper import app, get_window_location
from helpers.AppHelper import app
from helpers.ConfigHelper import get_config
from helpers.UserHelper import get_displayname_for_user
from helpers.SyncHelper import wait_for
Expand Down
3 changes: 2 additions & 1 deletion test/gui/steps/account_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pageObjects.AccountSetting import AccountSetting
from pageObjects.Toolbar import Toolbar
from pageObjects.EnterPassword import EnterPassword
from pageObjects.AccountSetting import AccountSetting
from helpers.SetupClientHelper import (
start_client,
setup_client,
Expand All @@ -24,6 +23,7 @@
from helpers.UserHelper import get_displayname_for_user, get_password_for_user
from helpers.ConfigHelper import get_config
from helpers.TableParser import table_rows_hash
from helpers.AppHelper import close_and_kill_app


@Given('the user has started the client')
Expand Down Expand Up @@ -244,6 +244,7 @@ def step(context):
@When('the user quits the client')
def step(context):
Toolbar.quit_opencloud()
close_and_kill_app()


@Then('"{username}" account should be opened')
Expand Down
Loading